feat(cockpit): QUEUED placeholders for not-yet-spawned reviewers#2
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: whenrounds = []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 typecheckcleanpnpm test628/628 green (5 new intests/enrich-rounds.test.ts)