Skip to content

fix(web): mark the selected diff scope in its menu - #23893

Open
shethshlok wants to merge 5 commits into
pingdotgg:mainfrom
shethshlok:fix/diff-scope-selection
Open

shethshlok wants to merge 5 commits into
pingdotgg:mainfrom
shethshlok:fix/diff-scope-selection

Conversation

@shethshlok

@shethshlok shethshlok commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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 https://git.cafe/pingdotgg/t3code/issues/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:changed passed 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.
  • Rechecked after merging main at 40dd013d65: vp run check:changed passed formatting, lint, both Knip checks, affected typechecks, and the DiffPanel React compiler check. The unrelated untracked local issue-scout skill was excluded; no tracked PR files were excluded.
  • An isolated Replay (dev) turn now covers Latest turn and the Turn 1 submenu. Both identify the completed turn with a checkmark; keyboard End and Right Arrow open the turn submenu. The replay has no real file edits. Native Electron was not exercised.

Completed-turn selection after updating main

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.

Fixes #19208

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 22, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The diff panel now renders radio-item indicators beside the “Changes,” “Uncommitted,” and “Latest turn” options, and beside each individual turn option. Selection values and behavior remain unchanged.

Changes: Diff scope menu

Layer / File(s) Summary
Add indicators to scope options
apps/web/src/components/DiffPanel.tsx
The diff panel imports MenuRadioItemIndicator and renders it beside the scope and individual-turn radio menu labels.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: maria-rcks, juliusmarminge, t3dotgg

Merge Risk: Minimal · up to fa5b5

This adds a checkmark to the selected diff-scope option so it stays distinguishable from a hovered row. Selection behavior is unchanged and the change is cosmetic and easy to revert, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: the diff scope menu now marks the selected option. It follows the conventional commit form with a clear scope and a plain-language summary. It matches the raw summary…
Description check Passed The description follows the template's main sections. It states the problem, the change, and the scope (a small obvious-bug fix, linked to issue 19208). It gives detailed verification: check results, …
Linked Issues check Passed Issue #19208 requires the selected diff-scope row to stay distinguishable from an adjacent hovered row. The issue lists a checkmark on the selected row as an accepted fix. The raw summary for apps/web…
Out of Scope Changes check Passed The raw summary reports whole-PR changes limited to apps/web/src/components/DiffPanel.tsx (+17/-6). The summary states that the change adds the existing MenuRadioItemIndicator only to the diff scope a…
Full details: Title check

Explanation

The title states the main change: the diff scope menu now marks the selected option. It follows the conventional commit form with a clear scope and a plain-language summary. It matches the raw summary, which adds MenuRadioItemIndicator to the Changes, Uncommitted, Latest turn, and turn menu options in DiffPanel.tsx.

Full details: Description check

Explanation

The description follows the template's main sections. It states the problem, the change, and the scope (a small obvious-bug fix, linked to issue 19208). It gives detailed verification: check results, browser testing in dark and light themes, keyboard checks, and before/after screenshots. It also notes what was not exercised, which is native Electron. The template does not require a separate Problem section heading for every item, and the author covers that content in the opening paragraph. Minor gap: the description does not use the template's exact headings, so a reviewer must map the content to the sections.

Full details: Linked Issues check

Explanation

Issue #19208 requires the selected diff-scope row to stay distinguishable from an adjacent hovered row. The issue lists a checkmark on the selected row as an accepted fix. The raw summary for apps/web/src/components/DiffPanel.tsx at head fa5b5c9 reports that MenuRadioItemIndicator is rendered in the Changes, Uncommitted, Latest turn, and individual Turn options. The reviewed head file confirms that DiffPanel.tsx imports MenuRadioItemIndicator from ./ui/menu. The indicator reads existing radio selection state, so the active choice shows a checkmark while another row is hovered. The issue is cosmetic and does not require an automated test. The whole-PR text diff could not be read because changed blobs are missing from the checkout. The JSX placement of the indicator therefore rests on the raw summary and the import evidence, not on a line-level read. The current head differs from the previously reviewed head 0e3980c, so this conclusion was re-derived from the summary.

Full details: Out of Scope Changes check

Explanation

The raw summary reports whole-PR changes limited to apps/web/src/components/DiffPanel.tsx (+17/-6). The summary states that the change adds the existing MenuRadioItemIndicator only to the diff scope and turn menu options. It reports no changes to exported declarations, shared menu styling, or selection logic. The reviewed head file shows the import of MenuRadioItemIndicator, which supports this scope. The text diff could not be read, so the claim that no other tracked file changed rests on the supplied summary. The PR description's Replay and browser checks add no code, so they do not affect scope.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0e3980c and fa5b5c9.

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; 9 remain after this review.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Oct 22, 2026
@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed labels Oct 27, 2026
@shethshlok

shethshlok commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@juliusmarminge Could you clarify the remaining blocker here? The PR has pr:gate-failed, but I couldn't find an explanation of which gate failed. The current-head CI workflow reports action_required; could you approve it to run, or point me to anything I should address first? Before/after screenshots and verification results are in the description.

CI update: the upstream CI aggregate Check now passes on 40dd013d65. The CI authorization request above is resolved. Passing CI.

@shethshlok

Copy link
Copy Markdown
Contributor Author

@juliusmarminge Could you take a look at this diff-scope indicator fix when you have a chance? The head is still 40dd013d65; its recorded aggregate CI Check passed on October 30, CodeRabbit reports no actionable merge-blocking issue, and GitHub currently reports no merge conflicts. Before/after screenshots and verification are in the description.

Does the pr:gate-failed label added on October 27 still apply? If so, which exact gate needs attention, and what should I address before review or merge?

@github-actions

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 18, 2026
@github-actions github-actions Bot removed the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 23, 2026
@github-actions github-actions Bot removed the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Selected and hovered dropdown rows look identical when adjacent

2 participants