Repository navigation
fix(desktop): hide raw renderer exceptions - #4459
Merged
Astro-Han merged 1 commit intoSep 1, 2026
Merged
Conversation
orangeCatDeveloper
force-pushed
the
fix/desktop-error-boundary
branch
from
September 1, 2026 10:23
7c994b9 to
2694b75
Compare
orangeCatDeveloper
force-pushed
the
fix/desktop-error-boundary
branch
2 times, most recently
from
September 1, 2026 11:08
815660d to
bfe48f1
Compare
Unexpected exceptions are diagnostic data, not stable product copy. Keep details in the report and console while showing localized recovery guidance.
orangeCatDeveloper
force-pushed
the
fix/desktop-error-boundary
branch
from
September 1, 2026 16:38
bfe48f1 to
a89b058
Compare
Astro-Han
approved these changes
Sep 1, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Traced the diagnostics path end to end: handleCopyReport → formatRendererErrorDetails → renderer_crash keeps details, and the startup dialog's report already carried startupError.stack. Removed copy has no remaining references. Three non-blocking notes:
- When the copy fails (
copyState === 'failed'), the crash surface now shows nothing identifying — the old text pointed at the on-screen summary that no longer exists. Falling back toerror.namethere would keep a foothold. - The new third argument of
showStartupDiagnosticDialogis the only place the stack reaches the report, and no test goes through it (the new test builds the input by hand). native-diagnostic-dialog.ts:94says the report stays English regardless of locale, butshowStartupDiagnosticDialogfeeds it the localized title/message.
One question, no action needed here: promptForDefaultRuntimeHostRecovery still resolves the system locale while desktopLocale is already constructed by then — intentional pre/post-settings boundary, or leftover?
2 of 3 tasks
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.
Part of #2672
Summary
Unexpected renderer and startup failures show raw exception text as product copy: the crash surface renders the exception and component stack into the window, and native startup dialogs interpolate
error.messageinto their detail text — unlocalized, unstable, and occasionally containing content that belongs only in a diagnostic report.Raw exceptions are diagnostic data, not stable product copy. The crash surface and the native diagnostic dialogs now show fixed localized recovery guidance from typed catalogs (the reshaped
errorBoundarygroup inshell-copy.ts, and a new main-processnative-diagnostic-dialog-copy.ts), while the raw details keep flowing through the existing diagnostics channel — the copyable report still carries the full redacted stack. The lastlocale ===ternary block inruntime-host-boot.tsmoves into the catalog with the rest. The renderer copy deliberately stays inshell-copy.ts: the renderer architecture ratchet forbids new files in the AppShell closure, so the diff's renderer debt footprint is identical tomain.Scope note: this covers the generic surfaces only; expected-error localization by error code is a sibling PR, and the copy-boundary gate expansion for these files lands with the CLI ratchet PR.
Verification
Workspace build, the touched suites, renderer/storybook typecheck, and Biome pass locally.
AI use
Tool(s) and scope: Claude Code implemented the migration, reviewed it for simplification (dead
shell-copygroup, catalog placement), and ran the listed checks.Checklist
Does this PR entail a change in behavior?