Skip to content

fix(preview): show the reader skeleton immediately - #29

Merged
phatpham9 merged 1 commit into
mainfrom
fix/preview-skeleton-immediate
Nov 14, 2026
Merged

phatpham9 merged 1 commit into
mainfrom
fix/preview-skeleton-immediate

Conversation

@phatpham9

Copy link
Copy Markdown
Member

Summary

The 150ms preview skeleton delay still let the provisional card title flash before the skeleton, even though the fetched article title usually differs. This shows the skeleton immediately on open and hides the provisional title from the first frame:

  • The reader panel only ever shows the title-placeholder skeleton until the fetched title arrives.
  • Feed skeletons keep their 150ms delay; only the reader panel changes.
  • Success reveals the fetched title; failures restore the card title and error status.
  • Bumps app.js to v112 and the PWA shell cache to v146.

Verification

  • npm run typecheck
  • npx vitest run --exclude '.claude/**' — 18 files, 148 tests
  • node --check web-static/static/app.js
  • Chrome DevTools against local dev with the preview fetch artificially delayed:
    • at 30ms after opening: panel visible, provisional title display: none / is-preview-loading, skeleton already present, card title hidden
    • after load: fetched title visible, skeleton gone, 44 content blocks
  • Local dev serves /static/app.js?v=112; render tests expect v112.

Notes

  • Trade-off: a very fast/cached preview may briefly show the skeleton instead of the card title. That is intentional now so a stale title never appears before the fetched one.

🤖 Generated with Claude Code

The 150ms preview skeleton delay let the provisional card title flash
before the skeleton, even though the fetched article title usually
differs. Show the skeleton immediately on open and hide the
provisional title from the first frame, so the panel only ever shows a
title placeholder until the fetched title arrives.

Feed skeletons keep their 150ms delay; this only changes the reader
panel. Success reveals the fetched title; failures restore the card
title and error status. Bump app.js to v112 and the PWA shell cache to
v146.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔎 Cloudflare preview: https://3bfd0aa4-feedreader.phatpham9.workers.dev

Uploaded from 2e1ace4cdd0e7f4a18da1b3976da04d7631eb8b3. This is a Worker version preview — it shares the production D1 database, so it reads/writes real data; it does not receive cron-triggered refreshes.

@phatpham9
phatpham9 merged commit 2c893b1 into main Nov 14, 2026
3 checks passed
@phatpham9
phatpham9 deleted the fix/preview-skeleton-immediate branch November 14, 2026 04:00
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