Skip to content

feat: show Committed label on committed-only Review file rows - #239

Draft
Ziinc wants to merge 3 commits into
mainfrom
cursor/committed-file-collapsible-label-921d
Draft

feat: show Committed label on committed-only Review file rows#239
Ziinc wants to merge 3 commits into
mainfrom
cursor/committed-file-collapsible-label-921d

Conversation

@Ziinc

@Ziinc Ziinc commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • After files land in the Review tab's committed-only list, each file-row collapsible shows a light blue Committed label (text-sm) next to the copy button.
  • Uncommitted file rows are unchanged — the badge is only passed for the committedFiles map in DiffContentArea.

App QA

Light blue Committed label next to copy button

Test plan

  • Unit tests in FileRowHeader.test.tsx: committed-only rows show committed-file-label; uncommitted rows do not
  • App-QA screenshot: light blue label sits beside the copy icon on committed-only.txt only
  • Manual: commit a change on a stacked workspace, open Review, confirm the main-pane file header shows Committed next to copy
    To show artifacts inline, enable in settings.
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 9, 2026 19:17
Mark Review-tab file collapsibles that contain only committed changes
with a Committed badge next to the existing Viewed/Renamed/Binary chips.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Capture the Review tab with mixed committed/uncommitted files and assert
the Committed badge appears only on the committed-only collapsible.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
</button>
{isCommitted && (
<span
data-testid="committed-file-label"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Separate isCommitted from readOnly because the whole Review pane can already be read-only for other reasons — using readOnly alone would mis-label uncommitted rows.

  • Only the committedFiles.map(...) branch in DiffContentArea.tsx passes true
  • Backend already keeps committed-only paths out of the uncommitted list, so this badge means committed-only, not mixed

expandedLargeDiffs={expandedLargeDiffs}
diffFontSize={diffFontSize}
readOnly={true}
isCommitted={true}

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-up only: committed rows already rendered below uncommitted ones with readOnly={true} + overrideFileHunks. Adding isCommitted={true} here is what makes the header badge show without changing collapse/hunk loading behavior.

Move the committed-only chip next to the path copy control and restyle
it as a light sky badge at text-sm.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
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