Skip to content

refactor(web): give TooltipPopup width and code variants - #12986

Closed
juliusmarminge wants to merge 2 commits into
mainfrom
restyle/tooltip-width
Closed

juliusmarminge wants to merge 2 commits into
mainfrom
restyle/tooltip-width

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Every multi-line tooltip set its own max-width and line-height through
className, in eight different combinations, and every path or command
tooltip re-declared the same monospace treatment. Expose width="sm..2xl"
(max-w-64 through max-w-120, wrapping enabled) and variant="code"
(monospace, 11px, breaks anywhere) and migrate the 60 call sites.

Visible effect: wrapped tooltips now share one line-height (leading-snug)
where sites previously picked tight or relaxed, and code tooltips share one
size. Widths map to the nearest step of the scale.

Lowers the no-restyle ceiling from 1206 to 1146.

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

  • New Features

    • Added standardized tooltip width options for more consistent sizing across the app.
    • Added a code-styled tooltip variant for paths, commands, IDs, and other technical content.
    • Long dialog and alert titles now wrap more reliably.
  • Style

    • Updated tooltips throughout the app to use consistent sizing, wrapping, alignment, and typography.
    • Improved readability of technical tooltip content with standardized monospace styling and wrapping behavior.

@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:L 100-499 changed lines (additions + deletions). labels Sep 22, 2026
Comment thread apps/web/src/components/ConfirmDialogHost.tsx
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +52 B (+0.4%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +47 B (+0.7%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.3 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +9 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +4 B (+0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: b5a0f81 · PR result: c244489 · 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

macroscopeapp Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Evaluating 3ca7f7d…

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

@juliusmarminge

Copy link
Copy Markdown
Member Author

Good catch. Fixed in 0c0c925 by putting wrap-anywhere on the DialogTitle/AlertDialogTitle base rather than restoring it per site, since any dialog title can interpolate a path or branch name.

@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: e8c564fe-cb2a-4a72-967c-8b80ae201757

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1c7f5 and a3d7913.

📒 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 shared tooltip width and code-style options. Existing tooltip instances replace local sizing and wrapping classes with these options. Dialog titles gain anywhere-wrapping support, and the restyle lint ceiling decreases.

Changes

Tooltip styling standardization

Layer / File(s) Summary
TooltipPopup API
apps/web/src/components/ui/tooltip.tsx
Adds sm through 2xl width presets and a code variant with shared wrapping and typography styles.
Dialog title wrapping
apps/web/src/components/ui/alert-dialog.tsx, apps/web/src/components/ui/dialog.tsx, apps/web/src/components/ConfirmDialogHost.tsx
Dialog titles gain wrap-anywhere; confirmation titles stop applying the class locally.
General tooltip migration
apps/web/src/components/*.tsx, apps/web/src/components/cloud/*, apps/web/src/components/files/*, apps/web/src/components/media/*, apps/web/src/components/onboarding/*, apps/web/src/components/pullRequest/*, apps/web/src/components/usage/*, apps/web/src/routes/_chat.pull-requests.tsx, scripts/lint-restyle-ceiling.ts
Application tooltips use shared width or code-style options. The lint finding ceiling changes from 1207 to 1147.
Chat tooltip migration
apps/web/src/components/chat/*
Chat and composer tooltips use shared width presets. PICKER_TOOLTIP_CLASS is removed.
Settings tooltip migration
apps/web/src/components/settings/*
Settings and diagnostics tooltips use shared width and code-style options while retaining specified whitespace behavior.

Priority: ⬇️ Low

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

Change: Refactor

Merge Risk: ⚪ Minimal · up to a3d79

This change standardizes tooltip sizing and code styling and enables consistent dialog-title wrapping. No merge-blocking risk remains identified.

🚥 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 40 functions across 38 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 summarizes the main change: adding width and code variants to TooltipPopup.
Description check ✅ Passed The description explains what changed, why the change was made, the visible UI effect, the migration scope, and the related cleanup. It does not use the template headings or include the checklist and …
  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 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.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 22, 2026
@juliusmarminge
juliusmarminge force-pushed the restyle/tooltip-width branch 2 times, most recently from c65aebb to 4204ed6 Compare September 22, 2026 05:18
Base automatically changed from restyle/icon-sizes to main September 22, 2026 05:57
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 22, 2026 05:57

Dismissing prior approval to re-evaluate 4204ed6

juliusmarminge and others added 2 commits September 21, 2026 22:58
Every multi-line tooltip set its own max-width and line-height through
className, in eight different combinations, and every path or command
tooltip re-declared the same monospace treatment. Expose width="sm..2xl"
(max-w-64 through max-w-120, wrapping enabled) and variant="code"
(monospace, 11px, breaks anywhere) and migrate the 60 call sites.

Visible effect: wrapped tooltips now share one line-height (leading-snug)
where sites previously picked tight or relaxed, and code tooltips share one
size. Widths map to the nearest step of the scale.

Lowers the no-restyle ceiling from 1206 to 1146.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Restores the wrap-anywhere that ConfirmDialogHost set per site, on the
DialogTitle and AlertDialogTitle base instead, since every dialog title can
interpolate a path or branch name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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/tooltip-width branch 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:L 100-499 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