Skip to content

Commit 3e7a983

Browse files
lidge-junclaude
andcommitted
fix(gui): resolve mobile horizontal overflow + table scroll + accent checkboxes
Audited Providers/Models/Subagents/Logs (clean in light) and stress-tested mobile, which exposed a global horizontal-overflow bug: the sticky top-bar nav (5 nowrap tabs) wasn't shrinking, inflating the shared grid column so every page scrolled sideways. Fix: min-width:0 on .sidebar and .sidebar nav so the tab strip scrolls internally instead of forcing the column wide. Also: tables scroll horizontally on mobile (.tbl-wrap overflow-x:auto + mobile .tbl min-width) instead of clipping; .stat-row minmax(0,1fr) guard; accent-color on native checkboxes (Logs Auto-refresh) to match indigo. CSS-only. gui build + root tsc clean; 94 tests pass; mobile re-verified by screenshot (Dashboard tiles fit + table scrolls in-card; Logs no page scroll). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5280c00 commit 3e7a983

2 files changed

Lines changed: 61 additions & 4 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# 160.12 — Phase 1.2: Mobile Overflow Fix + Remaining-Page Audit
2+
3+
- **Status:** Done
4+
- **Date:** 2026-06-20
5+
- **Work class:** C2 (gui CSS only, reversible)
6+
- **Follows:** [11_dashboard-refinements.md](11_dashboard-refinements.md)
7+
8+
## Why
9+
10+
The objective is console-wide ("전반적으로 ui ux ... 더 미려한"), but only the Dashboard had
11+
been verified in light/dark/mobile. Audited the other four pages and stress-tested mobile.
12+
13+
## Audit result (Providers / Models / Subagents / Logs)
14+
15+
Screenshotted each in light desktop — all render cleanly and consistently via the shared token
16+
system (indigo toggles, provider cards, login panel, featured/search lists). No per-page work
17+
needed. **But mobile exposed a real bug.**
18+
19+
## Bug: global horizontal overflow on mobile (root-caused)
20+
21+
Every page (even Logs, which has no table) scrolled horizontally at ≤760px — stat tiles and
22+
content cut off, page-level scrollbar. Diagnosis by elimination (Logs has no table yet
23+
overflowed → not the table → global → the sidebar):
24+
25+
- The mobile top-bar `.sidebar nav` is a horizontal strip of 5 nowrap tabs (~500px of content)
26+
with `overflow-x: auto`. As a flex item with `flex: 1 1 100%` it was **not shrinking** — its
27+
content width fed the grid column's `auto` minimum. Since the sticky sidebar shares the single
28+
grid column with `.main`, that forced **every page's** content wider than the viewport.
29+
- `.main` already had `min-width: 0`; `.sidebar` did not.
30+
31+
**Fix** (the classic flexbox overflow cure): `min-width: 0` on `.sidebar` (so its content can't
32+
inflate the grid column) and on `.sidebar nav` (so the tab strip shrinks to the viewport and
33+
scrolls internally instead of overflowing).
34+
35+
## Other mobile/polish fixes (same pass)
36+
37+
- `.tbl-wrap`: `overflow: hidden``overflow-x: auto`, plus mobile `.tbl { min-width: 460px }`
38+
— data tables (Dashboard providers, Logs) now **scroll horizontally within their card** on
39+
mobile instead of clipping the MODEL column (dev-frontend mobile-ux: "data table → horizontal scroll").
40+
- `.stat-row` mobile: `repeat(2, 1fr)``repeat(2, minmax(0, 1fr))` — defensive guard against
41+
grid track blowout.
42+
- `input[type=checkbox|radio] { accent-color: var(--accent) }` — native controls (Logs
43+
"Auto-refresh") now match the indigo accent instead of browser blue.
44+
45+
## Files
46+
- `gui/src/styles.css` (CSS only; no TSX change).
47+
48+
## Verification
49+
- `bun run build` (tsc -b && vite build) → clean.
50+
- `bun x tsc --noEmit` exit 0; `bun test tests`**94 pass / 0 fail**.
51+
- Mobile (390px) re-screenshot: Dashboard tiles fit + providers table scrolls in-card; Logs
52+
title/empty-state fit with **no page scrollbar**. Confirmed both light layout and the grouped
53+
model list (ANTHROPIC 10 + OPENCODE-GO 20) render correctly.

gui/src/styles.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
7676

7777
::selection { background: var(--accent-soft); }
7878

79+
/* native controls (checkbox/radio) follow the accent instead of browser blue */
80+
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
81+
7982
/* scrollbars */
8083
*::-webkit-scrollbar { width: 10px; height: 10px; }
8184
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; border: 2px solid var(--bg); }
@@ -190,7 +193,7 @@ h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
190193
.tbl tbody tr:last-child td { border-bottom: none; }
191194
.tbl tbody tr:hover td { background: var(--hover); }
192195
.tbl .num { text-align: right; font-family: var(--mono); }
193-
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
196+
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
194197

195198
/* ---- inputs ---- */
196199
.input, textarea.input {
@@ -258,7 +261,7 @@ select.input { appearance: none; }
258261
.sidebar {
259262
position: sticky; top: 0; z-index: 20; height: auto;
260263
flex-flow: row wrap; align-items: center; gap: 0;
261-
padding: 0 10px;
264+
padding: 0 10px; min-width: 0; /* grid item: don't let nav content force the column wide */
262265
border-right: none; border-bottom: 1px solid var(--border);
263266
background: var(--rail);
264267
}
@@ -268,7 +271,7 @@ select.input { appearance: none; }
268271
.theme-toggle { min-height: 44px; min-width: 44px; justify-content: center; padding: 8px; }
269272
.theme-toggle .mode { display: none; } /* icon-only toggle on mobile */
270273
.sidebar nav {
271-
order: 3; flex: 1 1 100%;
274+
order: 3; flex: 1 1 100%; min-width: 0; /* allow shrink below content so tabs scroll, not overflow */
272275
display: flex; flex-direction: row; gap: 2px;
273276
overflow-x: auto; overscroll-behavior-x: contain;
274277
padding: 4px 0 8px; margin: 0;
@@ -278,5 +281,6 @@ select.input { appearance: none; }
278281
.sidebar nav::-webkit-scrollbar { display: none; }
279282
.nav-item { width: auto; white-space: nowrap; min-height: 44px; padding: 9px 14px; font-size: 14px; }
280283
.main-inner { padding: 22px 18px 48px; }
281-
.stat-row { grid-template-columns: repeat(2, 1fr); }
284+
.stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
285+
.tbl { min-width: 460px; } /* keep columns readable; .tbl-wrap scrolls horizontally */
282286
}

0 commit comments

Comments
 (0)