From fd25e5732f7ff1c02a49fe268731403f2a6bcdfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Sat, 30 May 2026 18:57:55 +0800 Subject: [PATCH] fix: hide message actions after pointer clicks #642 Message action controls stay visible through focus-within for keyboard navigation, but pointer clicks left the copy/fork buttons focused after the mouse moved away. Release pointer focus on message actions so hover controls return to their quiet state while keeping Tab focus behavior intact. Constraint: Message actions use focus-within for keyboard accessibility and should not remove that path. Rejected: Remove focus-within reveal | would regress keyboard users who tab to copy or fork. Confidence: high Scope-risk: narrow Directive: Keep pointer-only blur scoped to message action controls; do not remove focus-within without a replacement keyboard affordance. Tested: cd desktop && bun run test src/components/chat/MessageList.test.tsx --run Tested: bun run check:desktop Not-tested: Live Tauri manual hover smoke Related: #642 --- .../src/components/chat/MessageActionBar.tsx | 2 ++ .../src/components/chat/MessageList.test.tsx | 27 +++++++++++++++++++ desktop/src/components/shared/CopyButton.tsx | 5 +++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/desktop/src/components/chat/MessageActionBar.tsx b/desktop/src/components/chat/MessageActionBar.tsx index 47647272..a0d09102 100644 --- a/desktop/src/components/chat/MessageActionBar.tsx +++ b/desktop/src/components/chat/MessageActionBar.tsx @@ -52,6 +52,7 @@ export function MessageActionBar({ label={copyLabel} displayLabel={