fix(web): mark the selected diff scope in its menu#23893
When a neighboring row is hovered in the diff scope menu, its highlight looks like the selected row and there is no selection marker. Add the existing MenuRadioItemIndicator to the scope and individual-turn options so the active choice stays identifiable. Fixes #19208.
This is a small, focused visual bug fix under CONTRIBUTING.md's obvious-bug exception. It changes only the diff menu; it does not restyle shared menus or change selection behavior. Web and desktop share this component. Native mobile uses a separate diff UI.
Verification
vp run check:changedpassed formatting, lint, Knip, and affected typechecks.- Tested in T3's Browser panel against isolated development state on Linux Chromium at 1280×800, in dark and light themes. Selected Changes and Uncommitted in turn, reopened the menu, and hovered the adjacent option. Only the selected row has a checkmark. Keyboard selection still works.
- Purely visual fix, verified with captures rather than a test asserting component wiring.
- This fixture has no completed turns, so Latest turn falls back to Changes. Individual-turn selection and Electron were not exercised.
Screenshots
Same selected Changes row with Uncommitted hovered, before at 200dad3b39aa and after with this patch. The background diff list changes because the app is inspecting this checkout's working tree.
| Before | After |
|---|---|
| Before: adjacent highlights without a selection marker | After: the selected scope has a checkmark |
Model: GPT-6.1-Sol. Harness: Codex through T3 Code.
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- Successful
Skipped - Not affected
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulLabel PR 23893GitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
Added 1 commit
- fix(web): mark the selected diff scope in its menu6123bd6
Approvability
Verdict: Approved at 6123bd6
Macroscope's review found this PR approvable — This focused web UI fix adds existing radio indicators to the diff-scope menu without changing selection logic, data, or defaults. Its runtime impact is limited to making the current selection visibly identifiable.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 200dad3
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
03b37cd3-75d4-43af-9e59-38476fdd687f
📥 Commits
Reviewing files that changed from the base of the PR and between 6123bd6b0481801869b71d61490b82a53a337b22 and 622b9c27da437082d7e8accf7972407e756caf95.
📒 Files selected for processing: 1
apps/web/src/components/DiffPanel.tsx
🚧 Files skipped from review as they are similar to previous changes: 1
- apps/web/src/components/DiffPanel.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
The diff panel now renders radio-item indicators beside the “Changes,” “Uncommitted,” and “Latest turn” labels, and beside each individual turn option. Selection values and handlers remain unchanged.
Changes: Diff scope menu
Layer / File(s) Summary Add indicators to scope options
apps/web/src/components/DiffPanel.tsxThe diff panel imports MenuRadioItemIndicatorand renders it beside the scope and individual-turn radio menu labels.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Merge Risk: ⚪ Minimal · up to 622b9
The selected diff scope should remain identifiable beside a hovered option. No merge-blocking issue is identified from the supplied evidence.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title "fix(web): mark the selected diff scope in its menu" matches the main change in the raw summary: DiffPanel now renders MenuRadioItemIndicator beside the Changes, Uncommitted, Latest turn, an… Description check Passed The description states the problem (a hovered neighboring row looks selected and no selection marker is shown), the change (adding the existing MenuRadioItemIndicator to the scope and individual-turn … Linked Issues check Passed Issue #19208requires the selected diff-scope row to stay distinguishable from an adjacent hovered row. The issue lists a checkmark on the selected row as an acceptable fix. The whole-PR diff (merge b…Out of Scope Changes check Passed The whole-PR diff touches only apps/web/src/components/DiffPanel.tsx among the files inspected. The diff for apps/web/src/components/ui/menu.tsx between merge base and head is empty, so shared menu st… Full details: Title check
Explanation
The title "fix(web): mark the selected diff scope in its menu" matches the main change in the raw summary: DiffPanel now renders MenuRadioItemIndicator beside the Changes, Uncommitted, Latest turn, and per-turn radio items, so the selected scope shows a marker. It is specific, uses a conventional commit prefix, and avoids vague terms. Its wording is slightly broader than the change, since it does not name the hover problem, but that is acceptable.
Full details: Description check
Explanation
The description states the problem (a hovered neighboring row looks selected and no selection marker is shown), the change (adding the existing MenuRadioItemIndicator to the scope and individual-turn options), and the scope (diff menu only, shared web/desktop component, mobile unaffected). It links issue
#19208and explains why no prior approval is needed under the obvious-bug exception. Verification lists concrete checks, including the commands run, the viewport, themes, interactions tested, and what was not exercised. Before and after screenshots are included, as the template requires for UI changes. The description does not fully follow the template: it cites the obvious-bug exception instead of a maintainer-approved issue, which the template allows for small fixes. The Problem, Change, Scope and approval, and Verification headings are not used; the content is grouped under a Verification and Screenshots section. These gaps are minor, so the check passes.
Full details: Linked Issues check
Explanation
Issue
#19208requires the selected diff-scope row to stay distinguishable from an adjacent hovered row. The issue lists a checkmark on the selected row as an acceptable fix. The whole-PR diff (merge base 200dad3b to head 622b9c27) for apps/web/src/components/DiffPanel.tsx adds MenuRadioItemIndicator to the Changes (branch), Uncommitted (unstaged), and Latest turn (latest) DropdownMenuRadioItem entries. It also adds the indicator to the individual-turn items after the timestamp span. The indicator sits in a flex span beside each label. The change is code-level and matches the requirement. Visual confirmation by the author covers Changes and Uncommitted only. Individual-turn rendering was not exercised. The issue does not require automated tests. Limitation: the diff shows the import and JSX, but the indicator's checked-only rendering comes from the existing ui/menu.tsx implementation, which this diff does not change. Its export was not directly read.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff touches only apps/web/src/components/DiffPanel.tsx among the files inspected. The diff for apps/web/src/components/ui/menu.tsx between merge base and head is empty, so shared menu styling and selection behavior are unchanged. The added flex wrapper spans and the indicator sit only inside the diff scope menu items. This wrapping supports indicator placement and is part of the same objective. No unrelated behavior change appears in the diff. The change set is larger than the earlier +5/-0 review: it is now +14/-3 per the summary, and the direct diff confirms the expanded edits, all within the same menu.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Added 1 commit
- fix(web): keep diff scope checkmarks beside their labels622b9c2