Skip to content

fix(web): WCO header alignment, session loading spinner, SPA back link#84

Merged
setkyar merged 3 commits into
mainfrom
fix/wco-header-alignment
Jun 21, 2026
Merged

fix(web): WCO header alignment, session loading spinner, SPA back link#84
setkyar merged 3 commits into
mainfrom
fix/wco-header-alignment

Conversation

@setkyar

@setkyar setkyar commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Three related web/PWA fixes:

  • WCO header alignment — In Window Controls Overlay (installed PWA), the index header unconditionally added env(titlebar-area-x) to .header-inner's left padding, pushing the logo ~90px right of the content cards on wide windows where the centered max-width: 1040px box already clears the OS controls. Now the inset is only applied when the centered box would actually slide under the window controls (narrow windows), keeping the logo aligned with the cards.
  • Session loading spinner.session-loading had no CSS, so "Loading session…" rendered as bare text in the top-left and flashed away. Replaced with a full-viewport centered layout: a spinner (reusing the existing spin keyframe), a muted label, and a gentle fade-in; the error fallback is styled too. Honors prefers-reduced-motion.
  • SPA back link — The session "← Back" link was a plain <a href="/"> triggering a full document reload; under the cross-document view transition that reload could stall in the installed PWA, leaving the homepage stuck on "Loading sessions…". It now routes through handleNavClick like the session cards, navigating client-side while still honoring modified clicks for open-in-new-tab.

Test plan

  • Install as PWA in WCO mode: index header logo aligns with the content cards below (wide window); logo still clears the OS window controls on a narrow window.
  • Open a session that takes >200ms to load: a centered spinner + label appears (not top-left text), and resolves into the session.
  • From a session, click "← Back": homepage loads without getting stuck on "Loading sessions…".
  • Cmd/Ctrl-click "← Back" still opens the homepage in a new tab.
  • make check passes.

setkyar added 3 commits June 21, 2026 18:28
The header inner box is centered (max-width + margin: auto) to match the
.content cards below. In window-controls-overlay mode it unconditionally
added the titlebar-area-x inset to padding-left, pushing the logo right of
the cards on wide windows where the centered box already clears the OS
controls. Only apply the inset when the box would slide under the controls.
The .session-loading element had no CSS, so the "Loading session…" string
rendered as unstyled text in the top-left corner and flashed away. Give it a
full-viewport centered layout with a spinner (reusing the existing spin
keyframe), a muted label, and a gentle fade-in, and style the error fallback.
The "← Back" link was a plain <a href="/">, triggering a full document
reload. Under the cross-document view transition that reload could stall in
the installed PWA, leaving the homepage stuck on "Loading sessions…". Route
it through handleNavClick like the session cards so it navigates client-side,
while still honoring modified clicks for open-in-new-tab.
@setkyar setkyar merged commit a070243 into main Jun 21, 2026
5 checks passed
@setkyar setkyar deleted the fix/wco-header-alignment branch June 22, 2026 04:45
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.

1 participant