Skip to content

feat: no loading screen; go straight to the child - #3

Merged
vpetersson-bot merged 1 commit into
masterfrom
feat/no-loading-screen
Oct 21, 2026
Merged

vpetersson-bot merged 1 commit into
masterfrom
feat/no-loading-screen

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Collaborator

What

  • No loading screen. The hotline appeal ("Every child deserves a safe way home.") was also the loading state, so every load flashed it before the child appeared.
    • Now it's hidden unless there's nothing to show: NCMEC unreachable, no open cases for the filter, or no JS (via <noscript>).
    • While loading, only the masthead and hotline band show, and the child fades in.
  • Faster first content. The page count is remembered per filter in localStorage.
    • Later loads fetch one random page directly: one request instead of two.
    • Only the count is stored, never a case.
    • If the count has shrunk, or the request fails, it falls back to the page-1 path.
  • Band pinned to the last row (grid-row: 3). Without this, the band flowed into the empty middle row while loading.

Verification

  • Typecheck, lint, 35 tests and the build pass with Bun 1.3.14.
  • Rendered in Chrome:
    • mid-load: masthead and band only, no appeal;
    • loaded: at 1920x1080, 1080x1920, 800x480, 480x800 and 900x1100, every QR code decodes to the UTM-tagged poster URL;
    • second load in the same profile: uses the cached count and shows a child;
    • API unreachable: shows the appeal, landscape and portrait.

🤖 Generated with Claude Code

The hotline appeal doubled as the loading screen, so every load flashed
"Every child deserves a safe way home." before the child appeared. Now
the appeal is hidden unless there is nothing to show (feed unreachable,
no open cases, or no JS via <noscript>); while loading, the frame stays
empty and the child fades in.

To make that wait shorter, remember the page count per filter in
localStorage and, on later loads, fetch one random page directly: one
request to first content instead of two. Only the count is stored, never
a case. A shrunk count or a failed request falls back to the page-1 path.

The hotline band is pinned to the last grid row, so it does not flow
into the empty middle while loading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@vpetersson-bot
vpetersson-bot merged commit 3349040 into master Oct 21, 2026
1 check passed
@vpetersson-bot
vpetersson-bot deleted the feat/no-loading-screen branch October 21, 2026 09:53
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