Skip to content

refactor(web): add selected prop to MenuItem - #12992

Closed
juliusmarminge wants to merge 1 commit into
restyle/dialog-panel-spacingfrom
restyle/menu-item-selected
Closed

juliusmarminge wants to merge 1 commit into
restyle/dialog-panel-spacingfrom
restyle/menu-item-selected

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Seven menu items tinted themselves bg-foreground/[0.08] to mark the current
value, the same tint SelectItem and MenuRadioItem apply for their selected
state. Expose it as selected on MenuItem (with data-selected) and migrate
the sites. No rendered change.

Lowers the no-restyle ceiling from 1073 to 1066.

Part of the components/ui className cleanup (audit and guardrail: #12982). Each layer of stack #12993 lowers the shadcn/no-restyle ceiling; CI fails if the count rises.

Written by Claude Fable 5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • UI Improvements

    • Standardized selected-state styling across diff views, file navigation menus, and pull request commit selectors.
    • Current selections are now more clearly indicated with consistent visual highlighting.
    • Preserved styling for ignored file entries.
  • Maintenance

    • Updated interface styling checks to reflect the latest selection-state changes.

@juliusmarminge
juliusmarminge added this pull request to stack #12993 September 22, 2026 04:42
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 13.5 KiB — 15.1 KiB ✅
Codex Thread snapshot wire — 7.1 KiB — 7.3 KiB ✅
Codex Live turn WebSocket wire — 6.5 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 56.3 KiB — 66.4 KiB ✅
Codex Live turn messages — 10 — 21 ✅
Claude Total thread wire — 13.5 KiB — 15.1 KiB ✅
Claude Thread snapshot wire — 7.1 KiB — 7.3 KiB ✅
Claude Live turn WebSocket wire — 6.4 KiB — 7.8 KiB ✅
Claude Live turn WebSocket decoded — 57.0 KiB — 66.4 KiB ✅
Claude Live turn messages — 9 — 21 ✅

Baseline: unavailable · PR result: a9fb83d · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 22, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 79c31e6

Macroscope's review found this PR approvable — This refactor preserves the existing selected-item behavior while centralizing repeated styling in MenuItem and tightening the corresponding lint ceiling. It introduces no product-default, schema, deployment, security, or substantial runtime changes.

No code changes detected at a9fb83d. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 17adfa33-8465-42bd-89df-f447f89a42b6

📥 Commits

Reviewing files that changed from the base of the PR and between 54c3d45 and 79c31e6.

📒 Files selected for processing (1)
  • scripts/lint-restyle-ceiling.ts

Limit details: You’ve used all 10 included reviews currently available.


📝 Walkthrough

Walkthrough

The change adds a shared selected state to MenuItem, updates three menu consumers to use it, and lowers the lint finding ceiling from 1074 to 1067.

Changes

Menu selection state

Layer / File(s) Summary
MenuItem selected state
apps/web/src/components/ui/menu.tsx
MenuItem accepts selected, applies selected styling, and sets data-selected="true" when selected.
Menu selection consumers
apps/web/src/components/DiffPanel.tsx, apps/web/src/components/files/FileBreadcrumbs.tsx, apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
Working tree, file, turn, and commit menu entries use selected instead of conditional background classes.

Lint ceiling

Layer / File(s) Summary
Lint finding ceiling
scripts/lint-restyle-ceiling.ts
RESTYLE_CEILING is reduced from 1074 to 1067.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 79c31

The change centralizes menu selected-state styling while preserving the intended rendering and lowers the lint ceiling; it is ready to merge with normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: adding a selected prop to the web MenuItem component.
Description check ✅ Passed The description explains what changed, why the change is needed, the expected rendered-output impact, and the restyle-ceiling update. It omits the template headings and checklist, but it provides the …
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch from 6e433e5 to 8ebe1cc Compare September 22, 2026 04:50
@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch from 8ebe1cc to 54c3d45 Compare September 22, 2026 04:56
@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch from 54c3d45 to 79c31e6 Compare September 22, 2026 05:11
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 22, 2026 05:11

Dismissing prior approval to re-evaluate 79c31e6

@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch from 79c31e6 to 4428aa5 Compare September 22, 2026 05:17
@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch 2 times, most recently from fcc969c to 5d7190c Compare September 22, 2026 05:57
Seven menu items tinted themselves bg-foreground/[0.08] to mark the current
value, the same tint SelectItem and MenuRadioItem apply for their selected
state. Expose it as selected on MenuItem (with data-selected) and migrate
the sites. No rendered change.

Lowers the no-restyle ceiling from 1073 to 1066.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the restyle/menu-item-selected branch from 5d7190c to a9fb83d Compare September 22, 2026 05:58
@juliusmarminge
juliusmarminge deleted the branch restyle/dialog-panel-spacing September 22, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant