Skip to content

The Stages page orders stages alphabetically instead of in the order a Run goes through them #1105

Closed

Description

@JacobStephens2

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 its name() 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 StageName appears 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:

Activity

  1. added
    bug
    ready-for-agent
    in-progress
    and removed
    ready-for-agent
    on Oct 22, 2026
  2. removed
    in-progress
    on Oct 23, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions