Skip to content

Add a Work items dialog to override status, priority and rank #35

Closed

Description

@HemSoft

Description

The dashboard lists a project's open work and shows the Board columns read from pmd (#31), but treats work items as display-only. pmd now lets a writer override a work item's status, status reason, priority and rank with PATCH /v1/work/{id} and a write:work token (project-manager#48, Write API). Nothing calls it from the UI.

The patch rules the dialog must respect:

  • If-Match: <version> is required. GitHub changes also bump version, so a write can lose a race with a sweep or webhook and get 409 stale_version.
  • status is ready, in_progress, waiting_on_franz, blocked or auto. done only comes from GitHub, and a closed or merged item returns 409 item_closed.
  • statusReason is at most 500 characters and is only valid on a manual status.
  • priority is 0–5, or null to inherit the project's. rank is an integer within ±1e9, lower first within a priority.

This issue adds a Work items dialog under the Manage menu from #33.

Why

Franz wants to reprioritize and unblock work from the dashboard. Moving an item to Blocked with a reason, or raising one to P0, currently takes a curl command with the right version number, which nobody will do mid-day.

Goal

A user can find a work item, change its status, reason, priority and rank from one dialog, and recover cleanly when pmd says someone else changed it first.

Acceptance Criteria

  • Manage > Work items… opens a dialog that lists items from GET /v1/work with filters for project, status, kind and max priority, using nextCursor paging. Each row shows project, #number and title, kind, status with its source (auto or manual), the effective priority and whether it is overridden, and rank.
  • Selecting an item opens an editor with: a status picker (ready, in_progress, waiting_on_franz, blocked, and Back to automatic), a reason field limited to 500 characters with a live counter, a priority picker (P0–P5 plus Inherit project priority), and a rank number field.
  • The reason field is disabled for an automatic status. Choosing a status without a reason clears the existing reason, and the editor says so before Save.
  • Save sends only changed fields in PATCH /v1/work/{id} with If-Match set to the loaded version. Save is disabled when nothing changed. On success the row and the main Board update from the response.
  • 409 stale_version re-reads the item, shows "Changed elsewhere" with the user's edits next to the new values, and offers Reapply (using the new version) or Discard.
  • 409 item_closed explains that the item closed on GitHub, refreshes it, and removes the editable controls.
  • 400 errors show on the field pmd names, such as an over-long reason or a rank out of range. A client-side check catches the same cases before sending.
  • 428 precondition_required cannot happen from the UI. If it does, the dialog treats it as a bug and shows a clear error without retrying.
  • A rank or priority change refetches the list from the first page, because pmd warns that paging in progress can skip or repeat items.
  • Keyboard: filter fields, list, editor and buttons are reachable in visual order. Up and Down move through the list, Enter opens the editor, Ctrl+Enter saves, Esc closes with the unsaved-edit confirm.
  • Without write:work, the list and editor are read-only and say which scope is missing.

Definition of Done

  • The patch builder (changed-field diff, validation, If-Match handling) lives in dashboard-core with unit tests, including a stub server for 400, 404, 409 stale_version, 409 item_closed, 413 and 428.
  • UI tests cover filters, paging, each field edit, the conflict flow and the read-only state.
  • README "Usage" documents the dialog.
  • cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked pass.
  • The PR is reviewed and links this issue with Closes #n.

Validation

  • Run cargo test --workspace --locked and expect all new tests to pass.
  • Against a local pmd serve with a read,write:work token, set an item to Blocked with a reason, confirm it appears in the Board's Blocked column, then choose Back to automatic and confirm the reason clears.
  • Open the editor, change the same item with curl -X PATCH using its current version, then save in the dialog and confirm the conflict state appears with both sets of values.
  • The PR embeds current-head screenshots in its ## Validation section, rendered with the headless capture test and uploaded as GitHub attachments. The states are: filtered list, editor on an automatic item, editor with a manual blocked item and reason counter, the Inherit priority option, a field validation error, the stale-version conflict, the closed-item state, and the read-only state. Capture at the default window size and at 150% zoom. Add an inline recording of a status change reaching the Board, 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

  1. HemSoft commented on Oct 27, 2026

    @HemSoft
    ContributorAuthor

    Released in v0.6.0 (Release run 40508104841: windows and publish passed; tag on e7612ae). The Chief installs it on home.

    • project-dashboard-0.6.0-windows-x64.zip: SHA-256 c4c438a8abdf1ea0dcd8864d5d0c1bdddf80ceb1c70e93a08fbc57c42f92674a, matching the published .sha256.
    • project-dashboard-0.6.0-windows-x64.zip.sha256
    • project-dashboard.exe inside the zip: SHA-256 896ea7f912cd5519e1f517837bac2676cf39ebb2ea9d09934802bd7945e2f3ad.

    The live pmd serve validation steps weren't run, since I didn't write to the production pmd. The write contract is covered by stub-server tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions