From 7c90ef7c52cdc8a10cf5c3e636bcc200af947c50 Mon Sep 17 00:00:00 2001 From: HCL Date: Tue, 3 Mar 2026 08:40:35 +0800 Subject: [PATCH] fix(webui): prevent inline code from breaking mid-token on copy/paste The parent `.chat-text` applies `overflow-wrap: anywhere; word-break: break-word;` which forces long tokens (UUIDs, hashes) inside inline `` to break across visual lines. When copied, the browser injects spaces at those break points, corrupting the pasted value. Override with `overflow-wrap: normal; word-break: keep-all;` on inline `` selectors so tokens stay intact. Fixes #32230 Signed-off-by: HCL --- ui/src/styles/chat/text.css | 2 ++ ui/src/styles/components.css | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ui/src/styles/chat/text.css b/ui/src/styles/chat/text.css index d6eea9866b2..6598af7a072 100644 --- a/ui/src/styles/chat/text.css +++ b/ui/src/styles/chat/text.css @@ -60,6 +60,8 @@ background: rgba(0, 0, 0, 0.15); padding: 0.15em 0.4em; border-radius: 4px; + overflow-wrap: normal; + word-break: keep-all; } .chat-text :where(pre) { diff --git a/ui/src/styles/components.css b/ui/src/styles/components.css index c7a6a425dc7..47797e6b53c 100644 --- a/ui/src/styles/components.css +++ b/ui/src/styles/components.css @@ -1895,6 +1895,8 @@ border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--secondary); + overflow-wrap: normal; + word-break: keep-all; } :root[data-theme="light"] .chat-text :where(:not(pre) > code) {