@devries-cameron20 / t3code Mirror · read-only / commits / d2b8f291d6
Fork 0

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 21, 19:45 UTC

fix(web): icon-only chat header controls show their name on hover (#35045)

Julius Marminge committed Nov 12, 2026 at 02:59 UTC d2b8f291d6f309d8d47d72d4edef06ceba93a875
3 files changed +148 -108
apps/web/src/components/GitActionsControl.tsx
+53 -37
@@ -1651,28 +1651,36 @@ export default function GitActionsControl({
1651 </PopoverPopup>
1652 </Popover>
1653 ) : (
1654 - <ThreadDetailsControl
1655 - variant="ghost"
1656 - size="xs"
1657 - part="primary"
1658 - panel
1659 - disabled={!canWriteSourceControl || isGitActionRunning || quickAction.disabled}
1660 - onClick={runQuickAction}
1661 - >
1662 - <GitQuickActionIcon
1663 - quickAction={quickAction}
1664 - SourceControlIcon={SourceControlIcon}
1665 - className={THREAD_DETAILS_PANEL_ICON_CLASS}
1666 - />
1667 - <span
1668 - className={cn(
1669 - "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
1670 - cn("not-sr-only ml-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
1671 - )}
1654 + <Tooltip>
1655 + <TooltipTrigger
1656 + render={
1657 + <ThreadDetailsControl
1658 + data-toolbar-control=""
1659 + variant="ghost"
1660 + size="xs"
1661 + part="primary"
1662 + panel
1663 + disabled={!canWriteSourceControl || isGitActionRunning || quickAction.disabled}
1664 + onClick={runQuickAction}
1665 + />
1666 + }
1667 >
1673 - {quickAction.label}
1674 - </span>
1675 - </ThreadDetailsControl>
1668 + <GitQuickActionIcon
1669 + quickAction={quickAction}
1670 + SourceControlIcon={SourceControlIcon}
1671 + className={THREAD_DETAILS_PANEL_ICON_CLASS}
1672 + />
1673 + <span
1674 + className={cn(
1675 + "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
1676 + cn("not-sr-only ml-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
1677 + )}
1678 + >
1679 + {quickAction.label}
1680 + </span>
1681 + </TooltipTrigger>
1682 + <TooltipPopup side="top">{quickAction.label}</TooltipPopup>
1683 + </Tooltip>
1684 )}
1685 {gitActionProgress ? (
1686 <GitActionElapsedTime
@@ -1689,23 +1697,31 @@ export default function GitActionsControl({
1697 }
1698 }}
1699 >
1692 - <MenuTrigger
1693 - render={
1694 - <ThreadDetailsControl
1695 - aria-label="Git action options"
1696 - size="sm"
1697 - variant="ghost"
1698 - part="secondary"
1699 - panel
1700 + <Tooltip>
1701 + <TooltipTrigger
1702 + render={
1703 + <MenuTrigger
1704 + render={
1705 + <ThreadDetailsControl
1706 + aria-label="Git action options"
1707 + data-toolbar-control=""
1708 + size="sm"
1709 + variant="ghost"
1710 + part="secondary"
1711 + panel
1712 + />
1713 + }
1714 + disabled={isGitActionRunning || !hasGitMenuContent}
1715 + />
1716 + }
1717 + >
1718 + <ChevronDownIcon
1719 + aria-hidden="true"
1720 + className={THREAD_DETAILS_PANEL_CHEVRON_CLASS}
1721 />
1701 - }
1702 - disabled={isGitActionRunning || !hasGitMenuContent}
1703 - >
1704 - <ChevronDownIcon
1705 - aria-hidden="true"
1706 - className={THREAD_DETAILS_PANEL_CHEVRON_CLASS}
1707 - />
1708 - </MenuTrigger>
1722 + </TooltipTrigger>
1723 + <TooltipPopup side="top">Git action options</TooltipPopup>
1724 + </Tooltip>
1725 <MenuPopup align="end" anchor={panelAnchorRef} className="w-(--anchor-width)">
1726 {gitItems}
1727 </MenuPopup>
apps/web/src/components/ProjectScriptsControl.tsx
+22 -14
@@ -330,21 +330,29 @@ export default function ProjectScriptsControl({
330 setActionsMenuOpen({ presentation, scripts: open, imports: false })
331 }
332 >
333 - <MenuTrigger
334 - render={
335 - <ThreadDetailsControl
336 - size={isPanel ? "sm" : "icon-xs"}
337 - variant={isPanel ? "ghost" : "outline"}
338 - part="secondary"
339 - panel={isPanel}
340 - aria-label="Script actions"
333 + <Tooltip>
334 + <TooltipTrigger
335 + render={
336 + <MenuTrigger
337 + render={
338 + <ThreadDetailsControl
339 + size={isPanel ? "sm" : "icon-xs"}
340 + variant={isPanel ? "ghost" : "outline"}
341 + part="secondary"
342 + panel={isPanel}
343 + aria-label="Script actions"
344 + data-toolbar-control=""
345 + />
346 + }
347 + />
348 + }
349 + >
350 + <ChevronDownIcon
351 + className={isPanel ? THREAD_DETAILS_PANEL_CHEVRON_CLASS : "size-4"}
352 />
342 - }
343 - >
344 - <ChevronDownIcon
345 - className={isPanel ? THREAD_DETAILS_PANEL_CHEVRON_CLASS : "size-4"}
346 - />
347 - </MenuTrigger>
353 + </TooltipTrigger>
354 + <TooltipPopup side="top">Script actions</TooltipPopup>
355 + </Tooltip>
356 <MenuPopup
357 align="end"
358 {...(isPanel ? { anchor: panelAnchorRef } : {})}
apps/web/src/components/chat/OpenInPicker.tsx
+73 -57
@@ -33,6 +33,7 @@ import {
33 MenuSubPopup,
34 MenuTrigger,
35 } from "../ui/menu";
36 +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
37 import {
38 AntigravityIcon,
39 CursorIcon,
@@ -363,6 +364,50 @@ export const OpenInPicker = memo(function OpenInPicker({
364 );
365 }
366
367 + const primaryControlLabel = compact ? "Open file in preferred editor" : primaryLabel;
368 + const primaryControl = (
369 + <ThreadDetailsControl
370 + aria-label={primaryControlLabel}
371 + // Tooltip replaces the button data-slot, so toolbar theming needs a separate hook.
372 + data-toolbar-control=""
373 + size={isPanel ? "sm" : "xs"}
374 + variant={isPanel ? "ghost" : "outline"}
375 + part="primary"
376 + panel={isPanel}
377 + disabled={!preferredEditor || !openInCwd || !canOpenEditor}
378 + {...(enableShortcut && !backgroundThread ? { [OPEN_FAVORITE_EDITOR_ATTRIBUTE]: "" } : {})}
379 + onClick={() => {
380 + if (!preferredEditor) return;
381 + const label = editorLabelForPlatform(preferredEditor, navigator.platform);
382 + void openInEditor(preferredEditor).then((opened) => {
383 + if (opened) announce(`Opened in ${label}`);
384 + });
385 + }}
386 + >
387 + {primaryOption?.Icon ? (
388 + <primaryOption.Icon
389 + aria-hidden="true"
390 + className={cn(
391 + isPanel ? THREAD_DETAILS_PANEL_ICON_CLASS : "size-3.5",
392 + getOpenInIconClass(primaryOption.kind),
393 + )}
394 + />
395 + ) : isPanel ? (
396 + <SquareArrowOutUpRightIcon aria-hidden="true" className={THREAD_DETAILS_PANEL_ICON_CLASS} />
397 + ) : null}
398 + <span
399 + className={cn(
400 + compact
401 + ? "sr-only"
402 + : "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
403 + isPanel && cn("not-sr-only ml-0 min-w-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
404 + )}
405 + >
406 + {primaryLabel}
407 + </span>
408 + </ThreadDetailsControl>
409 + );
410 +
411 return (
412 <ActionGroup
413 aria-label="Open in editor"
@@ -371,70 +416,41 @@ export const OpenInPicker = memo(function OpenInPicker({
416 ? { className: THREAD_DETAILS_PANEL_SPLIT_GROUP_CLASS, ref: panelAnchorRef }
417 : {})}
418 >
374 - <ThreadDetailsControl
375 - aria-label={compact ? "Open file in preferred editor" : primaryLabel}
376 - size={isPanel ? "sm" : "xs"}
377 - variant={isPanel ? "ghost" : "outline"}
378 - part="primary"
379 - panel={isPanel}
380 - disabled={!preferredEditor || !openInCwd || !canOpenEditor}
381 - {...(enableShortcut && !backgroundThread ? { [OPEN_FAVORITE_EDITOR_ATTRIBUTE]: "" } : {})}
382 - onClick={() => {
383 - if (!preferredEditor) return;
384 - const label = editorLabelForPlatform(preferredEditor, navigator.platform);
385 - void openInEditor(preferredEditor).then((opened) => {
386 - if (opened) announce(`Opened in ${label}`);
387 - });
388 - }}
389 - >
390 - {primaryOption?.Icon ? (
391 - <primaryOption.Icon
392 - aria-hidden="true"
393 - className={cn(
394 - isPanel ? THREAD_DETAILS_PANEL_ICON_CLASS : "size-3.5",
395 - getOpenInIconClass(primaryOption.kind),
396 - )}
397 - />
398 - ) : isPanel ? (
399 - <SquareArrowOutUpRightIcon
400 - aria-hidden="true"
401 - className={THREAD_DETAILS_PANEL_ICON_CLASS}
402 - />
403 - ) : null}
404 - <span
405 - className={cn(
406 - compact
407 - ? "sr-only"
408 - : "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
409 - isPanel && cn("not-sr-only ml-0 min-w-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
410 - )}
411 - >
412 - {primaryLabel}
413 - </span>
414 - </ThreadDetailsControl>
419 + <Tooltip>
420 + <TooltipTrigger render={primaryControl} />
421 + <TooltipPopup side="top">{primaryControlLabel}</TooltipPopup>
422 + </Tooltip>
423 {isPanel ? (
424 <span aria-hidden="true" className={THREAD_DETAILS_PANEL_SPLIT_SEPARATOR_CLASS} />
425 ) : (
426 <GroupSeparator {...(!compact ? { className: "hidden @3xl/header-actions:block" } : {})} />
427 )}
428 <Menu open={menuOpen} onOpenChange={setMenuOpen}>
421 - <MenuTrigger
422 - disabled={isHostEditorDenied}
423 - render={
424 - <ThreadDetailsControl
425 - aria-label="Choose editor"
426 - size={isPanel ? "sm" : "icon-xs"}
427 - variant={isPanel ? "ghost" : "outline"}
428 - part="secondary"
429 - panel={isPanel}
429 + <Tooltip>
430 + <TooltipTrigger
431 + render={
432 + <MenuTrigger
433 + disabled={isHostEditorDenied}
434 + render={
435 + <ThreadDetailsControl
436 + aria-label="Choose editor"
437 + data-toolbar-control=""
438 + size={isPanel ? "sm" : "icon-xs"}
439 + variant={isPanel ? "ghost" : "outline"}
440 + part="secondary"
441 + panel={isPanel}
442 + />
443 + }
444 + />
445 + }
446 + >
447 + <ChevronDownIcon
448 + aria-hidden="true"
449 + className={isPanel ? THREAD_DETAILS_PANEL_CHEVRON_CLASS : "size-4"}
450 />
431 - }
432 - >
433 - <ChevronDownIcon
434 - aria-hidden="true"
435 - className={isPanel ? THREAD_DETAILS_PANEL_CHEVRON_CLASS : "size-4"}
436 - />
437 - </MenuTrigger>
451 + </TooltipTrigger>
452 + <TooltipPopup side="top">Choose editor</TooltipPopup>
453 + </Tooltip>
454 <MenuPopup
455 align="end"
456 {...(isPanel ? { anchor: panelAnchorRef } : {})}