fix(board): running cards land in impl under group=stage #577

Merged
charles merged 2 commits from fix/board-pivot-running-cards into main 2026-04-30 19:24:36 +00:00
Collaborator

Summary

cardBoardStage in apps/web/src/components/board/pivot-logic.ts only consulted the stage:* label. Cards without one (every freshly assigned issue that has not been manually drag-restaged) fell through to triage. Running tasks dispatched via the regular issues.assigned webhook are precisely that case — area:dashboard + type:user-story arrives without a stage:* label, so the four agents the operator just kicked off rendered in the Triage column instead of Implementation.

The fix falls back to card.stage (already populated server-side from status via deriveStage in apps/server/src/domain/views/board.ts:397) before defaulting to triage. The stage:* label still wins so manual drag-restages remain sticky.

Test plan

  • bun x vitest run src/components/board/board.test.tsx — 41 pass.
  • Live: ?group=stage shows the four currently-running R1 issues (#565, #569, #570, #571) under Implementation, not Triage.

🤖 Generated with Claude Code

## Summary `cardBoardStage` in `apps/web/src/components/board/pivot-logic.ts` only consulted the `stage:*` label. Cards without one (every freshly assigned issue that has not been manually drag-restaged) fell through to `triage`. Running tasks dispatched via the regular `issues.assigned` webhook are precisely that case — `area:dashboard + type:user-story` arrives without a `stage:*` label, so the four agents the operator just kicked off rendered in the **Triage** column instead of **Implementation**. The fix falls back to `card.stage` (already populated server-side from `status` via `deriveStage` in `apps/server/src/domain/views/board.ts:397`) before defaulting to `triage`. The `stage:*` label still wins so manual drag-restages remain sticky. ## Test plan - [x] `bun x vitest run src/components/board/board.test.tsx` — 41 pass. - [ ] Live: `?group=stage` shows the four currently-running R1 issues (#565, #569, #570, #571) under Implementation, not Triage. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(board): running cards land in impl under group=stage
All checks were successful
qa / dockerfile (pull_request) Successful in 7s
qa / qa (pull_request) Successful in 1m46s
31eddb92b6
`cardBoardStage` only consulted the `stage:*` label; cards without one
(any freshly assigned issue that has not been manually restaged) fell
through to `triage`. Running tasks dispatched via the regular
`issues.assigned` flow are precisely that case — `area:dashboard +
type:user-story` arrives without `stage:*`, so the four agents the
operator just kicked off rendered in the Triage column instead of
Implementation.

Fall back to `card.stage` (already populated server-side from the
card's `status` via `deriveStage`) before defaulting to `triage`. The
`stage:*` label still wins so manual drag-restages stay sticky.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reviewer left a comment
  • test-gap apps/web/src/components/board/board.test.tsx — The new card.stage fallback path (priority 2 in the updated JSDoc) has no coverage. All cards in pivotFixture() carry explicit stage:* labels, so the fix line (if (STAGE_SET.has(card.stage)) return card.stage) can be deleted and all 41 tests still pass. Add a test case: a card with stage: "impl" and labels: [] (no stage:* entry) that verifies it lands in board-column-stage:impl, not board-column-stage:triage. One test in the existing describe("Board group-by pivot", ...) block is enough.
- **test-gap** `apps/web/src/components/board/board.test.tsx` — The new `card.stage` fallback path (priority 2 in the updated JSDoc) has no coverage. All cards in `pivotFixture()` carry explicit `stage:*` labels, so the fix line (`if (STAGE_SET.has(card.stage)) return card.stage`) can be deleted and all 41 tests still pass. Add a test case: a card with `stage: "impl"` and `labels: []` (no `stage:*` entry) that verifies it lands in `board-column-stage:impl`, not `board-column-stage:triage`. One test in the existing `describe("Board group-by pivot", ...)` block is enough.
test(board): cover the card.stage fallback path in pivot logic
All checks were successful
qa / dockerfile (pull_request) Successful in 5s
qa / qa (pull_request) Successful in 13m50s
536958bf73
Reviewer flagged on PR #577: the new `if (STAGE_SET.has(card.stage))
return card.stage` line had no test coverage — every card in
`pivotFixture()` already carries an explicit `stage:*` label, so the
fallback could be removed and the suite would still pass.

Add a regression test seeded with a single running card whose labels
are `["type:user-story", "area:dashboard"]` (no `stage:*`) and whose
server-populated `card.stage = "impl"`. Verifies it lands in the
`impl` column under `group=stage`, not `triage`. Confirmed by
deleting the fallback line — the new test fails (the existing 41
still pass), restored on the fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
Collaborator

Addressed in 536958b.

Added a card.stage fallback regression test in the existing Board group-by pivot describe block: a single running card with labels: ["type:user-story", "area:dashboard"] (no stage:*) and card.stage = "impl" must land in board-column-stage:impl, not triage.

Verified the test guards the fix: removing the if (STAGE_SET.has(card.stage)) return card.stage line on a clean tree fails this new test (the original 41 still pass). Restored on the fix and the suite is back to 42/42.

Addressed in 536958b. Added a `card.stage` fallback regression test in the existing `Board group-by pivot` describe block: a single running card with `labels: ["type:user-story", "area:dashboard"]` (no `stage:*`) and `card.stage = "impl"` must land in `board-column-stage:impl`, not `triage`. Verified the test guards the fix: removing the `if (STAGE_SET.has(card.stage)) return card.stage` line on a clean tree fails this new test (the original 41 still pass). Restored on the fix and the suite is back to 42/42.
charles deleted branch fix/board-pivot-running-cards 2026-04-30 19:24:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!577
No description provided.