From e60459673df78a6d2055b8b2499041920a66e3f9 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 15 Jun 2026 15:51:33 +0800 Subject: [PATCH] Fix short-window layout overflow --- .../typography-overflow-contract.test.ts | 5 +++- desktop/frontend/src/styles.css | 24 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/desktop/frontend/src/__tests__/typography-overflow-contract.test.ts b/desktop/frontend/src/__tests__/typography-overflow-contract.test.ts index e2a3bf7d0..0e26f24c5 100644 --- a/desktop/frontend/src/__tests__/typography-overflow-contract.test.ts +++ b/desktop/frontend/src/__tests__/typography-overflow-contract.test.ts @@ -100,7 +100,10 @@ eq( ); eq(finalDeclaration(".statusbar", "white-space"), "nowrap", "status bar keeps metrics on one row"); -eq(finalDeclaration(".statusbar", "overflow"), "hidden", "status bar clips instead of overflowing"); +eq(finalDeclaration(".statusbar", "overflow-x"), "auto", "status bar can scroll to reveal all metrics"); +eq(finalDeclaration(".statusbar", "overflow-y"), "hidden", "status bar stays one-line vertically"); +eq(finalDeclaration(".chat-pane", "overflow-y"), "auto", "chat pane scrolls when the window is too short"); +eq(finalDeclaration(".sidebar", "overflow-y"), "auto", "sidebar scrolls when the window is too short"); clipsSingleLine(".statusbar__model"); for (const selector of [ diff --git a/desktop/frontend/src/styles.css b/desktop/frontend/src/styles.css index 26551b277..63ec070fd 100644 --- a/desktop/frontend/src/styles.css +++ b/desktop/frontend/src/styles.css @@ -1606,7 +1606,13 @@ a[href] { border-right: 1px solid var(--border-soft); --wails-draggable: drag; user-select: none; - overflow: hidden; + overflow-x: hidden; + overflow-y: auto; + scrollbar-width: none; +} + +.sidebar::-webkit-scrollbar { + display: none; } .app--darwin .sidebar { @@ -2084,6 +2090,8 @@ a[href] { min-width: 0; min-height: 0; background: var(--chat-bg); + overflow-x: hidden; + overflow-y: auto; } /* ── top bar (drag region) ───────────────────────────────────────────────── */ @@ -5274,7 +5282,19 @@ a[href] { CJK text breaks one character per line. The metric chips keep their width (flex-shrink: 0) and only the model label ellipsizes to absorb the squeeze. */ white-space: nowrap; - overflow: hidden; + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: thin; +} +.statusbar::-webkit-scrollbar { + height: 4px; +} +.statusbar::-webkit-scrollbar-thumb { + border-radius: 999px; + background: color-mix(in srgb, var(--fg-faint) 30%, transparent); +} +.statusbar::-webkit-scrollbar-track { + background: transparent; } .statusbar > * { flex-shrink: 0;