From 46a281a5c97eedb6478c3a5493c72b3311c51e06 Mon Sep 17 00:00:00 2001 From: Phat Pham Date: Sat, 14 Nov 2026 10:55:30 +0700 Subject: [PATCH] fix(preview): show the reader skeleton immediately 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 --- README.md | 2 +- core/render.ts | 2 +- core/test/render.spec.ts | 2 +- docs/ARCHITECTURE.md | 2 +- docs/RUNBOOK.md | 2 +- web-static/service-worker.js | 4 ++-- web-static/static/app.js | 19 +------------------ web-static/static/style.css | 6 +++--- 8 files changed, 11 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index c920e40..44074d8 100644 --- a/README.md +++ b/README.md @@ -377,7 +377,7 @@ Presentation-layer note: ### Article preview - when enabled in Reader settings, clicking any card (including its title) loads a reader view in a right-hand panel instead of opening a new tab -- while the preview request is in flight, the panel keeps the card title until the delayed skeleton appears; the skeleton then replaces the provisional title and mimics the article title/byline/body rhythm, and the fetched title and content fade in. A failed request clears the skeleton, restores the card title, and shows a readable error message +- opening the preview immediately shows the reader skeleton, starting with a title placeholder; the provisional card title is not shown, and the fetched title/content fade in. A failed request clears the skeleton, restores the card title, and shows a readable error message - transient upstream `429`/`5xx` responses are retried once with jitter; blocked sources, timeouts, unsupported formats, and failed fetches get specific messages - the visible loading message is visually hidden while the skeleton is shown; the panel remains `aria-busy` and a live region announces the loading state - `Cmd`/`Ctrl`/`Shift`-clicking a title still opens the article in a new tab diff --git a/core/render.ts b/core/render.ts index 0869f01..297646f 100644 --- a/core/render.ts +++ b/core/render.ts @@ -195,7 +195,7 @@ export function renderIndexPage(data: PageData): string { - +