You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(webapp): never touch a working page; recover with overlay and state restore
Final recovery policy:
- All responses carry X-Build-Id. A working page is left alone when a
new build exists; when a Remix loader fetch during navigation reveals
a different build, the navigation becomes a full document load - the
user lands on the new build without seeing an incompatible state.
- Only real breakage (a /build asset 404 or failed chunk import) starts
recovery: an overlay goes up immediately, the client polls
/build-version and reloads once the server reports a different build.
If versions never diverge or the reload budget is spent, the overlay
offers a manual reload instead of a dead page.
- Form fields and scroll position are snapshotted to sessionStorage
before a recovery reload and restored after (native value setters +
input events so React state stays in sync). history.state is
deliberately not restored - the Remix router owns it.
Copy file name to clipboardExpand all lines: .server-changes/stale-deploy-asset-recovery.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@ area: webapp
3
3
type: fix
4
4
---
5
5
6
-
Fix intermittent unstyled/broken pages during rolling deploys, caused by stale HTML requesting `/build` asset hashes that 404 on the new image. Documents now default to `Cache-Control: no-cache` so browsers always revalidate HTML. On a `/build` asset failure, an inline script polls the new `/build-version` endpoint with backoff and reloads only once the server reports a different build than the page was rendered with; if versions never diverge or the reload budget is spent, it shows a manual-reload banner instead of leaving a dead page.
6
+
Fix intermittent unstyled/broken pages during rolling deploys, caused by stale HTML requesting `/build` asset hashes that 404 on the new image. Documents now default to `Cache-Control: no-cache`, and all responses carry an `X-Build-Id` header. A working page is never touched: when a Remix navigation reveals a new build, it becomes a full document load. Only real breakage (a `/build` asset 404 or failed chunk import) triggers recovery: an overlay goes up, the client polls the new `/build-version` endpoint and reloads once the server reports a different build (form fields and scroll are snapshotted and restored across the reload); if versions never diverge or the reload budget is spent, the overlay offers a manual reload.
0 commit comments