Skip to content

fix(app): auto-reload on stale chunk import failure#94

Merged
wgordon17 merged 2 commits into
gordon-code:mainfrom
wgordon17:worktree-sentry-investigation
Apr 30, 2026
Merged

fix(app): auto-reload on stale chunk import failure#94
wgordon17 merged 2 commits into
gordon-code:mainfrom
wgordon17:worktree-sentry-investigation

Conversation

@wgordon17
Copy link
Copy Markdown
Member

Summary

  • Wraps lazy route imports with auto-reload on chunk load failure (stale hash after deployment)
  • Uses sessionStorage cooldown (10s) to prevent infinite reload loops
  • Returns never-resolving promise during reload to suppress Sentry noise
  • Falls back to manual reload UI if auto-reload doesn't resolve the issue

Fixes GITHUB-TRACKER-4

Wraps lazy() imports with a catch handler that triggers
window.location.reload() when a dynamic import fails due to
a stale content hash after deployment. Uses sessionStorage
with a 10s cooldown to prevent infinite reload loops.

Fixes GITHUB-TRACKER-4
Returns a never-resolving promise after triggering reload so the
error does not propagate to the error boundary or Sentry.
@wgordon17 wgordon17 marked this pull request as ready for review April 30, 2026 22:31
@wgordon17 wgordon17 merged commit a080115 into gordon-code:main Apr 30, 2026
1 check 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