Description
Description
The dashboard shows pmd's project priority in its Priority column (#24) and matches rows to pmd projects by the full owner/name of each checkout's origin. It cannot change either side. To track a repo, someone edits PORTFOLIO.md on mini and waits for pmd's import, and to show a repo the user edits repositories in config.toml by hand.
This issue adds a Projects dialog under the Manage menu from #33. It depends on project-manager#50, because pmd has no project write endpoint today. GET /v1/projects?all=1 is the only project call that exists.
Why
Franz wants to add and manage projects and their priorities without leaving the dashboard. Priority decides what the Chief works on next, so changing it should take a few clicks and be visible in the table right away.
Goal
From one dialog, a user can see every pmd project, track a new repo, edit a project's details, set P0–P5, untrack it, and link it to a local checkout so the dashboard shows it.
Decision for Franz: source of truth for priority
PORTFOLIO.md is the current source (design.md decision 3). Proposed in project-manager#50, and recommended there, is Option A. PORTFOLIO.md keeps seeding tiers. A priority set from this dialog is an override that the import never overwrites, and Reset to PORTFOLIO.md removes it. Options B (PORTFOLIO.md only, so this dialog cannot set priority) and C (the API becomes the source) are described in that issue.
This issue is written for Option A. If Franz picks B, drop the priority editing and the add, edit and untrack parts, and keep the read-only list and the checkout link. If he picks C, the dialog is the same but the "Reset" action and the source badge go away.
Acceptance Criteria
- Manage > Projects… opens a dialog listing all projects from
GET /v1/projects?all=1: slug,owner/name, effective priority asP0toP5or—, whether it is overridden, tracked or untracked, and whether a configured local checkout matches it. - The list sorts by priority then slug and filters by text. Untracked projects are hidden behind a Show untracked toggle.
- Add project takes
owner/name, slug (defaults to the repo name, lower case), priority, goal, notes andrequires. It sendsPUTwithIf-None-Match: *. pmd'sunknown_repo,repo_not_installedandalready_existserrors show against the repo field and the slug field. - Edit changes priority (a P0–P5 picker), goal, notes,
requiresand tracked. It sendsPUTwithIf-Matchset to the row'sversion. - Reset to PORTFOLIO.md sends
priority: null, is offered only when the row is overridden, and shows the tier it falls back to. - Untrack asks for confirmation, states that data is kept and the project can be tracked again, and sends
tracked: false. There is no delete. - A priority picker change needs an explicit Save. Nothing writes on selection alone.
- Conflict handling follows #33. On
409 stale_versionthe dialog re-reads the project, shows the user's edits beside the new values, and offers Reapply or Discard. Validation errors from pmd show on the named field. - A project with no matching checkout offers Link checkout, a folder picker or path field. The dialog checks the folder's origin matches
owner/nameusing the existing identity rules, then appends it torepositoriesinconfig.toml. A mismatch shows the origin it found and writes nothing. - After a save, the main table's Priority column and rows update without a manual refresh.
- Keyboard: Tab order follows the visual order (filter, list, actions, form), arrows move through the list, Enter opens Edit, Delete is not bound, and Esc closes with the unsaved-edit confirm from Add a Manage menu, modal dialog frame and write-token support #33.
- Without a write token or the project write scope, the list still opens read-only and the write controls are disabled with the reason.
Definition of Done
- Request and response types, validation and the checkout-link logic live in
dashboard-corewith unit tests, including the stub-server cases foralready_exists,stale_version,unknown_repoand a priority reset. - UI tests cover list, filter, add, edit, untrack, reset, link checkout and the read-only state.
- README "Usage" documents the dialog and the source-of-truth behavior that was chosen.
-
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 servewith aread,write:projectstoken, add a project, change it to P0, confirm the main table showsP0without pressing F5, reset it, and confirm the PORTFOLIO.md tier returns. - Edit the same project in
curlbetween opening the dialog and saving, and confirm the conflict state appears and no write happens. - The PR embeds current-head screenshots in its
## Validationsection, rendered with the headless capture test and uploaded as GitHub attachments. The states are: project list, list with the untracked toggle on, Add form with a validation error, Edit with the priority picker open, the Reset action on an overridden project, the untrack confirm, the stale-version conflict, Link checkout with a mismatch, and the read-only state with no write token. Capture at the default window size and at 150% zoom. Add an inline recording of add, set priority and see the table change, or state why it is omitted. - Keyboard-only add and edit is shown by the recording or by UI tests. No manual screen-reader pass is required.
Activity
HemSoft commentedon Oct 26, 2026
Decision (Franz, 2026-10-26 18:48 ET): "The priority should definitely live with the projects table." → Option C: pmd's
projectstable is the source of truth for project priority. Implications for this work:import-portfoliomust no longer overwrite them.scripts/pm.py), not from PORTFOLIO.md.For this issue: keep the P0–P5 editor; drop the "Reset to PORTFOLIO.md" override UI from option A.
fix: reconcile timed-out project creates, settle stale errors, keep o…
test: check a linked checkout's indent however the platform quotes it
HemSoft commentedon Oct 27, 2026
Released in v0.7.0 (Release run 40511867973:
windowsandpublishpassed; tag ond176389), following option C (pmd's projects table owns priority; there's no reset UI). The Chief installs it on home.project-dashboard-0.7.0-windows-x64.zip: SHA-2561e778358073d80e97d10523093eb690ce390993cfe67fdd53a346a683bfebf58, matching the published.sha256.project-dashboard-0.7.0-windows-x64.zip.sha256project-dashboard.exeinside the zip: SHA-2569727e76d60994d832a825bc52fca75db904961d0be3c35885d4e9744f57e889d.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.