Skip to content

feat: prompt to refresh when a new version is deployed#6

Merged
phatpham9 merged 1 commit into
mainfrom
feature/pwa-update-notification
Jun 23, 2026
Merged

feat: prompt to refresh when a new version is deployed#6
phatpham9 merged 1 commit into
mainfrom
feature/pwa-update-notification

Conversation

@phatpham9

Copy link
Copy Markdown
Member

An installed PWA reopened from the iOS/iPadOS home screen resumes a frozen page rather than re-running the bootstrap script, so it never notices a deploy that happened while backgrounded. Adds a cheap GET /api/version (uncached, always reflects the live APP_VERSION) that the client polls on visibilitychange/pageshow/focus-equivalent resume and on a 15-minute foreground interval; on a mismatch it shows a "Refresh" banner instead of silently staying stale.

An installed PWA reopened from the iOS/iPadOS home screen resumes a
frozen page rather than re-running the bootstrap script, so it never
notices a deploy that happened while backgrounded. Adds a cheap
GET /api/version (uncached, always reflects the live APP_VERSION) that
the client polls on visibilitychange/pageshow/focus-equivalent resume
and on a 15-minute foreground interval; on a mismatch it shows a
"Refresh" banner instead of silently staying stale.

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

Copy link
Copy Markdown

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

Uploaded from 2176e2fe5ee97c1a251cc4cac1d5f7492388ee29. 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 b7c8340 into main Jun 23, 2026
2 checks passed
@phatpham9 phatpham9 deleted the feature/pwa-update-notification branch June 23, 2026 12:39
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