Skip to content

Commit f4f791e

Browse files
maria-rcksclaude
andcommitted
fix(web): show message copy buttons on touch devices
On mobile web the user- and assistant-message action rows were only revealed by hover or focus-within, so the copy button was invisible and undiscoverable on a phone. Both rows now stay at full opacity under `@media (pointer: coarse)` via the `pointer-coarse:` variant already used elsewhere in apps/web. Hover devices are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent b7b3ef1 commit f4f791e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message"
15821582
markdownCwd={ctx.markdownCwd}
15831583
/>
15841584
</div>
1585-
<div className="flex w-full max-w-[80%] items-center justify-end pe-1 text-xs tabular-nums opacity-0 transition-opacity duration-200 focus-within:opacity-100 group-hover:opacity-100">
1585+
<div className="flex w-full max-w-[80%] items-center justify-end pe-1 text-xs tabular-nums opacity-0 transition-opacity duration-200 pointer-coarse:opacity-100 focus-within:opacity-100 group-hover:opacity-100">
15861586
<div className="flex shrink-0 items-center gap-2">
15871587
<Tooltip>
15881588
<TooltipTrigger render={<p className="text-muted-foreground text-xs tabular-nums" />}>
@@ -1734,7 +1734,7 @@ function AssistantMessageMeta({
17341734
"flex items-center gap-2 text-xs tabular-nums transition-opacity duration-200",
17351735
alwaysVisible
17361736
? "opacity-100"
1737-
: "opacity-0 focus-within:opacity-100 group-hover/assistant:opacity-100",
1737+
: "opacity-0 pointer-coarse:opacity-100 focus-within:opacity-100 group-hover/assistant:opacity-100",
17381738
className,
17391739
)}
17401740
>

0 commit comments

Comments
 (0)