Daeseon Yoo
Back to project
·UX retro·5 min

Viewport-locked single-screen mobile + installable PWA

Locks every gameplay phase to one no-scroll viewport (100svh, capped arena, compact spacing) on a single stable skeleton that never reflows, removes the growing in-match turn history, makes the web client an installable home-screen PWA, and cuts the AI reveal/round hold from 5.1s/4.5s to 3s.

A day of making the game fit one phone screen — no scroll, no jump — and turning the web client into a home-screen app.

What

Two goals, both about feel on a real phone:

  1. One screen, no scroll, no reflow. Every gameplay phase (playing / revealing / round_end, on both the AI and PvP pages) now renders on the same fixed skeleton locked to the visible viewport, so action buttons are always reachable and the layout never jumps between phases.
  2. Installable PWA. The web client gets a manifest, a service worker, and icons so JJAN! can be added to a phone home screen and launch standalone.

Plus a pacing tweak: the AI-mode post-action result hold dropped from 5.1s/4.5s to 3s.

Changes

Viewport fit + no-scroll

Stable skeleton (no reflow between phases)

Installable PWA

Pacing tweak

Why

On an iPhone the action cards were below the fold — you had to scroll to play a one-second reveal game, which kills the feel. The root cause was 100vh on iOS Safari counting the URL-bar area; 100svh plus viewportFit: cover maps the layout to the actually-visible screen.

The harder problem was stability. Even fitting one screen, the layout jumped every phase — the arena remounted, the bottom content changed height, picking an action shifted everything. The fix (per the engineering log's 2026-06-07 session notes) was to make each page ONE fixed skeleton — HUD + a capped arena (max-h-[34svh]) that never remounts + a min-h bottom slot that swaps content — so the layout never reflows, clips, or scrolls. The growing turn history was incompatible with that constraint, so it came out of the in-match HUD (full history still lives on the /history page).

The PWA work makes JJAN! installable to a phone home screen and launchable standalone — the cheapest path to an "app-like" presence before a real store build.

Notes

Commits