Repository navigation
Description
This was generated by AI during triage.
Found while comparing the Console with the #711 prototype for #917. On https://console.thirdshift.app/?page=stages, a repository's Stages table lists Architecture review, CI watch, Repair, Security review and Self-merge first, then cleanup, implement and pull request. That's byte order: capitalised names sort before lowercase ones. So implement shows below Self-merge, and the table reads out of order.
Confirmed in source: the grid's row names are gathered into a BTreeSet<String> of every stage name the repository's Runs recorded, and its iteration order becomes the row order.
Agent Brief
Category: bug
Summary: The Stages page orders stage rows alphabetically instead of in the order a Run goes through them
Current behavior:
Each repository's Stages grid takes its rows from the set of stage names its Runs recorded, sorted as strings. Rows come out as Architecture review, CI watch, Repair, Security review, Self-merge, cleanup, implement, pull request.
Desired behavior:
Rows follow the order a Run goes through its stages, the order StageName declares them: implement, Resume, Security review, pull request, CI watch, Repair, Self-merge, cleanup. Then come the stages of other Command kinds (Architecture review, Tickets, Spec review, the Security stages, dispatched Run / dispatched Spec run) in that enum's order.
Command records keep stage names as tolerant strings. A name thirdshift doesn't know, for example one from a newer or older release, still gets its row, after every known stage. Two unknown names keep a stable order between them.
Key interfaces:
StageName(the Command record's typed stage names) and itsname()strings are the single source of the order. Don't keep a second list that can drift.- The Stages grid builder that produces each repository's
GridRows. Only the order of rows changes, not their contents or Usual ranges.
Acceptance criteria:
- A repository whose Runs recorded implement, pull request, CI watch, Repair, Self-merge and cleanup shows those rows in exactly that order.
- A stage name not in
StageNameappears after every known stage, and the page still renders. - A test covers both cases, using Command records with mixed-case stage names.
- Any other view built from the same grid shows the same order, since the Console's views have CLI equivalents.
Out of scope:
- The grid's layout: splitting tables every 3 Runs, shading, and pinning live Runs. Those belong to make thirdshift console web ui more like prototype variant=console&page=inbox #917.
- Renaming or recasing stage names, such as making
implementcapitalised. - Lanes and Waterfall.
Activity