Skip to content

fix(preview): hide provisional title while the skeleton loads - #28

Merged
phatpham9 merged 1 commit into
mainfrom
fix/preview-loading-title
Nov 14, 2026
Merged

phatpham9 merged 1 commit into
mainfrom
fix/preview-loading-title

Conversation

@phatpham9

Copy link
Copy Markdown
Member

Summary

Card titles and fetched article titles often differ, so showing the card title under the reader skeleton made the panel look like it had loaded the wrong article.

  • When the delayed preview skeleton appears, hide the provisional card title and start the skeleton with a title placeholder, followed by byline/body rhythm.
  • The provisional title stays visible for the first 150ms, so fast responses swap straight to the fetched title without a blank flash.
  • Success reveals the fetched title; failures restore the card title and show the error status.
  • Bumps app.js to v111 and the PWA shell cache to v145.

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 ~320ms: panel visible, provisional title display: none / is-preview-loading, skeleton present, card title hidden
    • after load: fetched title visible (different from the card title), skeleton gone, 44 content blocks
    • forced 502 blocked: skeleton cleared, card title restored, readable error status shown
  • Local dev serves /static/app.js?v=111; render tests expect v111.

Notes

  • No backend/API changes. The skeleton is still delayed by 150ms to avoid flashing on fast/cached responses.

🤖 Generated with Claude Code

Card titles and fetched article titles often differ, so showing the
card title under the reader skeleton made the panel look like it had
loaded the wrong article. When the delayed preview skeleton appears,
hide the provisional title and start the skeleton with a title
placeholder, followed by byline/body rhythm.

The provisional title stays visible for the first 150ms so fast
responses swap straight to the fetched title without a blank flash.
Success reveals the fetched title; failures restore the card title and
show the error status.

Bump app.js to v111 and the PWA shell cache to v145.

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

Copy link
Copy Markdown

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

Uploaded from 3ad9d980ead315b62e8df0eb31a94570dee1bef2. 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 3a72810 into main Nov 14, 2026
3 checks passed
@phatpham9
phatpham9 deleted the fix/preview-loading-title branch November 14, 2026 03:47
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