The dashboard has no served count for what needs attention #2145

Closed
opened 2026-11-27 08:04:15 +00:00 by sam · 1 comment
Owner

Why: the section crumb's attention badge counted the task board's summary (GET /api/summary), which the single binary does not serve, so #2121 removed the badge with the board. Nothing now shows, on every page, how much work waits on a person; the dashboard home lists it but the shell does not count it.

Done when: the conformance test in ui/test/api-paths.test.ts stays clean and the shell shows a count of what needs a person, read from an operation the binary serves (GET /api/approvals pending and GET /api/runs parked), refreshing without a full page load.

**Why**: the section crumb's attention badge counted the task board's summary (`GET /api/summary`), which the single binary does not serve, so #2121 removed the badge with the board. Nothing now shows, on every page, how much work waits on a person; the dashboard home lists it but the shell does not count it. **Done when**: the conformance test in `ui/test/api-paths.test.ts` stays clean and the shell shows a count of what needs a person, read from an operation the binary serves (`GET /api/approvals` pending and `GET /api/runs` parked), refreshing without a full page load.
sam added the bug label 2026-11-27 08:04:27 +00:00
sam added the medium label 2026-11-27 08:04:41 +00:00
Author
Owner

Fixed in 61d486fdc.

The badge counts the two operations that answer it: pending approval requests (GET /api/approvals, state pending) and runs a step parked (GET /api/runs, state parked). The rule is ui/src/lib/needs-attention.ts (waitsOnPerson, needsAttention), which the dashboard's Needs attention card now filters with too, so the badge and the list cannot disagree about what waiting means. ui/src/stores/attention.ts holds the count and refreshes on the live stream and every five seconds, as the old badge did.

Verified in a browser against the dev server with a mocked signed-in session and two pending approvals plus one parked run: the section crumb renders a badge reading "3", with the accessible label "3 need attention", and the Dashboard entry in the dropdown carries the same count.

TestNeedsAttention covers the rule (pending versus approved, parked versus running) and that nothing reported reads as zero, so an unreachable server is not claimed as "nothing waiting". task check passes on a clean worktree at the commit.

Fixed in 61d486fdc. The badge counts the two operations that answer it: pending approval requests (`GET /api/approvals`, state `pending`) and runs a step parked (`GET /api/runs`, state `parked`). The rule is `ui/src/lib/needs-attention.ts` (`waitsOnPerson`, `needsAttention`), which the dashboard's Needs attention card now filters with too, so the badge and the list cannot disagree about what waiting means. `ui/src/stores/attention.ts` holds the count and refreshes on the live stream and every five seconds, as the old badge did. Verified in a browser against the dev server with a mocked signed-in session and two pending approvals plus one parked run: the section crumb renders a badge reading "3", with the accessible label "3 need attention", and the Dashboard entry in the dropdown carries the same count. `TestNeedsAttention` covers the rule (pending versus approved, parked versus running) and that nothing reported reads as zero, so an unreachable server is not claimed as "nothing waiting". `task check` passes on a clean worktree at the commit.
sam closed this issue 2026-11-27 08:38:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2145