Skip to content

[codex] Add app version refresh guard#427

Merged
fr1jo merged 1 commit into
mainfrom
codex/app-version-refresh
May 9, 2026
Merged

[codex] Add app version refresh guard#427
fr1jo merged 1 commit into
mainfrom
codex/app-version-refresh

Conversation

@fr1jo

@fr1jo fr1jo commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit a build-specific /version.json from Vite and embed the same build id into the app bundle
  • add a global app version guard that checks for newer deploys on load, focus, visibility changes, bfcache restore, and a 5 minute interval
  • prompt visible stale tabs to reload and auto-reload stale hidden tabs
  • mark /version.json as no-store for Netlify

Why

Old browser tabs can keep running stale bundles and continue making RPC calls after a deploy. This gives future builds a lightweight way to detect that they are stale and refresh before they keep using old behavior or old public RPC keys indefinitely.

Validation

  • yarn biome check vite.config.ts src/vite-env.d.ts src/Providers.tsx src/components/AppVersionGuard.tsx public/_headers
  • yarn build

Build completed with existing warnings for stale Browserslist data, Privy/Rollup pure annotations, and large chunks.

@netlify

netlify Bot commented May 9, 2026

Copy link
Copy Markdown

Deploy Preview for pintomoney ready!

Name Link
🔨 Latest commit e35b471
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/69fe8671568647000763cf88
😎 Deploy Preview https://deploy-preview-427.preview.pinto.money
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fr1jo fr1jo marked this pull request as ready for review May 9, 2026 01:04
@fr1jo fr1jo merged commit 840404b into main May 9, 2026
6 checks passed
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