fix(web): hide assistant message copy button on mobile (#456) (#458)

The copy button on assistant messages was always visible on mobile
(opacity-60), positioned as a detached row below the message content.
Hide it entirely on small screens (hidden sm:flex) and keep hover-only
behavior on desktop. Mobile users can still copy via native long-press
text selection.

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
This commit is contained in:
Haoqing Wang
2026-04-14 17:40:29 +08:00
committed by GitHub
co-authored by HAPI
parent fa8cf53c56
commit 09c2c57eaf
@@ -57,7 +57,7 @@ export function HappyAssistantMessage() {
<MessagePrimitive.Content components={MESSAGE_PART_COMPONENTS} />
</div>
{copyText && (
<div className="flex justify-end mt-1 opacity-60 sm:opacity-0 sm:group-hover/msg:opacity-100 transition-opacity">
<div className="hidden sm:flex justify-end mt-1 opacity-0 group-hover/msg:opacity-100 transition-opacity">
<button
type="button"
title="Copy"