From 28cd2971a3a3ba96cdc6a79121043b07112e20fa Mon Sep 17 00:00:00 2001 From: yifei tang Date: Mon, 16 Nov 2026 14:16:19 +0800 Subject: [PATCH] fix(gui): prevent horizontal overflow in chat panel when zoomed --- gui/src/components/Layout.tsx | 4 +++- gui/src/index.css | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 46b66f3f5d7..d5b70e3d2bc 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -34,7 +34,9 @@ const GridDiv = styled.div` display: grid; grid-template-rows: 1fr auto; height: 100vh; - overflow-x: visible; + min-width: 0; + max-width: 100%; + overflow-x: hidden; `; const Layout = () => { diff --git a/gui/src/index.css b/gui/src/index.css index fce97497e9f..020bdb7bfe5 100644 --- a/gui/src/index.css +++ b/gui/src/index.css @@ -24,6 +24,11 @@ html, body, #root { height: 100%; + width: 100%; + max-width: 100%; + min-width: 0; + overflow-x: hidden; + box-sizing: border-box; line-height: 1.3; background-color: var(--vscode-editor-background); font-family: @@ -144,3 +149,20 @@ body { font-weight: 600; letter-spacing: 0.02em; } + +#root [class*="flex"] { + min-width: 0; +} + +.thread-message { + min-width: 0; + max-width: 100%; + overflow-x: hidden; + overflow-wrap: anywhere; + word-break: break-word; +} + +.thread-message pre { + max-width: 100%; + overflow-x: auto; +}