The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 23:00 UTC
refactor(web): one wrap width for tooltips, plus a code variant (#13031)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Julius Marminge committed
Sep 22, 2026 at 12:22 UTC
aa2b25d29b4b13ef1c2ee80e1afade1635de9ca8
38 files changed
+60
-153
apps/web/src/components/BranchToolbarBranchSelector.tsx
+1
-1
@@ -918,7 +918,7 @@ export function BranchToolbarBranchSelector({
918
</label>
919
}
920
/>
921
- <TooltipPopup side="top" className="max-w-72 whitespace-normal leading-tight">
921
+ <TooltipPopup side="top">
922
Creates the worktree from the latest matching branch on origin instead of your local
923
branch.
924
</TooltipPopup>
apps/web/src/components/ChatMarkdown.tsx
+2
-10
@@ -2209,10 +2209,7 @@ const MarkdownFileLink = memo(function MarkdownFileLink({
2209
)
2210
}
2211
/>
2212
- <TooltipPopup
2213
- side="top"
2214
- className="max-w-[min(40rem,calc(100vw-2rem))] font-mono text-[11px] leading-tight"
2215
- >
2212
+ <TooltipPopup side="top" variant="code">
2213
{/* The full path: the chip already shows the shortened form, and a link
2214
to the workspace root collapses to a bare label that repeats it. */}
2215
<div className="overflow-x-auto whitespace-nowrap [scrollbar-color:color-mix(in_srgb,var(--contrast-border)_78%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[color-mix(in_srgb,var(--contrast-border)_78%,transparent)] [&::-webkit-scrollbar-track]:bg-transparent">
@@ -3062,12 +3059,7 @@ const CHAT_MARKDOWN_COMPONENTS = {
3059
return (
3060
<Tooltip>
3061
<TooltipTrigger render={link} />
3065
- <TooltipPopup
3066
- side="top"
3067
- className="max-w-[min(36rem,calc(100vw-2rem))] whitespace-normal leading-tight wrap-anywhere"
3068
- >
3069
- {href}
3070
- </TooltipPopup>
3062
+ <TooltipPopup side="top">{href}</TooltipPopup>
3063
</Tooltip>
3064
);
3065
}
apps/web/src/components/ChatView.tsx
+1
-1
@@ -6533,7 +6533,7 @@ export default function ChatView(props: ChatViewProps) {
6533
</code>
6534
}
6535
/>
6536
- <TooltipPopup side="top" className="max-w-80">
6536
+ <TooltipPopup side="top">
6537
This thread last ran on {localCheckoutBranchMismatch.threadBranch}. Sending will
6538
continue on {localCheckoutBranchMismatch.currentBranch}.
6539
</TooltipPopup>
apps/web/src/components/ComposerPromptEditorTiptap.tsx
+1
-6
@@ -237,12 +237,7 @@ function ComposerMentionNodeView({ node }: NodeViewProps) {
237
<NodeViewWrapper as="span" className={COMPOSER_INLINE_CHIP_DECORATOR_CLASS_NAME}>
238
<Tooltip>
239
<TooltipTrigger render={chip} />
240
- <TooltipPopup
241
- side="top"
242
- className="max-w-120 whitespace-normal leading-tight wrap-anywhere"
243
- >
244
- {path}
245
- </TooltipPopup>
240
+ <TooltipPopup side="top">{path}</TooltipPopup>
241
</Tooltip>
242
</NodeViewWrapper>
243
);
apps/web/src/components/ConfirmDialogHost.tsx
+1
-1
@@ -77,7 +77,7 @@ export function ConfirmDialogHost() {
77
>
78
<AlertDialogPopup>
79
<AlertDialogHeader>
80
- <AlertDialogTitle className="wrap-anywhere">{copy.title}</AlertDialogTitle>
80
+ <AlertDialogTitle>{copy.title}</AlertDialogTitle>
81
{copy.description ? (
82
<AlertDialogDescription className="whitespace-pre-line">
83
{copy.description}
apps/web/src/components/ConnectionStatusDot.tsx
+1
-1
@@ -69,7 +69,7 @@ export function ConnectionStatusDot({
69
return (
70
<Tooltip>
71
<TooltipTrigger render={dot} />
72
- <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight">
72
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
73
{tooltipText}
74
</TooltipPopup>
75
</Tooltip>
apps/web/src/components/GitActionsControl.tsx
+1
-1
@@ -659,7 +659,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
659
</Button>
660
}
661
/>
662
- <TooltipPopup side="top" align="end" className="max-w-72">
662
+ <TooltipPopup side="top" align="end">
663
{readiness.hint ??
664
"Open Settings -> Source Control to configure this provider."}
665
</TooltipPopup>
apps/web/src/components/LegacySidebar.tsx
+1
-3
@@ -785,9 +785,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
785
</span>
786
}
787
/>
788
- <TooltipPopup side="top" className="max-w-80 whitespace-normal leading-tight">
789
- {thread.title}
790
- </TooltipPopup>
788
+ <TooltipPopup side="top">{thread.title}</TooltipPopup>
789
</Tooltip>
790
)}
791
</div>
apps/web/src/components/ServerUpdateAction.tsx
+1
-3
@@ -163,9 +163,7 @@ export function ServerUpdateProgress({
163
<span className="size-1.5 shrink-0 rounded-full bg-destructive" aria-hidden="true" />
164
<Tooltip>
165
<TooltipTrigger render={<span className="min-w-0 truncate">{state.message}</span>} />
166
- <TooltipPopup side="top" className="max-w-80">
167
- {state.message}
168
- </TooltipPopup>
166
+ <TooltipPopup side="top">{state.message}</TooltipPopup>
167
</Tooltip>
168
</div>
169
);
apps/web/src/components/Sidebar.tsx
+1
-1
@@ -350,7 +350,7 @@ function SidebarThreadTooltip({
350
align="start"
351
sideOffset={4}
352
variant="glass"
353
- className="max-w-80 text-left whitespace-normal [&_[data-slot=tooltip-viewport]]:p-0"
353
+ className="[&_[data-slot=tooltip-viewport]]:p-0"
354
>
355
<div className="flex min-w-0 max-w-80 flex-col gap-2 p-[var(--floating-content-inset)]">
356
<div className="min-w-0 truncate text-xs leading-tight font-medium text-foreground">
apps/web/src/components/StartTruncatedPath.tsx
+1
-1
@@ -17,7 +17,7 @@ export function StartTruncatedPath({ path, className }: { path: string; classNam
17
>
18
<bdi>{path}</bdi>
19
</TooltipTrigger>
20
- <TooltipPopup side="top" className="max-w-sm break-all font-mono">
20
+ <TooltipPopup side="top" variant="code">
21
{path}
22
</TooltipPopup>
23
</Tooltip>
apps/web/src/components/chat/ChatComposer.tsx
+4
-22
@@ -6569,10 +6569,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
6569
</span>
6570
}
6571
/>
6572
- <TooltipPopup
6573
- side="top"
6574
- className="max-w-64 whitespace-normal leading-tight"
6575
- >
6572
+ <TooltipPopup side="top">
6573
Draft attachment could not be saved locally and may be lost on
6574
navigation.
6575
</TooltipPopup>
@@ -6604,12 +6601,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
6601
>
6602
<RefreshIcon />
6603
</TooltipTrigger>
6607
- <TooltipPopup
6608
- side="top"
6609
- className="max-w-64 whitespace-normal leading-tight"
6610
- >
6611
- {upload.reason}
6612
- </TooltipPopup>
6604
+ <TooltipPopup side="top">{upload.reason}</TooltipPopup>
6605
</Tooltip>
6606
)}
6607
<Button
@@ -6704,12 +6696,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
6696
>
6697
<RefreshIcon />
6698
</TooltipTrigger>
6707
- <TooltipPopup
6708
- side="top"
6709
- className="max-w-64 whitespace-normal leading-tight"
6710
- >
6711
- {upload.reason}
6712
- </TooltipPopup>
6699
+ <TooltipPopup side="top">{upload.reason}</TooltipPopup>
6700
</Tooltip>
6701
)}
6702
<Button
@@ -6787,12 +6774,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
6774
>
6775
<RefreshIcon />
6776
</TooltipTrigger>
6790
- <TooltipPopup
6791
- side="top"
6792
- className="max-w-64 whitespace-normal leading-tight"
6793
- >
6794
- {upload.reason}
6795
- </TooltipPopup>
6777
+ <TooltipPopup side="top">{upload.reason}</TooltipPopup>
6778
</Tooltip>
6779
) : null}
6780
<Button
apps/web/src/components/chat/ComposerPendingApprovalActions.tsx
+2
-6
@@ -59,9 +59,7 @@ export const ComposerPendingApprovalActions = memo(function ComposerPendingAppro
59
return option.warning ? (
60
<Tooltip key={option.decision}>
61
<TooltipTrigger render={button} />
62
- <TooltipPopup side="top" className="max-w-72 text-xs leading-snug">
63
- {option.warning}
64
- </TooltipPopup>
62
+ <TooltipPopup side="top">{option.warning}</TooltipPopup>
63
</Tooltip>
64
) : (
65
button
@@ -98,9 +96,7 @@ export const ComposerPendingApprovalActions = memo(function ComposerPendingAppro
96
return option.warning ? (
97
<Tooltip key={option.decision}>
98
<TooltipTrigger render={item} />
101
- <TooltipPopup side="top" className="max-w-64 text-xs leading-snug">
102
- {option.warning}
103
- </TooltipPopup>
99
+ <TooltipPopup side="top">{option.warning}</TooltipPopup>
100
</Tooltip>
101
) : (
102
item
apps/web/src/components/chat/ComposerServerUpdateStatus.tsx
+1
-1
@@ -56,7 +56,7 @@ export function ComposerServerUpdateStatus({
56
</button>
57
}
58
/>
59
- <TooltipPopup side="top" className="max-w-80">
59
+ <TooltipPopup side="top">
60
{title}: {detail}
61
</TooltipPopup>
62
</Tooltip>
apps/web/src/components/chat/DraftHeroHeadline.tsx
+2
-6
@@ -146,9 +146,7 @@ export function DraftHeroHeadline({
146
{activeProjectDisplayName ?? "Choose a project"}
147
</TooltipTrigger>
148
{activeProjectDisplayName ? (
149
- <TooltipPopup side="top" className="max-w-80">
150
- {activeProjectDisplayName}
151
- </TooltipPopup>
149
+ <TooltipPopup side="top">{activeProjectDisplayName}</TooltipPopup>
150
) : null}
151
</Tooltip>
152
<MenuPopup align="center" className="max-h-80 min-w-40! w-max max-w-64 overflow-y-auto">
@@ -202,9 +200,7 @@ export function DraftHeroHeadline({
200
<TooltipTrigger render={<span className="block min-w-0 truncate" />}>
201
{group.displayName}
202
</TooltipTrigger>
205
- <TooltipPopup side="top" className="max-w-80">
206
- {group.displayName}
207
- </TooltipPopup>
203
+ <TooltipPopup side="top">{group.displayName}</TooltipPopup>
204
</Tooltip>
205
{showProjectEnvironments ? (
206
<ProjectEnvironmentBadge
apps/web/src/components/chat/ModelListRow.tsx
+1
-1
@@ -145,7 +145,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
145
return (
146
<Tooltip>
147
<TooltipTrigger render={row} />
148
- <TooltipPopup side="left" align="center" className="max-w-64 text-balance leading-snug">
148
+ <TooltipPopup side="left" align="center">
149
{props.disabledReason}
150
</TooltipPopup>
151
</Tooltip>
apps/web/src/components/chat/ModelPickerSidebar.tsx
-3
@@ -39,7 +39,6 @@ const NEW_BADGE_CLASS = `${BADGE_BASE_CLASS} text-update-foreground `;
39
/** Opens toward the rail so the list stays readable (not over the model names). */
40
const PICKER_TOOLTIP_SIDE = "left" as const;
41
const PICKER_TOOLTIP_SIDE_OFFSET = 8;
42
-const PICKER_TOOLTIP_CLASS = "max-w-64 text-balance font-normal leading-snug";
42
43
export const ModelPickerSidebar = memo(function ModelPickerSidebar(props: {
44
selectedInstanceId: ProviderInstanceId | "favorites";
@@ -139,7 +138,6 @@ export const ModelPickerSidebar = memo(function ModelPickerSidebar(props: {
138
side={PICKER_TOOLTIP_SIDE}
139
sideOffset={PICKER_TOOLTIP_SIDE_OFFSET}
140
align="center"
142
- className={PICKER_TOOLTIP_CLASS}
141
>
142
Favorites
143
</TooltipPopup>
@@ -242,7 +240,6 @@ export const ModelPickerSidebar = memo(function ModelPickerSidebar(props: {
240
side={PICKER_TOOLTIP_SIDE}
241
sideOffset={PICKER_TOOLTIP_SIDE_OFFSET}
242
align="center"
245
- className={PICKER_TOOLTIP_CLASS}
243
>
244
{tooltip}
245
</TooltipPopup>
apps/web/src/components/chat/ProviderStatusBanner.tsx
+1
-1
@@ -100,7 +100,7 @@ export const ProviderStatusBanner = memo(function ProviderStatusBanner({
100
<TooltipTrigger
101
render={<div className="line-clamp-3 text-muted-foreground">{message}</div>}
102
/>
103
- <TooltipPopup side="top" className="max-w-96 whitespace-pre-wrap">
103
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
104
{message}
105
</TooltipPopup>
106
</Tooltip>
apps/web/src/components/chat/ThreadErrorBanner.tsx
+1
-1
@@ -53,7 +53,7 @@ export const ThreadErrorBanner = memo(function ThreadErrorBanner({
53
<AlertDescription>
54
<Tooltip>
55
<TooltipTrigger render={<div className="line-clamp-3" />}>{error}</TooltipTrigger>
56
- <TooltipPopup side="top" className="max-w-96 whitespace-pre-wrap">
56
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
57
{error}
58
</TooltipPopup>
59
</Tooltip>
apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx
+2
-6
@@ -393,9 +393,7 @@ export function CloudEnvironmentConnectRows({
393
? "Unavailable"
394
: "Checking…"))}
395
</TooltipTrigger>
396
- <TooltipPopup className="max-w-80 break-words">
397
- {unsupportedDetail ?? statusText}
398
- </TooltipPopup>
396
+ <TooltipPopup>{unsupportedDetail ?? statusText}</TooltipPopup>
397
</Tooltip>
398
</label>
399
);
@@ -454,9 +452,7 @@ export function CloudEnvironmentConnectRows({
452
Add
453
</Button>
454
</TooltipTrigger>
457
- <TooltipPopup className="max-w-80 break-words">
458
- {unsupportedDetail ?? "Client not supported"}
459
- </TooltipPopup>
455
+ <TooltipPopup>{unsupportedDetail ?? "Client not supported"}</TooltipPopup>
456
</Tooltip>
457
) : savedConnection ? (
458
<Button size="sm" variant="outline" disabled>
apps/web/src/components/composerContextPresentation.tsx
+1
-1
@@ -199,7 +199,7 @@ function ImageContextChip(props: {
199
/>
200
}
201
/>
202
- <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight">
202
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
203
{attachmentTooltip(props.record, props.upload)}
204
</TooltipPopup>
205
</Tooltip>
apps/web/src/components/contextChipParts.tsx
+1
-1
@@ -301,7 +301,7 @@ export function FileChip(props: {
301
)
302
}
303
/>
304
- <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight">
304
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
305
{props.tooltip}
306
</TooltipPopup>
307
</Tooltip>
apps/web/src/components/files/FileBreadcrumbs.tsx
+2
-6
@@ -61,9 +61,7 @@ function BreadcrumbLabel(props: {
61
>
62
{props.label}
63
</TooltipTrigger>
64
- <TooltipPopup side="top" className="max-w-80">
65
- {props.pathLabel}
66
- </TooltipPopup>
64
+ <TooltipPopup side="top">{props.pathLabel}</TooltipPopup>
65
</Tooltip>
66
);
67
}
@@ -241,9 +239,7 @@ function DirectoryBreadcrumb(props: FileBreadcrumbsProps & { readonly crumb: Fil
239
>
240
<span className="block truncate">{props.crumb.label}</span>
241
</TooltipTrigger>
244
- <TooltipPopup side="top" className="max-w-80">
245
- {props.crumb.path || props.projectName}
246
- </TooltipPopup>
242
+ <TooltipPopup side="top">{props.crumb.path || props.projectName}</TooltipPopup>
243
</Tooltip>
244
{open ? (
245
<BreadcrumbMenuContent
apps/web/src/components/media/MediaActions.tsx
+1
-3
@@ -186,9 +186,7 @@ export function MediaActions({
186
void showMenu({ x: bounds.left, y: bounds.bottom });
187
}}
188
/>
189
- <TooltipPopup className="max-w-[min(40rem,calc(100vw-2rem))] break-all font-mono text-[11px] leading-tight">
190
- {tooltip}
191
- </TooltipPopup>
189
+ <TooltipPopup variant="code">{tooltip}</TooltipPopup>
190
</Tooltip>
191
);
192
}
apps/web/src/components/onboarding/WelcomeWizard.tsx
+1
-1
@@ -1453,7 +1453,7 @@ function ImportCandidateRow({
1453
</span>
1454
) : null}
1455
</TooltipTrigger>
1456
- <TooltipPopup className="max-w-96 break-all font-mono">{candidate.path}</TooltipPopup>
1456
+ <TooltipPopup variant="code">{candidate.path}</TooltipPopup>
1457
</Tooltip>
1458
<ImportRowMeta
1459
sources={nested ? null : candidate.sources}
apps/web/src/components/pullRequest/PullRequestCopyableCode.tsx
+1
-1
@@ -58,7 +58,7 @@ export function PullRequestCopyableCode({
58
Copied
59
</span>
60
</TooltipTrigger>
61
- <TooltipPopup className="max-w-96 wrap-anywhere font-mono" side={tooltipSide}>
61
+ <TooltipPopup variant="code" side={tooltipSide}>
62
{`${isCopied ? "Copied" : copyLabel}: ${value}`}
63
</TooltipPopup>
64
</Tooltip>
apps/web/src/components/pullRequest/PullRequestListFilters.tsx
+1
-3
@@ -202,9 +202,7 @@ function PullRequestFilterRadioGroup<Value extends string>({
202
return (
203
<Tooltip key={option.value}>
204
<TooltipTrigger render={item} />
205
- <TooltipPopup side="top" className="max-w-80">
206
- {option.unavailable}
207
- </TooltipPopup>
205
+ <TooltipPopup side="top">{option.unavailable}</TooltipPopup>
206
</Tooltip>
207
);
208
})}
apps/web/src/components/settings/ConnectionsSettings.tsx
+4
-10
@@ -925,9 +925,7 @@ const PairingLinkListRow = memo(function PairingLinkListRow({
925
</code>
926
}
927
/>
928
- <TooltipPopup side="top" className="max-w-80 break-all">
929
- {qrPairingUrl}
930
- </TooltipPopup>
928
+ <TooltipPopup side="top">{qrPairingUrl}</TooltipPopup>
929
</Tooltip>
930
<Button
931
size="xs"
@@ -1334,9 +1332,7 @@ const AdvertisedEndpointListRow = memo(function AdvertisedEndpointListRow({
1332
</p>
1333
}
1334
/>
1337
- <TooltipPopup side="top" className="max-w-80">
1338
- {endpoint.httpBaseUrl}
1339
- </TooltipPopup>
1335
+ <TooltipPopup side="top">{endpoint.httpBaseUrl}</TooltipPopup>
1336
</Tooltip>
1337
) : null}
1338
{!isAvailable ? (
@@ -1573,7 +1569,7 @@ function SavedBackendListRow({
1569
>
1570
{subtitleText}
1571
</TooltipTrigger>
1576
- <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight">
1572
+ <TooltipPopup side="top" className="whitespace-pre-wrap">
1573
{unsupported
1574
? (environment.connection.error ?? connectionStatusText(environment.connection))
1575
: enabled
@@ -3635,9 +3631,7 @@ export function ConnectionsSettings() {
3631
}
3632
/>
3633
{pendingTailscaleServeBaseUrl ? (
3638
- <TooltipPopup side="top" className="max-w-80">
3639
- {pendingTailscaleServeBaseUrl}
3640
- </TooltipPopup>
3634
+ <TooltipPopup side="top">{pendingTailscaleServeBaseUrl}</TooltipPopup>
3635
) : null}
3636
</Tooltip>
3637
</div>
apps/web/src/components/settings/DiagnosticsSettings.tsx
+6
-26
@@ -109,12 +109,7 @@ function StatBlock({
109
</button>
110
}
111
/>
112
- <TooltipPopup
113
- side="top"
114
- className="max-w-[min(300px,calc(100vw-2rem))] whitespace-normal text-left text-[11px] leading-relaxed text-wrap"
115
- >
116
- {tooltip}
117
- </TooltipPopup>
112
+ <TooltipPopup side="top">{tooltip}</TooltipPopup>
113
</Tooltip>
114
) : null}
115
</div>
@@ -225,10 +220,7 @@ function TraceIdCell({ traceId }: { traceId: string }) {
220
</span>
221
}
222
/>
228
- <TooltipPopup
229
- side="top"
230
- className="max-w-[min(520px,calc(100vw-2rem))] break-all font-mono text-[11px]"
231
- >
223
+ <TooltipPopup side="top" variant="code">
224
{traceId}
225
</TooltipPopup>
226
</Tooltip>
@@ -300,10 +292,7 @@ function ProcessNameCell({
292
<TooltipTrigger
293
render={<span className="min-w-0 truncate font-medium text-foreground">{name}</span>}
294
/>
303
- <TooltipPopup
304
- side="top"
305
- className="max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px] leading-relaxed text-wrap"
306
- >
295
+ <TooltipPopup side="top" variant="code">
296
{process.command}
297
</TooltipPopup>
298
</Tooltip>
@@ -411,10 +400,7 @@ function ProcessDiagnosticsTable({
400
<TooltipTrigger
401
render={<span className="block truncate">{process.command}</span>}
402
/>
414
- <TooltipPopup
415
- side="top"
416
- className="max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px] leading-relaxed text-wrap"
417
- >
403
+ <TooltipPopup side="top" variant="code">
404
{process.command}
405
</TooltipPopup>
406
</Tooltip>
@@ -484,10 +470,7 @@ function ResourceHistoryProcessNameCell({
470
<TooltipTrigger
471
render={<span className="min-w-0 truncate font-medium text-foreground">{name}</span>}
472
/>
487
- <TooltipPopup
488
- side="top"
489
- className="max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px] leading-relaxed text-wrap"
490
- >
473
+ <TooltipPopup side="top" variant="code">
474
{process.command}
475
</TooltipPopup>
476
</Tooltip>
@@ -654,10 +637,7 @@ function ProcessResourceHistoryTable({
637
<TooltipTrigger
638
render={<span className="block truncate">{process.command}</span>}
639
/>
657
- <TooltipPopup
658
- side="top"
659
- className="max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px] leading-relaxed text-wrap"
660
- >
640
+ <TooltipPopup side="top" variant="code">
641
{process.command}
642
</TooltipPopup>
643
</Tooltip>
apps/web/src/components/settings/KeybindingsSettings.tsx
+1
-3
@@ -261,9 +261,7 @@ function WarningTooltipIcon({
261
>
262
<TriangleAlertIcon className="size-3.5" />
263
</TooltipTrigger>
264
- <TooltipPopup side="top" className="max-w-72 whitespace-normal leading-relaxed">
265
- {children}
266
- </TooltipPopup>
264
+ <TooltipPopup side="top">{children}</TooltipPopup>
265
</Tooltip>
266
);
267
}
apps/web/src/components/settings/ResourceTelemetryDiagnostics.tsx
+2
-8
@@ -503,10 +503,7 @@ function ProcessTreeName({
503
<TooltipTrigger
504
render={<span className="min-w-0 truncate font-medium text-foreground">{name}</span>}
505
/>
506
- <TooltipPopup
507
- side="top"
508
- className="max-w-[min(520px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px]"
509
- >
506
+ <TooltipPopup side="top" variant="code">
507
{process.command || process.name}
508
</TooltipPopup>
509
</Tooltip>
@@ -721,10 +718,7 @@ function HistoryProcessTable({
718
</span>
719
}
720
/>
724
- <TooltipPopup
725
- side="top"
726
- className="max-w-[min(520px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-[11px]"
727
- >
721
+ <TooltipPopup side="top" variant="code">
722
{process.command || process.name}
723
</TooltipPopup>
724
</Tooltip>
apps/web/src/components/settings/settingsLayout.tsx
+2
-6
@@ -156,9 +156,7 @@ export function PolicyTooltip({ children }: { readonly children: string }) {
156
</Button>
157
}
158
/>
159
- <TooltipPopup side="top" className="max-w-72">
160
- {children}
161
- </TooltipPopup>
159
+ <TooltipPopup side="top">{children}</TooltipPopup>
160
</Tooltip>
161
);
162
}
@@ -372,9 +370,7 @@ export function SettingsRow({
370
{control}
371
</div>
372
</TooltipTrigger>
375
- <TooltipPopup side="top" className="max-w-72">
376
- {message}
377
- </TooltipPopup>
373
+ <TooltipPopup side="top">{message}</TooltipPopup>
374
</Tooltip>
375
);
376
// A mixed selection keeps the real control with "Mixed" as its placeholder
apps/web/src/components/ui/alert-dialog.tsx
+1
-1
@@ -101,7 +101,7 @@ function AlertDialogFooter({
101
function AlertDialogTitle({ className, ...props }: AlertDialogPrimitive.Title.Props) {
102
return (
103
<AlertDialogPrimitive.Title
104
- className={cn("font-heading font-semibold text-xl leading-none", className)}
104
+ className={cn("wrap-anywhere font-heading font-semibold text-xl leading-none", className)}
105
data-slot="alert-dialog-title"
106
{...props}
107
/>
apps/web/src/components/ui/dialog.tsx
+1
-1
@@ -145,7 +145,7 @@ function DialogFooter({
145
function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
146
return (
147
<DialogPrimitive.Title
148
- className={cn("font-heading font-semibold text-xl leading-none", className)}
148
+ className={cn("wrap-anywhere font-heading font-semibold text-xl leading-none", className)}
149
data-slot="dialog-title"
150
{...props}
151
/>
apps/web/src/components/ui/tooltip.tsx
+6
-1
@@ -23,7 +23,8 @@ function TooltipPopup({
23
align?: TooltipPrimitive.Positioner.Props["align"];
24
side?: TooltipPrimitive.Positioner.Props["side"];
25
sideOffset?: TooltipPrimitive.Positioner.Props["sideOffset"];
26
- variant?: "default" | "glass";
26
+ /** `code` renders monospace content that breaks anywhere, for paths and commands. */
27
+ variant?: "default" | "glass" | "code";
28
anchor?: TooltipPrimitive.Positioner.Props["anchor"];
29
}) {
30
return (
@@ -42,6 +43,10 @@ function TooltipPopup({
43
variant === "glass"
44
? "dropdown-glass shadow-xl shadow-black/25 before:hidden"
45
: "border bg-popover not-dark:bg-clip-padding shadow-md/5",
46
+ // One wrap width for prose; code dumps get more room and break anywhere.
47
+ variant === "code"
48
+ ? "max-w-120 wrap-anywhere text-left font-mono text-[11px] leading-relaxed"
49
+ : "max-w-80 wrap-anywhere whitespace-normal leading-snug",
50
className,
51
)}
52
data-slot="tooltip-popup"
apps/web/src/components/usage/UsageLimits.tsx
+1
-1
@@ -127,7 +127,7 @@ function WindowBar({
127
/>
128
) : null}
129
</TooltipTrigger>
130
- <TooltipPopup side="top" className="max-w-72 text-xs">
130
+ <TooltipPopup side="top">
131
<div className="flex flex-col gap-0.5">
132
<span className="text-foreground">
133
{remaining}% left{timeLeft !== null ? ` · ${timeLeft}% of the window left` : ""}
apps/web/src/routes/_chat.pull-requests.tsx
+1
-3
@@ -2280,9 +2280,7 @@ function CompactFilterMenu<Value extends string>({
2280
) : (
2281
<Tooltip key={option.value}>
2282
<TooltipTrigger render={item} />
2283
- <TooltipPopup side="right" className="max-w-64 break-words">
2284
- {option.unavailable}
2285
- </TooltipPopup>
2283
+ <TooltipPopup side="right">{option.unavailable}</TooltipPopup>
2284
</Tooltip>
2285
);
2286
})}
scripts/lint-restyle-ceiling.ts
+1
-1
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
8
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
9
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
10
// migrate a file, and delete this script when the rule becomes an error.
11
-export const RESTYLE_CEILING = 981;
11
+export const RESTYLE_CEILING = 921;
12
13
const RULE = "shadcn(no-restyle)";
14