Skip to content

Commit b02e0db

Browse files
t3dotggclaude
andcommitted
refactor(web): build the new notices from shared button primitives
The header pill is a Button, the timeline Compact is an InlineButton, and the strip Update keeps only typography over the xs ghost Button it wraps. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 91a7c1f commit b02e0db

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

‎apps/web/src/components/BranchToolbarServerUpdate.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function BranchToolbarServerUpdate({
6565
manualLabel="Update"
6666
variant="ghost"
6767
size="xs"
68-
className="h-7 px-1.5 font-normal text-foreground text-xs! sm:h-6"
68+
className="font-normal text-xs!"
6969
/>
7070
</TooltipTrigger>
7171
<TooltipPopup side="top">

‎apps/web/src/components/chat/ChatHeader.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import GitActionsControl from "../GitActionsControl";
2626
import { isTrailingDoubleClick } from "../Sidebar.logic";
2727
import { type DraftId } from "~/composerDraftStore";
28+
import { Button } from "../ui/button";
2829
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
2930
import { toastManager } from "../ui/toast";
3031
import ProjectScriptsControl, {
@@ -413,11 +414,12 @@ export const ChatHeader = memo(function ChatHeader({
413414
<Tooltip>
414415
<TooltipTrigger
415416
render={
416-
<button
417-
type="button"
417+
<Button
418+
size="xs"
419+
variant="ghost-muted"
418420
data-thread-parked={parkedState.kind}
419421
onClick={parkedState.onRelease}
420-
className="ml-2 inline-flex h-5 shrink-0 cursor-pointer items-center gap-1 rounded-full border border-border/80 px-1.5 text-[11px] font-medium text-muted-foreground transition-colors hover:border-foreground/40 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
422+
className="ml-2 h-5 rounded-full border-border/80 px-1.5 text-[11px] sm:h-5 [:hover,[data-pressed]]:border-foreground/40"
421423
/>
422424
}
423425
>

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ import type {
133133
ComposerContextRecord,
134134
KnownComposerContextRecord,
135135
} from "@t3tools/contracts";
136-
import { Button } from "../ui/button";
136+
import { Button, InlineButton } from "../ui/button";
137137
import type { QueuedComposerMessage } from "../../queuedMessageStore";
138138
import { useAssetUrlRefresh, useAssetUrls, useAssetUrlState } from "../../assets/assetUrls";
139139
import { MediaVideoPlayer } from "../media/MediaVideoPlayer";
@@ -1659,13 +1659,12 @@ function ContextOfferTimelineRow({
16591659
<span aria-hidden="true" className="text-muted-foreground/40">
16601660
·
16611661
</span>
1662-
<button
1663-
type="button"
1664-
className="rounded-sm text-foreground/85 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring"
1662+
<InlineButton
1663+
className="text-foreground/85 hover:text-foreground"
16651664
onClick={ctx.onCompactContext}
16661665
>
16671666
Compact
1668-
</button>
1667+
</InlineButton>
16691668
</>
16701669
) : null}
16711670
</span>

0 commit comments

Comments
 (0)