feat(desktop): surface local server startup failures#30822
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Desktop app startup flow by ensuring local-server (sidecar) initialization failures are surfaced to the renderer as actionable errors, so the UI transitions to the error page instead of remaining stuck on the loading animation.
Changes:
- Forward main-process loading task failures into the
await-initializationIPC Deferred so the renderer receives a rejection instead of waiting indefinitely. - In the renderer, treat initialization errors as fatal during the “ready” gate and tag them as local-server-startup failures while removing Electron’s remote-invocation wrapper text.
- Customize the shared app error page description when the failure is identified as a local server startup error, with a new English i18n string and tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/desktop/src/renderer/initialization.ts | Adds helpers to throw initialization errors deterministically, tag them as local-server-startup failures, and clean up Electron IPC wrapper text. |
| packages/desktop/src/renderer/initialization.test.ts | Adds unit coverage for renderer initialization error handling and message cleanup. |
| packages/desktop/src/renderer/index.tsx | Switches renderer readiness gating to use the new initialization helpers so startup failures surface immediately. |
| packages/desktop/src/main/initialization.ts | Introduces a reusable Effect helper to forward failures into the initialization Deferred. |
| packages/desktop/src/main/index.ts | Applies failure-forwarding to the loading task and updates Deferred typing to carry failure information. |
| packages/app/src/pages/error.tsx | Uses a computed description key so the error page can show a tailored message for local-server-startup failures. |
| packages/app/src/pages/error-description.ts | Adds key selection logic for error-page descriptions based on the localServerStartup marker. |
| packages/app/src/pages/error-description.test.ts | Adds unit tests for the error description key selection logic. |
| packages/app/src/i18n/en.ts | Adds the new localized error description for local server startup failures (English). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
TLDR;
Changelog
Fixed
An error occurred while starting the local server.