Update proxmox extension - add multiple servers support - #30125
Conversation
- New Manage Servers command (add/edit/remove servers, stored in LocalStorage) - Existing preferences keep working unchanged as the first server (now optional) - VM and storage lists aggregate all servers, one section per server, with per-server error rows so one unreachable server doesn't hide the others - Surface fetch error causes instead of Node's generic "fetch failed" - Check response.ok in pveFetch, failed VM actions no longer show success Fixes raycast#27260 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thank you for your first contribution! 🎉 🔔 @CzBiX @xmok @j3lte you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="proxmox-multiple-servers"
FORK_URL="https://github.com/kzaoaai/extensions.git"
EXTENSION_NAME="proxmox"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryThe PR adds multi-server Proxmox configuration and routes VM and storage operations through each resource’s originating server.
Confidence Score: 4/5The PR does not yet appear safe to merge because overlapping mutations of the same server can silently lose an edit or recreate a server after deletion. Per-server storage fixes cross-server array replacement, but Files Needing Attention: extensions/proxmox/src/utils/servers.ts, extensions/proxmox/src/screens/ManageServers.tsx Important Files Changed
Reviews (4): Last reviewed commit: "Store each server under its own key inst..." | Re-trigger Greptile |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…changes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| const { servers, isLoading: isLoadingServers } = useServers(); | ||
|
|
||
| // Serialized so the promise re-executes exactly when the server list changes | ||
| const serversKey = JSON.stringify(servers); |
There was a problem hiding this comment.
usePromise already deep-compares its args array, no re-serialize needed
There was a problem hiding this comment.
you're right. The servers array is now passed straight through.
| const result = usePromise( | ||
| async (key: string): Promise<PveServerResult<T>[]> => { |
There was a problem hiding this comment.
should passthrough abortable signal
There was a problem hiding this comment.
abortable is now passed to usePromise and its signal forwarded to every request. One detail worth flagging: the per-server catch rethrows AbortError instead of turning it into a result, otherwise a superseded revalidation renders as a "Connection Failed" row for that server.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replaces the whole-array read-modify-write, so concurrent add, edit or remove operations can no longer discard each other. Existing configurations are migrated on the first read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for the review, both points are addressed:
I also changed how servers are stored while I was in there: each server now lives under its own Tested against three PVE 9 servers (one cluster plus two standalone nodes): list, per-server sections, storage contents, and the VM actions. |
Description
Fixes #27260
Adds support for multiple Proxmox servers:
Manage Serverscommand to add, edit or remove servers. Additional servers are stored inLocalStorage; the connection is verified on save (with the option to save anyway).Manage VMsandManage Storagefetch all configured servers and group the results into one section per server (single-server setups look exactly as before). An unreachable server shows a per-server error row instead of hiding the other servers' results.Open Dashboarduse the server of the row they are triggered on.Two small fixes that came out of this:
error.cause(e.g. TLS or DNS problems) instead of Node's generic "fetch failed".pveFetchnow checksresponse.ok— before, a failed VM action (e.g. missing token permission) showed a success toast.Note for review: token secrets of additional servers live in
LocalStorage(the preference-based server keeps using the encryptedpasswordpreference). Happy to change this if there is a preferred pattern for multi-instance credentials.Tested against three Proxmox VE 9 servers (one cluster + two standalone nodes) on macOS.
Screencast
Mock data, two servers configured:
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool🤖 Generated with Claude Code