Repository navigation
Description
Description
pmd stores the fleet as three tables, machines, subscriptions and agents, and exposes GET for each plus PUT with a write:fleet token (project-manager#49, Fleet config). The live API already returns four machines (air, home, laptop, mini) with maxSessions, capabilities, source and version. The dashboard shows none of it and cannot change it. Today max_sessions changes by editing pmd's config.toml on mini.
Rules the dialog must respect:
PUTreplaces a row and needs every field. A machine hasos,tailnetIp(string ornull),maxSessions(0–64) andcapabilities. A subscription hasprovider,plan(""for none) andmetered. An agent hasmodel,subscription,rolesandenabled, and its id ismachine/provider/alias.- Create sends
If-None-Match: *, replace sendsIf-Match: <version>. An unknownmachineorsubscriptionon an agent returns400 unknown_machineor400 unknown_subscription. - A
PUTthat changes a row turns itssourcefromconfigtoapi, after which the file no longer touches it. There is no delete. Disable an agent withenabled: falseand stop a machine withmaxSessions: 0.
This issue adds a Fleet dialog under the Manage menu from #33.
Why
Franz wants to tune how many sessions each machine runs, retire a model, and add a new subscription without ssh-ing to mini. max_sessions is the setting he changes most, and it directly limits the Chief's parallel work.
Goal
One dialog with a tab each for Machines, Subscriptions and Agents lets a user view and edit every fleet row, including max_sessions, with the same conflict handling as the other dialogs.
Acceptance Criteria
- Manage > Fleet… opens a dialog with Machines, Subscriptions and Agents tabs, each loaded from its
GETlist. Every row shows itssource(configorapi) so a user knows whether the file or the API owns it. - Machines: edit
maxSessions(a number field, 0–64, with a short note that 0 starts none there),tailnetIp,osandcapabilities. A machine can be added. The machine name is lower casea-z,0-9and-. - Subscriptions: add and edit
provider,planandmetered. The id follows the same name rule. - Agents: add and edit
model,subscription(a picker over existing subscriptions),rolesandenabled. The id is built from a machine picker, a provider and an alias, and is read-only after creation. A quick Enable and Disable toggle sits in the row. - Capabilities and roles are free lower-case words with
_, since pmd has no fixed list. The editor suggests the values in use now (linux,windows,apple,browser,computer_use;implement,review,research) and accepts new ones. - No delete action appears anywhere. The UI offers Disable for agents and
maxSessions0 for machines. - Save sends the full row with
If-Match(edit) orIf-None-Match: *(create). Unchanged saves are blocked in the UI, and pmd's no-opPUTresult is handled without error. -
409 stale_versionre-reads the row and shows "Changed elsewhere" with the user's edits next to the new values, with Reapply and Discard.409 already_existsshows on the id field. -
400 unknown_machine,400 unknown_subscriptionand other400codes show on the named field. Client-side checks catch the same cases first. - A create that times out is verified with
GETbefore the dialog offers another attempt. - A short note on a row whose
sourceisconfigsays that saving makes it API-owned and the config file stops updating it. - Keyboard: tabs switch with Left and Right, rows with Up and Down, Enter edits, Ctrl+Enter saves, Esc closes with the unsaved-edit confirm. Tab order follows the visual order.
- Without
write:fleet, the dialog is read-only and names the missing scope.
Definition of Done
- Fleet types, validation and the full-row
PUTbuilder live indashboard-corewith unit tests, including a stub server for every status in the pmd table above. - UI tests cover each tab,
maxSessionsedit, agent enable and disable, create, the conflict flow and the read-only state. - README "Usage" documents the dialog.
-
cargo fmt --all --check,cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test --workspace --lockedpass. - The PR is reviewed and links this issue with
Closes #n.
Validation
- Run
cargo test --workspace --lockedand expect all new tests to pass. - Against a local
pmd serve --config testdata/config.tomlwith aread,write:fleettoken, change a machine'smaxSessionsfrom 3 to 2, confirmGET /v1/machines/{name}shows 2 andsource: api, and confirm a pmd restart keeps 2. - Disable an agent in the dialog and confirm
enabled: falsefrom the API. - Change a row with
curl -X PUTafter opening the dialog, then save in the dialog and confirm the conflict state. - The PR embeds current-head screenshots in its
## Validationsection, rendered with the headless capture test and uploaded as GitHub attachments. The states are: Machines tab,maxSessionsedit, Subscriptions tab, Agents tab with an agent toggle, an Add agent form with an unknown-subscription error, the stale-version conflict, the config-source note, and the read-only state. Capture at the default window size and at 150% zoom. Add an inline recording of amaxSessionschange, or state why it is omitted. - Keyboard-only editing is shown by the recording or UI tests. No manual screen-reader pass is required.
Activity
fix: keep fleet controls in step with the lists, and finish a found c…
refactor: retry a fleet list through reload_fleet
fix: guard fleet writes against a timeout check, dotted ids and old l…
fix: reconcile a timed-out fleet create even after its editor closed
fix: a late fleet write answer never undoes a newer row
fix: address the cross-model review of the Fleet dialog
HemSoft commentedon Oct 27, 2026
Released in v0.6.0 (Release run 40508104841:
windowsandpublishpassed; tag one7612ae). The Chief installs it on home.project-dashboard-0.6.0-windows-x64.zip: SHA-256c4c438a8abdf1ea0dcd8864d5d0c1bdddf80ceb1c70e93a08fbc57c42f92674a, matching the published.sha256.project-dashboard-0.6.0-windows-x64.zip.sha256project-dashboard.exeinside the zip: SHA-256896ea7f912cd5519e1f517837bac2676cf39ebb2ea9d09934802bd7945e2f3ad.The live
pmd servevalidation steps weren't run, since I didn't write to the production pmd. The write contract is covered by stub-server tests.