From 7f513662e4555a9add9544c14d5cee36b9ba016a Mon Sep 17 00:00:00 2001 From: JonathanLab Date: Thu, 30 Jul 2026 12:29:12 +0200 Subject: [PATCH] fix(ui): let users select and copy chat thread text Quill's ContextMenuTrigger hardcodes `select-none` on its rendered element (`className: cn("select-none", className)`). MessageContextMenu wraps every message bubble in that trigger, so the class landed on each ChatMessage root and, because `user-select` inherits in Chromium, every descendant down to the message `

` computed to `user-select: none`. The visible effect was that a drag produced no usable selection at all: a Range over the text serialised to `""`, so copy came back empty. Quill's `cn` is tailwind-merge, so passing `select-text` at the call site wins over the hardcoded `select-none` without touching the package. Scoped to the chat thread; the other two ContextMenuTrigger call sites (tab pills, channel rows) are chrome where `select-none` is correct. Verified against the running dev app over CDP, same synthetic mouse drag both ways: `select-none` selects `""`, `select-text` selects the message text. User bubbles and assistant prose both go through this trigger, and the right-click "Copy message" / "Show raw logs" menu still opens. Generated-By: PostHog Code Task-Id: c0412de8-5b4e-4f02-857e-20297eb9c77d --- .../src/features/sessions/components/chat-thread/ChatThread.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx b/packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx index dbacd99334..46ae7513f0 100644 --- a/packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx +++ b/packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsx @@ -520,7 +520,7 @@ function MessageContextMenu({ const { setShowRawLogs } = useSessionViewActions(); return ( - +