fix(agent-manager): color PR badge by state, show checks as icon#11785
Conversation
| > | ||
| <Icon name={pr().review === "approved" ? "check-small" : "branch"} size="small" /> | ||
| <span class="am-pr-badge" style={{ "--pr-accent": accent() }} onClick={handleOpenPR}> | ||
| <Switch fallback={<Icon name="branch" size="small" />}> |
There was a problem hiding this comment.
WARNING: Terminal PRs still render a status icon
prBadgeIndicator() returns "none" for merged and closed PRs, but this Switch falls back to the neutral branch icon. That means terminal badges still render a leading glyph even though the new contract says merged/closed PRs should show no status icon. Consider handling "none" explicitly and rendering nothing for that case.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| <div style={{ "max-height": "560px", overflow: "auto" }}> | ||
| <DndWrap> | ||
| <SectionHeader section={sec("s1", 0, { name: "In Review", color: "Blue" })} count={3} {...sectionProps}> | ||
| <SectionHeader section={sec("s1", 0, { name: "In Review", color: "Blue" })} count={8} {...sectionProps}> |
There was a problem hiding this comment.
SUGGESTION: Story count no longer matches the rendered badge states
This header count was changed to 8, but the story below renders seven WorktreeItems and the PR description also describes seven states. Leaving it at 8 makes the visual-regression fixture and generated screenshot show a mismatched section count.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Previous Review Summaries (2 snapshots, latest commit f9a977d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f9a977d)Status: 2 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Previous review (commit 9993f99)Status: 2 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Reviewed by gpt-5.4-2026-03-05 · Input: 44.5K · Output: 3.9K · Cached: 103.9K Review guidance: REVIEW.md from base branch |
Badge color now reflects only the PR lifecycle state (open/draft/merged/closed), so a failing check is no longer mistaken for a closed PR. CI and review results are shown as a separate icon (failing checks, changes requested, approved), and an open PR whose checks are still running keeps its pulsing amber badge.
9993f99 to
5e22a7b
Compare
fix(agent-manager): color PR badge by state, show checks as icon
Problem
In Agent Manager, the PR badge on each worktree card uses color to encode several unrelated signals at once. A merged PR is purple, an open PR is green, a closed PR is red, but a failing CI check also turns the badge red. Because red is established as the "closed" color, a card with failing tests reads as a closed PR. The PR's lifecycle state and its CI status are two independent things being collapsed onto one color channel.
Change
Split the signals so the badge color means one thing and CI/review status is shown separately:
✗(circle-x)A failing open PR is now a green badge with a red ✗, clearly distinct from a red closed-PR badge. Terminal states (merged/closed) show no status icon since their checks are no longer actionable.
This is the focused color/icon fix. Surfacing full PR checks, comments, and merge actions inside Agent Manager is a larger, separate effort and is not part of this change.
Screenshots / tests
The
WithPRBadgesvisual-regression story renders all states in one card list (open passing/approved, open failing, open changes-requested, open checks-running, draft, merged, closed) so the colors and icons are captured side by side. CI generates the baseline PNG (animations are disabled in snapshots, so the running-checks badge appears as a static amber badge).