Skip to content

feat(desktop): surface local server startup failures#30822

Merged
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/desktop-sidecar-startup-error
Jun 4, 2026
Merged

feat(desktop): surface local server startup failures#30822
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/desktop-sidecar-startup-error

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Jun 4, 2026

TLDR;

  • Desktop local-server startup failures now open an actionable error page instead of leaving the app on its loading animation forever.

Changelog

Fixed

  • Desktop no longer hangs indefinitely on the loading animation when its local server cannot start.
  • The error page now identifies this case with: An error occurred while starting the local server.
  • Local-server startup error details now show the useful underlying failure without Electron's repeated remote-method wrapper text.

Copilot AI review requested due to automatic review settings June 4, 2026 22:36
@Hona Hona requested a review from adamdotdevin as a code owner June 4, 2026 22:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-initialization IPC 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.

@Hona Hona enabled auto-merge (squash) June 4, 2026 22:45
@Hona Hona merged commit b1a7ee5 into anomalyco:dev Jun 4, 2026
12 checks 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.

2 participants