Skip to content

[Bugfix #931] dashboard: map dev-approval gate to attention-kind--dev#935

Merged
waleedkadous merged 10 commits into
mainfrom
builder/bugfix-931
May 30, 2026
Merged

[Bugfix #931] dashboard: map dev-approval gate to attention-kind--dev#935
waleedkadous merged 10 commits into
mainfrom
builder/bugfix-931

Conversation

@waleedkadous

@waleedkadous waleedkadous commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #931

PIR dev-approval gate rows in the dashboard's Needs Attention list rendered with the plan gate's color instead of their own, because gateKindClass had no case for the dev review label.

Root Cause

GATE_LABELS in packages/codev/src/agent-farm/servers/overview.ts maps dev-approval → 'dev review', and the overview server stamps that label onto OverviewBuilder.blocked. But gateKindClass in packages/dashboard/src/components/NeedsAttentionList.tsx had no case 'dev review', so the label fell through to default: 'attention-kind--plan' — every PIR dev-approval row got the plan styling.

The switch also carried a dead case 'code review' returning attention-kind--code-review: no GATE_LABELS value is 'code review' (verified by grep across the repo), so that case (and its CSS rule) matched nothing.

Fix

  • NeedsAttentionList.tsx: replace the dead case 'code review' with case 'dev review': return 'attention-kind--dev';.
  • index.css: add .attention-kind--dev using var(--status-implementing) (orange) and remove the orphaned .attention-kind--code-review rule + its stale comment reference.
    • Color rationale: dev-approval is PIR's gate at the end of the implement phase (the human reviews the running worktree before the PR exists). Orange "implementing" is semantically apt and makes dev rows visually distinct from the red spec/plan design gates and the yellow PR/verify review waits — a 3-tier design → implement → review progression. (An earlier revision used --status-error, which left dev rows the same red as plan rows; the CMAP review correctly flagged that as not actually resolving the visible symptom.)

Dashboard-only. No behavior change beyond the row color.

Test Plan

  • Added regression test (NeedsAttentionList.test.tsx): a dev-approval-pending builder yields kindClass === 'attention-kind--dev' and !== 'attention-kind--plan'. Fails pre-fix (would be attention-kind--plan).
  • NeedsAttentionList suite passes (14/14).
  • Dashboard typecheck clean (tsc --noEmit -p tsconfig.app.json).
  • porch check build + tests pass.

Net Diff

~45 LOC across 3 files — well under the 300 BUGFIX threshold.

CMAP Review (3-way)

Model Verdict Notes
Claude ✅ APPROVE (HIGH) "Clean, well-scoped fix … solid regression test"; endorsed the 3-tier color hierarchy.
Codex ✅ APPROVE (HIGH) Initially REQUEST_CHANGES — correctly caught that --dev mapped to var(--status-error), identical to plan, so the visible symptom wasn't resolved. Addressed by switching to var(--status-implementing) + strengthening the test; re-review flipped to APPROVE.
Gemini ⚠️ blind APPROVE Could not read the diff: Path not in workspace (consult wrote the diff to /tmp/..., outside Gemini's sandbox ~/.gemini/tmp/bugfix-931). Environmental consult/Gemini-lane issue, not a real review — see note below.

Notes for the architect (out of scope, not touched)

  1. Pre-existing unrelated test failure: __tests__/scrollController.test.ts > … > warns on unexpected scroll-to-top (Issue #630) fails consistently (3/3 runs) on this branch and is unrelated to dashboard: gateKindClass missing 'dev review' case — dev-approval rows fall back to --plan styling #931 (terminal scroll behavior; imports nothing from the attention-row path — looks like a stale test where the prod code no longer emits that warning). Left untouched per the BUGFIX "unrelated failures are out of scope" rule. It's outside porch's tests check scope (which passes). Worth a separate issue.
  2. Gemini consult lane: the Gemini reviewer can't read the PR diff because consult writes it under /tmp/..., outside Gemini's allowed workspace. Reproduced across multiple runs. This is the consult tooling, not this PR.

GATE_LABELS maps dev-approval -> 'dev review' (overview.ts), but
gateKindClass in NeedsAttentionList.tsx had no 'dev review' case, so PIR
dev-approval gate rows fell through to default 'attention-kind--plan' and
rendered with the plan color. Add the 'dev review' case + a
.attention-kind--dev CSS rule (grouped with the urgent pre-PR error gates,
matching spec/plan). Remove the dead 'code review' case and its orphaned
CSS rule (no GATE_LABELS value maps to it).
Asserts a dev-approval-pending builder yields kindClass
'attention-kind--dev'. Fails pre-fix (default 'attention-kind--plan').
Codex CMAP review (REQUEST_CHANGES) correctly noted that mapping
.attention-kind--dev to var(--status-error) left dev rows visually
identical to plan rows (both red) — so the user-visible symptom of #931
('renders with the plan color instead of their own') was not actually
resolved by the class rename alone.

Use var(--status-implementing) (orange) instead: dev-approval is PIR's
gate at the end of the implement phase, so the orange 'implementing' color
is semantically apt and makes dev rows distinct from the red spec/plan
design gates and the yellow PR/verify review waits (3-tier design ->
implement -> review progression). Strengthen the regression test to assert
dev never maps to the plan class.
@waleedkadous waleedkadous merged commit e0a21b2 into main May 30, 2026
6 checks passed
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.

dashboard: gateKindClass missing 'dev review' case — dev-approval rows fall back to --plan styling

1 participant