From 4c9fbf1f647c83179af1c2acd78eded04ef07fe8 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 22 Sep 2026 12:22:16 -0700 Subject: [PATCH] refactor(web): InlineButton underlines on hover and takes a tone (#13034) Co-authored-by: Claude Fable 5 --- apps/web/src/components/Sidebar.tsx | 2 +- .../src/components/ThreadStatusIndicators.tsx | 52 ++++++++++--------- .../pullRequest/PullRequestGhosts.tsx | 5 +- .../components/settings/ExpandableText.tsx | 3 +- .../settings/ProcessSignalActions.tsx | 4 +- .../settings/SettingInheritance.tsx | 10 +--- .../sidebar/SidebarThreadUndoNotice.tsx | 6 +-- apps/web/src/components/ui/button.tsx | 43 +++++++++------ scripts/lint-restyle-ceiling.ts | 2 +- 9 files changed, 65 insertions(+), 62 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index a4dc6820d5183d38aa6270984432cd0242b56008..8740949ed0bfa94193d1d0fc33e17cf300f8a772 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -1374,7 +1374,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { if (!showSnoozeButton) setSnoozeMenuOpen(false); }, [showSnoozeButton]); const handlePrClick = useCallback( - (event: ReactMouseEvent) => { + (event: ReactMouseEvent) => { const url = pr?.url ?? currentLinkedPr?.url; if (!url) return; const openedInRightPanel = openPrLink( diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsx index 5b2945042ac27e4c3ef0637b6cdc4cde8a266d8c..8b27b74fd0a5dde95ba36546f7cfa482e5767a76 100644 --- a/apps/web/src/components/ThreadStatusIndicators.tsx +++ b/apps/web/src/components/ThreadStatusIndicators.tsx @@ -16,7 +16,7 @@ import { } from "@t3tools/shared/threadPullRequests"; import { FolderGit2Icon, TerminalIcon } from "lucide-react"; import { useMemo, type MouseEvent } from "react"; -import { buttonVariants, InlineButton } from "./ui/button"; +import { Button, InlineButton } from "./ui/button"; import { cn } from "../lib/utils"; import { useEnvironment, usePrimaryEnvironmentId } from "../state/environments"; import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon"; @@ -207,50 +207,52 @@ export function ThreadPullRequestBadgeControl({ url?: string | undefined; status: PrStatusIndicator | null; onOpenStack: () => void; - onOpenPullRequest: (event: MouseEvent) => void; + onOpenPullRequest: (event: MouseEvent) => void; }) { const presentation = resolveThreadPullRequestBadgePresentation({ badge, number, url, status }); if (presentation === null) return null; const isStack = badge?.kind === "stack"; - const className = cn( - variant === "ghost" - ? buttonVariants({ variant: "ghost", size: "xs" }) - : "inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap border-b border-transparent hover:border-current focus-visible:outline-2 focus-visible:outline-ring", - "text-xs tabular-nums", - variant === "ghost" && - "font-normal text-xs! active:scale-100 [--control-icon-color:currentColor]", - presentation.toneClassName, - ); const content = ( <> {presentation.text} ); + const linkProps = isStack + ? { + onClick: (event: MouseEvent) => { + event.preventDefault(); + event.stopPropagation(); + onOpenStack(); + }, + } + : { onClick: onOpenPullRequest }; + const element = isStack ? ( +