Skip to content

refactor(web): render menu and popover triggers through Button - #13009

Closed
juliusmarminge wants to merge 1 commit into
restyle/item-densityfrom
restyle/trigger-render
Closed

juliusmarminge wants to merge 1 commit into
restyle/item-densityfrom
restyle/trigger-render

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Six headless triggers hand-rolled a full button recipe in className. Two
were the same accent pill, which is Button variant="secondary" size="xs";
four were bare text links, which is InlineButton. Render through those
instead so the trigger inherits focus rings and hover from one place.

Visible effect: the diff-scope pickers use the secondary token (zinc-50)
instead of accent (zinc-100), one step lighter at rest.

Lowers the no-restyle ceiling from 784 to 735.

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

  • Style
    • Updated dropdowns, menus, popovers, and banners to use consistent shared button styling.
    • Preserved existing labels, sizing, layout, and interaction behavior.
    • Refined muted, secondary, underlined, and default button appearances across the interface.
  • Chores
    • Tightened the styling consistency threshold for ongoing UI restyling.

@juliusmarminge
juliusmarminge added this pull request to stack #12993 September 22, 2026 05:55
@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
narrowed ? "text-foreground" : "text-muted-foreground hover:text-foreground",
)}
render={<InlineButton tone={narrowed ? "default" : "muted"} />}
className="min-w-0 max-w-56 gap-1.5"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium settings/SettingsBreadcrumb.tsx:115

On narrow windows, long scope labels make the breadcrumb overflow instead of shrinking to fit. InlineButton applies shrink-0, so the trigger remains up to max-w-56 wide despite the breadcrumb item's intended shrink behavior; add a shrink utility to override it.

Suggested change
className="min-w-0 max-w-56 gap-1.5"
className="min-w-0 max-w-56 shrink gap-1.5"
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/settings/SettingsBreadcrumb.tsx around line 115:

On narrow windows, long scope labels make the breadcrumb overflow instead of shrinking to fit. `InlineButton` applies `shrink-0`, so the trigger remains up to `max-w-56` wide despite the breadcrumb item's intended `shrink` behavior; add a shrink utility to override it.

@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.4 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 56.2 KiB — 66.4 KiB ✅
Codex Live turn messages — 9 — 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: a452b96 · Source CI: failure

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: 114.0 KiB
  • Claude decoded thread snapshot: 114.6 KiB

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

@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: 74f9fbda-077c-428f-8bc4-febcad90d067

📥 Commits

Reviewing files that changed from the base of the PR and between 8e43b21 and a452b96.

📒 Files selected for processing (7)
  • apps/web/src/components/DiffPanel.tsx
  • apps/web/src/components/chat/useAutoBalanceUpdateBanner.tsx
  • apps/web/src/components/device/DeviceToolVersions.tsx
  • apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
  • apps/web/src/components/settings/SettingsBreadcrumb.tsx
  • apps/web/src/components/usage/UsagePage.tsx
  • scripts/lint-restyle-ceiling.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Shared Button and InlineButton components now render several web menu and popover triggers. Existing labels, sizing, layout classes, and behavior remain. The restyle lint ceiling decreases from 784 to 735.

Changes

Shared trigger restyling

Layer / File(s) Summary
Migrate menu and popover triggers
apps/web/src/components/DiffPanel.tsx, apps/web/src/components/chat/useAutoBalanceUpdateBanner.tsx, apps/web/src/components/device/DeviceToolVersions.tsx, apps/web/src/components/pullRequest/PullRequestCodeTab.tsx, apps/web/src/components/settings/SettingsBreadcrumb.tsx, apps/web/src/components/usage/UsagePage.tsx
Menu and popover triggers now use shared Button or InlineButton components with their existing sizing, tone, layout, and behavior.
Lower restyle lint ceiling
scripts/lint-restyle-ceiling.ts
The RESTYLE_CEILING value decreases from 784 to 735.

Priority: ⬇️ Low

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

Change: Refactor

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to a452b

The changes centralize trigger styling without an established functional regression or production-impacting risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 7 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 describes the main change: rendering menu and popover triggers through shared Button components.
Description check ✅ Passed The description clearly explains the trigger refactor, rationale, UI effect, and restyle ceiling change. It does not use the template headings, include before/after screenshots for the UI change, or p…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

Six headless triggers hand-rolled a full button recipe in className. Two
were the same accent pill, which is Button variant="secondary" size="xs";
four were bare text links, which is InlineButton. Render through those
instead so the trigger inherits focus rings and hover from one place.

Visible effect: the diff-scope pickers use the secondary token (zinc-50)
instead of accent (zinc-100), one step lighter at rest.

Lowers the no-restyle ceiling from 784 to 735.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@macroscopeapp

macroscopeapp Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a focused UI refactor that standardizes existing menu and popover triggers through shared Button variants, with localized presentation changes and no new capability, schema, deployment, security, auth, or billing behavior. A medium-severity responsive-layout finding remains for the settings breadcrumb, where long labels may overflow on narrow windows.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge
juliusmarminge deleted the branch restyle/item-density September 22, 2026 08:04
@juliusmarminge

Copy link
Copy Markdown
Member Author

Superseded by the reworked stack (#12993 v2). After review feedback the layers were rebuilt to add fewer props and take more opinions in the base; see the new stack for the replacement.

@juliusmarminge
juliusmarminge deleted the restyle/trigger-render branch September 22, 2026 08:04
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