Skip to content

feat(cockpit): QUEUED placeholders for not-yet-spawned reviewers#2

Merged
chorus-codes merged 1 commit into
mainfrom
feat/queued-reviewer-cards
May 8, 2026
Merged

feat(cockpit): QUEUED placeholders for not-yet-spawned reviewers#2
chorus-codes merged 1 commit into
mainfrom
feat/queued-reviewer-cards

Conversation

@chorus-codes
Copy link
Copy Markdown
Owner

Summary

When a chat fires with more reviewers than the daemon-wide CLI semaphore (chorus-102) can spawn at once, the run page used to show zero cards until the first reviewer's dir landed on disk. Then all placeholders appeared together.

User-reported as: "I have 8 reviewers in Review Only, but I only see 5 cards" → "they show up one by one" → "we should show the cards and say they are queued, otherwise it confuses users".

Three-line fix in enrichRounds: when rounds = [] and a template is provided, seed a synthetic empty round-1 so the existing slot-iteration loop runs and emits QUEUED placeholders for every expected reviewer slot from t=0.

Self-review

Chorus chat 019E0608 — 8/8 reviewers approved, no blocking findings.

Test plan

  • pnpm typecheck clean
  • pnpm test 628/628 green (5 new in tests/enrich-rounds.test.ts)
  • Live-tested by restarting daemon + cockpit and watching a fresh review run

When a chat fires, the daemon-wide CLI semaphore (chorus-102) only
spawns N reviewers concurrently. The run-page server loader walks the
chat dir to build initialRounds, but if no reviewer dirs exist yet,
rounds = [] — and enrichRounds' .map() over [] returns []. Result:
zero cards on the run page until the first reviewer dir lands, then
all placeholders appear at once for the not-yet-spawned slots.

User report 2026-05-08: "I have 8 reviewers in Review Only, but I
only see 5 cards" → "they show up one by one" → "we should show the
cards and say they are queued, otherwise it confuses users".

Three-line fix: when rounds is empty AND template is provided, seed a
synthetic { round: 1, participants: [] } before the .map() runs. The
existing slot-iteration loop then synthesises a QUEUED placeholder for
every expected reviewer slot from t=0. Once real reviewer dirs start
landing, the SSE event handler updates rounds state and the matching
loop replaces placeholders with real data slot-by-slot.

The placeholder rendering path (pending: true → state: 'pending' →
QUEUED badge in state-badge.tsx) was already wired — this just makes
sure the seed loop runs when the disk has nothing yet.

Self-review (chorus chat 019E0608): 8/8 reviewers approved, no
blocking findings.

628/628 tests green; pnpm typecheck clean.
@chorus-codes chorus-codes merged commit 53e8fb6 into main May 8, 2026
2 checks passed
@chorus-codes chorus-codes deleted the feat/queued-reviewer-cards branch May 8, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant