Parent
Part of #204 (Phase 4: Hardening)
Problem
Agent cards on both the town overview page and rig detail page are not sorted by status. Active (working) agents appear in arbitrary order alongside idle and exited agents. When a town has 10+ agents, finding the ones currently doing work requires scanning the entire list.
Solution
Sort agent cards by status with active agents at the top:
working — currently processing a bead
starting — being dispatched
idle — available for work
exited / failed — terminal states at the bottom
Within each status group, sort by last_activity_at descending (most recently active first).
Acceptance Criteria
Notes
- No data migration needed
- This can be done client-side (sort the query results before rendering) or server-side (ORDER BY in the query). Client-side is simpler since the data is already fetched.
Parent
Part of #204 (Phase 4: Hardening)
Problem
Agent cards on both the town overview page and rig detail page are not sorted by status. Active (working) agents appear in arbitrary order alongside idle and exited agents. When a town has 10+ agents, finding the ones currently doing work requires scanning the entire list.
Solution
Sort agent cards by status with active agents at the top:
working— currently processing a beadstarting— being dispatchedidle— available for workexited/failed— terminal states at the bottomWithin each status group, sort by
last_activity_atdescending (most recently active first).Acceptance Criteria
last_activity_atdescending within each status groupNotes