From 8ef1b428a30dee7e1dc767fc9e1563d11cc8dfaf Mon Sep 17 00:00:00 2001 From: Nicolas Varrot Date: Thu, 12 Feb 2026 12:42:20 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20mobile=20viewport=20overflow=20=E2=80=94?= =?UTF-8?q?=20prevent=20horizontal=20clipping=20on=20iPhone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add overflow-x: hidden on html/body and max-width: 100vw - Add overflow-x: hidden on root app container - Add overflow-x: hidden on chat scroll container - Make markdown tables scrollable with display: block + overflow-x: auto - Add overflow-hidden + min-w-0 on expanded tool call content - Fix tool result summary max-width from max-w-md to max-w-full Fixes #26 --- src/App.tsx | 2 +- src/components/Chat.tsx | 4 ++-- src/components/ToolCall.tsx | 4 ++-- src/index.css | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 2fc9d18..0035bc3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -74,7 +74,7 @@ export default function App() { } return ( -
+
-
-
+
+
{messages.length === 0 && isLoadingHistory && (
diff --git a/src/components/ToolCall.tsx b/src/components/ToolCall.tsx index 7871863..b2498ac 100644 --- a/src/components/ToolCall.tsx +++ b/src/components/ToolCall.tsx @@ -237,14 +237,14 @@ export function ToolCall({ name, input, result }: { name: string; input?: Record {/* Result summary (always visible if result exists) */} {result && !open && ( -
+
{truncateResult(result)}
)} {/* Expanded content */} {open && ( -
+
{inputStr && (
{t('tool.parameters')}
diff --git a/src/index.css b/src/index.css index 465c88e..02f12a7 100644 --- a/src/index.css +++ b/src/index.css @@ -6,11 +6,13 @@ scrollbar-color: #52525b #27272a; } -body { +html, body { margin: 0; background: #1e1e24; color: #d4d4d8; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; + overflow-x: hidden; + max-width: 100vw; } @keyframes fade-in { @@ -80,7 +82,7 @@ body { .markdown-body blockquote { border-left: 3px solid rgba(34,211,238,0.4); padding-left: 12px; margin: 8px 0; opacity: 0.8; } .markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 12px 0 4px; } .markdown-body a { color: #67e8f9; text-decoration: underline; } -.markdown-body table { border-collapse: collapse; margin: 8px 0; } +.markdown-body table { border-collapse: collapse; margin: 8px 0; display: block; overflow-x: auto; max-width: 100%; } .markdown-body th, .markdown-body td { border: 1px solid rgba(255,255,255,0.08); padding: 6px 12px; } .markdown-body th { background: rgba(255,255,255,0.04); } .markdown-body img { max-width: 100%; border-radius: 8px; }