From 10ad0caea72e725ef8b37140c18a865ba7646353 Mon Sep 17 00:00:00 2001 From: surenny233 Date: Thu, 7 May 2026 15:20:19 +0800 Subject: [PATCH 1/6] feat(dashboard): mobile-responsive UI for review on phones (AUT-54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewers commonly work from phones, but the dashboard was desktop-first (fixed 220px sidebar, 420px detail drawer, no @media queries, sub-30px touch targets). Below 768px the layout was unusable. All changes are scoped behind `@media (max-width: 768px)` plus a couple of toggle buttons that default to `display: none`, so the desktop layout is unchanged. - Nodes: filter sidebar collapses into a slide-in drawer behind a ☰ Filters button; node detail drawer becomes a fullscreen sheet with a sticky id/close header. - LogViewer: log-list sidebar gets the same slide-in treatment; toolbar packs tighter; selecting a log auto-closes the drawer. - Overview: stats grid drops to 2-up; stale-backlog table converts to card list via data-label attributes. - NodeDetail: review form inputs go to 16px font (suppresses iOS Safari auto-zoom on focus); submit button becomes full-width 44px-tall; flagsGrid drops to 2 columns. - Globals: header wraps gracefully; project-badge hides ≤480px; body font-size bumped to 14px on mobile for legibility. svg-pan-zoom 3.6 already supports touch pan/pinch-zoom out of the box — no JS changes needed for the graph itself, just the chrome around it. --- .../src/components/LogEntryLine.module.css | 6 ++ .../src/components/NodeDetail.module.css | 45 +++++++++++ ui/client/src/styles/global.css | 17 +++++ ui/client/src/views/LogViewer.module.css | 61 +++++++++++++++ ui/client/src/views/LogViewer.tsx | 29 ++++++- ui/client/src/views/Nodes.module.css | 75 +++++++++++++++++++ ui/client/src/views/Nodes.tsx | 29 ++++++- ui/client/src/views/Overview.module.css | 46 ++++++++++++ ui/client/src/views/Overview.tsx | 10 +-- 9 files changed, 310 insertions(+), 8 deletions(-) diff --git a/ui/client/src/components/LogEntryLine.module.css b/ui/client/src/components/LogEntryLine.module.css index 1e161cc..1e1916c 100644 --- a/ui/client/src/components/LogEntryLine.module.css +++ b/ui/client/src/components/LogEntryLine.module.css @@ -7,3 +7,9 @@ .expandable { cursor: pointer; } .expandable:hover { color: var(--text-primary); } .expandHint { color: var(--text-muted); font-size: 10px; } + +@media (max-width: 768px) { + .line { gap: 6px; font-size: 12px; } + .event { min-width: 60px; font-size: 11px; } + .ts { font-size: 11px; } +} diff --git a/ui/client/src/components/NodeDetail.module.css b/ui/client/src/components/NodeDetail.module.css index 74d1f61..a6ff68c 100644 --- a/ui/client/src/components/NodeDetail.module.css +++ b/ui/client/src/components/NodeDetail.module.css @@ -320,3 +320,48 @@ details[open] > summary.sectionLabel { margin-bottom: 6px; } .runStatus.error { background: rgba(203,36,49,0.12); color: var(--red); } .runMeta { color: var(--text-muted); font-size: 10px; margin-top: 2px; font-variant-numeric: tabular-nums; } .runHint { color: var(--text-secondary); font-size: 10px; font-family: var(--font-mono); margin-top: 2px; word-break: break-all; } + +@media (max-width: 768px) { + /* Keep the node id + close button visible while the user scrolls through + long Lean source / NL bodies on a small screen. */ + .header { + position: sticky; + top: 0; + z-index: 5; + padding: 12px 12px 8px; + } + .id { font-size: 14px; } + + .section { padding: 10px 12px; } + + /* Two-column flag grid keeps each cell wide enough to read on a 375px + viewport. */ + .flagsGrid { grid-template-columns: repeat(2, 1fr); } + + /* Stack the "Reviewing as" label + input vertically so the input gets the + full row width. */ + .reviewerLabel { + flex-direction: column; + align-items: stretch; + gap: 4px; + } + /* font-size ≥ 16px on the actual /