webui(workflows): sidebar running count and last status come from the newest 100 tasks #1083

Closed
opened 2026-10-27 13:38:57 +00:00 by sam · 0 comments
Owner

The workflows sidebar derives each workflow's running count and last status from the newest 100 tasks across all workflows, so a quiet workflow shows nothing. Use the per-workflow task filter (GET /api/tasks?workflow=) or a summary query. Done when a workflow whose runs are all older than the newest 100 tasks shows its real status.

Close reason

The workflows sidebar no longer derives a workflow's state from the newest 100 global tasks. WorkflowStats now carries running (COUNT FILTER status='running') and last_status (newest row's status by id) in the SQL, the state contract, storecontract and staterpc mapping, so GET /api/workflows answers per workflow; WorkflowsPage drops the global api.tasks call and reads row.running/row.last_status. Verified the query and its semantics against the dev PostgreSQL 18: a quiet workflow with an old merged run plus a newer running one reports running=1/last_status=running while a stale one reports its newest status, and test-source rows stay excluded.


Imported from beads archie-core-5e2ai · GitHub #1630 · type bug · priority P2 · created 2026-10-11 · closed 2026-10-26

The workflows sidebar derives each workflow's running count and last status from the newest 100 tasks across all workflows, so a quiet workflow shows nothing. Use the per-workflow task filter (GET /api/tasks?workflow=) or a summary query. Done when a workflow whose runs are all older than the newest 100 tasks shows its real status. ### Close reason The workflows sidebar no longer derives a workflow's state from the newest 100 global tasks. WorkflowStats now carries running (COUNT FILTER status='running') and last_status (newest row's status by id) in the SQL, the state contract, storecontract and staterpc mapping, so GET /api/workflows answers per workflow; WorkflowsPage drops the global api.tasks call and reads row.running/row.last_status. Verified the query and its semantics against the dev PostgreSQL 18: a quiet workflow with an old merged run plus a newer running one reports running=1/last_status=running while a stale one reports its newest status, and test-source rows stay excluded. --- _Imported from beads `archie-core-5e2ai` · GitHub #1630 · type bug · priority P2 · created 2026-10-11 · closed 2026-10-26_
sam added the mediumbug labels 2026-10-27 13:38:57 +00:00
sam self-assigned this 2026-10-27 13:38:57 +00:00
sam closed this issue 2026-10-27 13:38:57 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1083