Skip to content

feat: color Review tab pill by workspace change state - #231

Merged
Ziinc merged 5 commits into
mainfrom
cursor/review-tab-pill-colors-ed8a
Aug 9, 2026
Merged

feat: color Review tab pill by workspace change state#231
Ziinc merged 5 commits into
mainfrom
cursor/review-tab-pill-colors-ed8a

Conversation

@Ziinc

@Ziinc Ziinc commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Review tab number pill is now red for conflicts (soft destructive tint), yellow for uncommitted working-copy changes, and grey when only committed changes remain.
  • Conflict pill uses bg-destructive/20 text-destructive — standard destructive colour at lower intensity.
  • Pill tone comes from getReviewTabPill; the number reuses main’s stable unique WC + committed count from #229.
  • Rebased onto latest main (includes #229 review-tab count fix).

Test plan

Open in Web Open in Cursor 

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot QA covers all three pill colors against a real jj repo via NAPI.

  • Yellow opens Review once so changedFiles populates the count
  • Grey stays on Code to prove status-only commits_ahead path
  • Red uses the existing rebase-conflict recipe from review-conflict-card

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lift committed file list to the parent so the grey pill number can be file-based after Review mounts.

  • Uncommitted still flows through existing onChangedFilesChange
  • Effect fires whenever committedFiles updates from getWorkspaceDiff
  • onCommittedFilesChange

Comment thread src/lib/reviewTabPill.ts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure helper keeps pill tone/count policy out of JSX and unit-testable.

  • Priority is conflict → uncommitted → committed-only, matching the product rule
  • Count waits for a real number so has_changes alone cannot flash a fake 1 before Review loads files
  • getReviewTabPill

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wire the helper to status + file lists so the pill works on Code (committed/conflict) and updates after Review loads WC files.

  • Yellow uses changedFiles / has_changes; grey can appear from commits_ahead_of_target without opening Review
  • onCommittedFilesChange upgrades grey count from commits-ahead to committed file count once the viewer loads
  • reviewTabPill memo

@Ziinc
Ziinc marked this pull request as ready for review August 8, 2026 22:18
cursoragent and others added 4 commits August 8, 2026 22:24
Red for conflicts, yellow for uncommitted working-copy changes,
and grey when only committed changes remain. Lift committed file
counts from the diff viewer so the badge stays accurate.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Cover yellow (uncommitted), grey (committed-only), and red (conflict)
pill states in the screenshot harness, and fix lint on the new helpers.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Use bg-destructive/20 text-destructive so the conflict badge stays on
the destructive token without the solid filled red.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Keep the merged imports from main's review-change-count query and the
Review pill tone helper.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/review-tab-pill-colors-ed8a branch from 687b677 to 2375d31 Compare August 8, 2026 22:25
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
@Ziinc
Ziinc merged commit 9d00e96 into main Aug 9, 2026
7 checks passed
@Ziinc
Ziinc deleted the cursor/review-tab-pill-colors-ed8a branch August 9, 2026 10:53
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.

2 participants