Fix production startup recovery state - #122
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72641d4408
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <App /> | ||
| </React.Suspense> | ||
| )} | ||
| <StartupErrorBoundary> |
There was a problem hiding this comment.
Record this startup change in the project log
This introduces meaningful production startup and recovery behavior, but the commit does not append a dated entry to docs/PROJECT_LOG.md; that leaves the repository's required decision and rollback record incomplete. Add an entry describing the new error boundary, recovery behavior, and validation performed.
AGENTS.md reference: AGENTS.md:L3-L5
Useful? React with 👍 / 👎.
Summary
Replaces the blank application frame that occurred when the lazy-loaded App module rejected during bootstrap because Supabase frontend configuration was missing.
StartupErrorBoundaryaround both lazy entry points.Validation
npm run test -- --run src/components/system/StartupErrorBoundary.test.tsxnpm run typechecknpm run validateNotes
This does not replace deployment configuration. Production still requires valid Supabase variables; this change makes failure diagnosable and recoverable for players and operators.
Note
Low Risk
Bootstrap-only UX and error handling; production still requires valid Supabase configuration and no auth or data paths are changed.
Overview
When lazy-loaded
App(or the graphics lab entry) fails during bootstrap—commonly becausesupabase.tsthrows on missing env vars—players previously saw an empty frame.main.tsxnow wraps both lazy entry paths inStartupErrorBoundary, which catches render/bootstrap failures and shows a styled recovery screen instead of a blank app.The boundary detects Supabase configuration errors by message and shows SYSTEM CONFIGURATION REQUIRED with deployment guidance; other failures get a neutral SYSTEM UNAVAILABLE message. Both paths offer a RETRY STARTUP button that reloads the page.
App.cssadds bootstrap-safe styles for that screen (no dependency on the App module). Vitest tests cover both failure modes.Reviewed by Cursor Bugbot for commit 72641d4. Bugbot is set up for automated code reviews on this repo. Configure here.