Skip to content

hub-client: UI/UX modernization Phase 4 — graceful narrow viewports - #613

Merged
shikokuchuo merged 4 commits into
hub-client-uiux-phase3from
hub-client-uiux-phase4
Aug 26, 2026
Merged

hub-client: UI/UX modernization Phase 4 — graceful narrow viewports#613
shikokuchuo merged 4 commits into
hub-client-uiux-phase3from
hub-client-uiux-phase4

Conversation

@shikokuchuo

Copy link
Copy Markdown
Member

Stacked on #611 (phase 3). Phase 4 of the UI/UX modernization plan (claude-notes/plans/2026-08-25-hub-client-uiux-modernization.md).

What this change does

Phase 4 makes small windows and split-screen use degrade gracefully — no horizontal scroll, no clipped controls — down to 320px, the WCAG 1.4.10 reflow floor (400% zoom at 1280px).

A new viewport-matrix spec suite drives the work: 44 layout assertions plus 34 screenshots across 1280 / 900 / 700 / 480 / 320px over projects home, every dialog, and the editor shell (via new composed #/dev/editor-shell harness routes that render the real header, sidebar, and view-mode pane rules without Monaco/WASM). The matrix found four real defects at 320px, all fixed:

  • Dialogs clipped in short windows. A tall dialog could overflow the viewport top and bottom, hiding the header and action buttons. Dialogs now cap their height (100vh - 48px) and scroll the content section internally.
  • Menus could exceed the window width. The 320px-wide account menu clipped the left edge of a 320px window. Menus now cap at viewport width, matching the dialog margin convention; the 250px minimum still wins where they conflict.
  • Projects home header overflowed (94px at 320px). Below 480px the header wraps to two rows (actions, then a full-width search) and the card grid goes single-column. Project-row names keep an 8ch minimum — the nowrap metadata plus the row's action buttons could squeeze a name to zero width.
  • Editor shell clipped panes and header controls. Summary-strip minimums shrink to 80–120px below 700px and the sidebar floor drops to 120px below 480px, so markup/preview modes no longer clip panes. The header wraps to two rows — previously its left side could collapse to zero flex width and paint its buttons under the right side (an overlap viewport-bounds assertions can't see; pinned via the container's own scrollWidth). The project name truncates with an ellipsis instead of being clipped mid-word.

Designed narrow layouts (sidebar drawer, split-view collapse, header overflow menu) remain Phase 5 design work, per the plan.

Tests

  • New spec: e2e/viewport-matrix.visual.spec.ts (78 specs), watched failing before the fixes (4 assertion failures at 320px); shared assertions live in e2e/helpers/visual.ts.
  • Green locally: lint:css, test:ci (1251 tests), test:visual (194 specs — all 1280px characterization baselines pixel-identical, confirming the fixes are media-query scoped or value-preserving), build:all.
  • New 320/480px snapshots inspected visually in both themes.
  • Trap recorded in the plan: --update-snapshots skips rewrites when the new capture is within the pixel tolerance — force-regenerate an affected PNG by deleting it and running with --update-snapshots=missing.
  • CI note: the new routes have no linux baselines yet — needs the recreate-all-snapshots workflow dispatch on this branch, as on phases 2–3.

Viewport-matrix Playwright specs (1280/900/700/480/320px) over the
editor shell (new composed #/dev/editor-shell harness routes), projects
home, and every dialog, asserting no horizontal scroll and no clipped
controls — 320px covers the WCAG 1.4.10 reflow floor. Fixes found by
the matrix:

- Dialogs cap height (100vh - 48px) and scroll their content section
  internally instead of clipping header/actions in short windows
- Menus cap width (100vw - 48px); the 320px avatar menu no longer
  clips the left edge of a 320px window
- ProjectsHome <=480px: single-column grid, header wraps (actions row +
  full-width search), project-row names keep an 8ch floor while
  metadata ellipsizes (names could squeeze to zero width)
- Editor shell <=700px: summary-strip minimums 120-180 -> 80-120px;
  header project name truncates with ellipsis. <=480px: sidebar floor
  180 -> 120px; MinimalHeader wraps to two rows (its left side could
  collapse to zero flex width, painting buttons under the right side)

Designed narrow layouts (sidebar drawer, split-view collapse, header
overflow menu) remain Phase 5. All 1280px characterization baselines
are pixel-identical; new narrow snapshots reviewed visually.
@posit-snyk-bot

posit-snyk-bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

shikokuchuo and others added 2 commits August 26, 2026 19:21
Self-review of the viewport matrix found one more 320px overflow the
matrix didn't exercise: the peek popover (fixed 320px content-box,
360px with padding/border, anchored at the row's left edge) clipped
57px past the viewport's right edge. At <=480px it now spans its
anchor's full width. New matrix specs pin both it and the row-menu
submenu — the latter verified already-correct (the .qh-row .qh-menu
rule overrides .qh-submenu's rightward positioning, keeping submenus
inside the viewport at 320px and 1280px alike).

Also fixes the changelog entry's commit link, which pointed at the
pre-rewrite hash after the branch was rebased for push.
@shikokuchuo
shikokuchuo merged commit 20fa2ba into main Aug 26, 2026
10 checks passed
@shikokuchuo
shikokuchuo deleted the hub-client-uiux-phase4 branch August 26, 2026 19:39
shikokuchuo added a commit that referenced this pull request Aug 26, 2026
The 2026-08-26 entries referenced the pre-squash branch commits from
PRs #605-#613, which are not ancestors of main. Repoint the ten
affected entries at the squash-merge commits that contain each change
(20fa2ba, 83c818f, 7a73982, 1ccb9cc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants