Repository navigation
Show the app error page when saved state cannot load - #2479
Merged
Merged
Conversation
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 28, 2026 00:09
848a30e to
17b91cd
Compare
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 28, 2026 01:14
17b91cd to
42c4c74
Compare
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 28, 2026 14:18
42c4c74 to
fec9eea
Compare
kmcginnes
commented
Oct 28, 2026
kmcginnes
left a comment
Collaborator
Author
There was a problem hiding this comment.
One change needed
|
|
||
| /** This is the app wide error page that will be shown when the app essentially crashes */ | ||
| export default function AppErrorPage(props: FallbackProps) { | ||
| export default function AppErrorPage(props: Pick<FallbackProps, "error">) { |
Collaborator
Author
There was a problem hiding this comment.
Let's be explicit about the props rather than picking from FallbackProps.
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
2 times, most recently
from
October 28, 2026 20:31
500d90e to
78b1bcd
Compare
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 29, 2026 00:02
78b1bcd to
1d5a15d
Compare
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 29, 2026 00:05
1d5a15d to
6201b4a
Compare
Base automatically changed from
load-persisted-state-before-render-refactor-bootstrap
to
main
October 29, 2026 18:05
Layer: 2-boot-error-page
Layer: 2-boot-error-page
kmcginnes
force-pushed
the
load-persisted-state-before-render
branch
from
October 29, 2026 18:08
6201b4a to
f4783dc
Compare
This was referenced Oct 29, 2026
kmcginnes
added a commit
that referenced
this pull request
Oct 29, 2026
## Summary When saved state can't load at startup, the error page said only "Something went wrong", which gives no hint that browser storage is the cause or what to do about it. **User-facing:** When Graph Explorer can't read its saved data at startup, the error page now says so, names private browsing or blocked site storage as likely causes, and suggests reloading, then clearing site data as a last resort. Other app errors keep the generic copy. ```diff loadPersistedState run migrations - loadPersistedAtoms() + try loadPersistedAtoms() + catch → throw new PersistedStateLoadError(cause) createDisplayError(error) + PersistedStateLoadError → "Unable to load saved data" + storage guidance …existing mappings, generic fallback ``` `startApp` and `AppErrorPage` are unchanged: the boot path already passes the caught error to `AppErrorPage`, which maps it through `createDisplayError` like any other app error. Also fixes two stale notes left by #2478 and #2474: the `migrateUserStylingIfNeeded` TSDoc and the test-setup line in the IndexedDB persistence ADR. ## Evidence **Before:** A storage failure at boot showed "Something went wrong / An error occurred. Please try again." **After:**  `startApp.test.tsx` asserts the saved-data heading and message on a failed load. `storageAtoms.test.ts` asserts the load rejects with `PersistedStateLoadError` carrying the storage error as `cause`, and `createDisplayError.test.ts` pins the copy. **Verified live:** Ran the dev server in Chromium with IndexedDB and localStorage made to throw, and confirmed the page above. ## Merge Danger **Door:** two-way **Impact:** copy ## Related - Related to #1833 - Follows #2479 --- <sub>🤖 Written by an AI agent on my behalf.</sub>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When saved state can't load at startup, Graph Explorer showed a blank page with no way forward; it now shows the app error page.
User-facing: if the browser blocks every storage option Graph Explorer can use, users see "Something went wrong" with a reload button instead of a blank page.
AppErrorPagenow takes onlyerror, so it works outside an error boundary.Evidence
Before:
startApp.test.tsx"shows the app error page when persisted state fails to load" failed withUnknownError: The database connection was lost.and an empty container.After: the same test passes.
Verified live: production build in Chromium with IndexedDB open and
localStorageboth blocked: the error page renders and the console logs the load error. If only IndexedDB fails, localForage falls back tolocalStorageand the app boots normally, as it did before.Merge Danger
Door: two-way
Impact: startup
Only reached when storage fails to load; the success path is unchanged.
Related
🤖 Written by an AI agent on my behalf.