Repository navigation
fix(renderer): contain Monaco initialization failures - #21555
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughMonaco setup steps now run independently and log failures without stopping later language or feature registrations. The editor mount callback now consumes matching pending focus requests. It also logs mount failures, clears editor state, and rethrows the error. Priority: ⬆️ High Merge Risk: 🟡 Moderate · up to A lost WebGL context may leave a failed renderer attached to a pane, causing degraded rendering and retained graphics resources. Merge readiness is moderate until the failed addon is cleaned up. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description is detailed and covers the required change, rationale, testing, visual proof, AI disclosure, risks, and checklist items. However, the required Linked Issue section states that there is no tracking issue, despite the template requiring one. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 0c84c28a-7275-4e81-aae9-18a9b381076f
📒 Files selected for processing (5)
src/renderer/src/components/editor/use-monaco-editor-mount.tssrc/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.test.tssrc/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.test.tssrc/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.tssrc/renderer/src/lib/monaco-setup.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| } catch (error) { | ||
| console.error('[MonacoEditor] Mount failed', { error, fileId, filePath }) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
set -eu
printf '%s\n' '--- target outline ---'
ast-grep outline src/renderer/src/components/editor/use-monaco-editor-mount.ts
printf '%s\n' '--- target source ---'
sed -n '1,280p' src/renderer/src/components/editor/use-monaco-editor-mount.ts
printf '%s\n' '--- helper definitions ---'
rg -n -A35 -B8 'installMonacoE2EProbe|registerFileSearchSelectedTextProvider' srcRepository: stablyai/orca
Length of output: 37669
Clean up resources when mount setup fails. If setup throws after installMonacoE2EProbe or registerFileSearchSelectedTextProvider succeeds but before editorInstance.onDidDispose is registered, the catch block can leave those resources active. It only clears refs and rethrows. Track the cleanup callbacks as setup proceeds and invoke them in the failure path before rethrowing.
Source: Learnings
There was a problem hiding this comment.
Important
The Monaco mount handler still rethrows, so it does not prevent the crash its own description promises. Details inline.
Reviewed changes
- Monaco mount error handling (
use-monaco-editor-mount.ts) — the entireonMountbody is wrapped intry/catch; the catch logs, nulls two refs, and rethrows. - Monaco setup guard (
monaco-setup.ts) — a singletry/catchnow wraps every language and feature registration call. - Terminal park-verdict damping (
terminal-park-verdict-flip-telemetry.tsplus ~400 lines of tests) — the notice path now engages the unpark pin with an exponential back-off (sustainedPinCount,lastFlipMs). This arrives via commit6ffbfc3c5d, which the PR description does not mention. - Test helper (
terminal-cold-park-withheld-tabs.test.ts) — adds the new requiredlastFlipMsfield to the record literal.
ℹ️ The branch conflicts with main, and half the diff is undescribed
mergeable_state is dirty, so the branch conflicts with main and needs a rebase before it can land. Separately, the PR title and body describe only the Monaco defensive handling, while commit 6ffbfc3c5d contributes roughly 490 lines of terminal telemetry damping that the description never mentions. Consider rebasing and either splitting the terminal change out or describing it in the PR body so the two can be evaluated independently.
Technical details
# Merge conflict and scope bundling
## Affected sites
- PR #21555 branch `fix/v1.4.205-crash-investigation` — `mergeable_state: dirty` against `main` (`f2fd18c`).
- `src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts` and its test — introduced by `6ffbfc3c5d`, absent from the PR description.
## Required outcome
- Rebase the branch onto current `main` and resolve conflicts.
- Either drop the terminal commit from this PR or document it in the body, since it is an independent behavioral change with its own commit-documented trade-offs.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
WebGL Atlas Context Loss Defense - New CommitAdded defensive context-loss checking in WebGL texture atlas clearing to prevent SIGSEGV crashes on Linux. IssueScan-16 identified 3 Linux SIGSEGV crashes from rapid TUI output on panes with lost graphics contexts. The FixAdded
Evidence
Testing✅ All 78 pane-manager tests pass (864 total) Commit: 8a1506d |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9cf40a7e-0c4f-4ec7-84e3-201df3fe0c03
📒 Files selected for processing (1)
src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| pane.webglDisabledAfterContextLoss = true | ||
| return | ||
| } | ||
| try { | ||
| // Why: rapid TUI redraws can corrupt xterm's WebGL glyph atlas without a | ||
| // context-loss event. Clearing the atlas preserves GPU rendering and forces | ||
| // a fresh paint when the pane becomes visible/focused again. | ||
| pane.webglAddon?.clearTextureAtlas() | ||
| pane.webglAddon.clearTextureAtlas() | ||
| } catch { | ||
| /* ignore — pane may have been disposed in the meantime */ | ||
| pane.webglDisabledAfterContextLoss = true |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,360p' src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts
rg -n -C 4 'webglDisabledAfterContextLoss|disposeWebgl|clearWebglTextureAtlas|isPaneWebglContextLost' src/renderer/src/lib/pane-managerRepository: stablyai/orca
Length of output: 50369
🏁 Script executed:
sed -n '100,215p' src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts
sed -n '240,340p' src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts
sed -n '1,90p' src/renderer/src/lib/pane-manager/pane-webgl-reattach.ts
sed -n '1,145p' src/renderer/src/lib/pane-manager/pane-rendering-control.ts
sed -n '210,250p' src/renderer/src/lib/pane-manager/pane-lifecycle.test.tsRepository: stablyai/orca
Length of output: 15153
Dispose the failed WebGL addon before returning.
Setting webglDisabledAfterContextLoss blocks future attachment, but it does not dispose the addon already loaded on pane.terminal. When context inspection reports loss or clearTextureAtlas() throws, call disposeWebgl(pane, { refreshDimensions: true }) after setting the latch in both branches. This removes the failed renderer and refits the pane for DOM rendering.
Proposed fix
if (isPaneWebglContextLost(pane)) {
pane.webglDisabledAfterContextLoss = true
+ disposeWebgl(pane, { refreshDimensions: true })
return
}
@@
} catch {
/* ignore — pane may have been disposed in the meantime */
pane.webglDisabledAfterContextLoss = true
+ disposeWebgl(pane, { refreshDimensions: true })
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pane.webglDisabledAfterContextLoss = true | |
| return | |
| } | |
| try { | |
| // Why: rapid TUI redraws can corrupt xterm's WebGL glyph atlas without a | |
| // context-loss event. Clearing the atlas preserves GPU rendering and forces | |
| // a fresh paint when the pane becomes visible/focused again. | |
| pane.webglAddon?.clearTextureAtlas() | |
| pane.webglAddon.clearTextureAtlas() | |
| } catch { | |
| /* ignore — pane may have been disposed in the meantime */ | |
| pane.webglDisabledAfterContextLoss = true | |
| pane.webglDisabledAfterContextLoss = true | |
| disposeWebgl(pane, { refreshDimensions: true }) | |
| return | |
| } | |
| try { | |
| // Why: rapid TUI redraws can corrupt xterm's WebGL glyph atlas without a | |
| // context-loss event. Clearing the atlas preserves GPU rendering and forces | |
| // a fresh paint when the pane becomes visible/focused again. | |
| pane.webglAddon.clearTextureAtlas() | |
| } catch { | |
| /* ignore — pane may have been disposed in the meantime */ | |
| pane.webglDisabledAfterContextLoss = true | |
| disposeWebgl(pane, { refreshDimensions: true }) |
There was a problem hiding this comment.
Important
The new context-loss latch in clearWebglTextureAtlas marks the pane disabled without disposing the still-attached addon, so a context that xterm restores within its 3s window (or a thrown clear) strands a healthy addon behind a latched pane that skips repaints until the next heavy resume.
Reviewed changes
- WebGL atlas-clear hardening (
pane-webgl-renderer.ts) —clearWebglTextureAtlasnow returns early when there is no addon, pre-checksisPaneWebglContextLost, and latcheswebglDisabledAfterContextLosson a lost context or a thrownclearTextureAtlas().
ℹ️ The WebGL change is a third independent change the PR description does not mention
The new commit adds atlas-clear hardening to pane-webgl-renderer.ts, but the PR body still describes only the Monaco handling, so this WebGL change and the terminal damping both ship undocumented. Consider describing (or splitting out) the WebGL change so it can be evaluated on its own.
Technical details
# Undocumented WebGL change in the PR
## Affected sites
- `src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts:182-205` — introduced by `8a1506d`, absent from the PR description.
- `src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts` and its test — introduced by `6ffbfc3`, also absent.
## Required outcome
- Add the WebGL atlas-clear change to the PR body (or split it out), since it is an independent behavioral change with its own rationale about SIGSEGV on lost contexts.ℹ️ Nitpicks
- No test covers the new
isPaneWebglContextLostbranch or thecatchlatch. The one existing test that exercises a latched pane (pane-webgl-renderer.test.ts:311) starts from a null addon, so it cannot observe the latched-but-attached state this commit introduces; a small test asserting the intended addon/flag pairing would pin the behavior down.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
8a1506d to
72fb75f
Compare
There was a problem hiding this comment.
ℹ️ No new issues — this commit removes the
throw errorthe prior review flagged, so a mount failure is now contained rather than routed to the React error boundary.
Reviewed changes
- Monaco mount failure containment (
use-monaco-editor-mount.ts) — theonMountcatch no longer rethrows; a failed mount is logged and its refs nulled instead of reaching the nearest error boundary.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Analyzed 34 crash reports for v1.4.205 released 2026-09-17. Identified and added defensive fixes for React error boundary crashes in Monaco editor setup. - Error: ReferenceError: thũs is not defined - Location: Monaco editor initialization (editor.api2 bundle) - Platforms: Linux, Windows, macOS - Root cause: Undefined variable in Monaco setup or language registration - Status: Added try-catch to prevent cascade crash - Pattern: Cascading process deaths (network service + GPU service) - Platforms: Primarily Windows - Root cause: Infrastructure/concurrent process failure (not code defect) - Status: Documented, requires Electron/Chrome infrastructure review - Pattern: Renderer memory grows to 851MB on low-RAM Windows systems - Root cause: Memory exhaustion on systems with <2GB free RAM - Status: Existing memory monitoring detected; needs leak investigation - Status: Requires minidump analysis with source maps 1. Added try-catch to Monaco editor mount callback (use-monaco-editor-mount.ts) - Catches errors during editor initialization - Logs file path and error for better diagnostics - Prevents crash cascade to React error boundary 2. Added try-catch to Monaco language registration (monaco-setup.ts) - Catches errors during Vue/Svelte/Astro/Nim language registration - Logs failures without crashing Monaco setup - Allows app to continue even if optional features fail - Analyzed 34 crash reports across 3 categories - Examined crash dumps, diagnostics, and memory profiles - Reviewed Monaco setup and editor component code - Checked git history for recent changes - Crash breadcrumbs (memory, process state, user actions) - Process metrics (heap, private memory, system memory) - Component stacks (React error boundaries) - Exit codes and system signals - Error silently continues instead of crashing: Users get degraded experience instead of app crash, can still use editor in most cases - May hide underlying issues: Errors are logged for crash reports, but won't be surfaced as prominently - Type checking: pnpm tc:renderer (passed) - Changes preserve existing error reporting through crash breadcrumbs - Defensive coding only adds try-catch, no behavior change for success path
72fb75f to
cf54229
Compare
There was a problem hiding this comment.
ℹ️ No new issues in the new commits — the branch was force-pushed to drop the unrelated terminal and WebGL changes, leaving only the previously reviewed Monaco defensive handling.
Reviewed changes
- Narrowed the PR to Monaco only — the terminal park-verdict damping commit (
terminal-park-verdict-flip-telemetry.tsplus its tests) and the WebGL atlas-clear hardening commit (pane-webgl-renderer.ts) are no longer part of this PR; the branch now touches onlyuse-monaco-editor-mount.tsandmonaco-setup.ts. - Re-committed the Monaco defensive handling unchanged — the
onMounttry/catchinuse-monaco-editor-mount.tsand the registrationtry/catchinmonaco-setup.tsare the same code the prior review saw, so the two new commits introduce no behavioral change.
Dropping those changes resolves the earlier scope/bundling concern and makes the WebGL latch finding moot for this PR — its review thread has been retired. The one pre-existing open thread on the monaco-setup.ts registration granularity is unchanged by these commits and continues to block approval.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This incremental pass covers the delta since the prior pullfrog review at cf54229 — commit 45fe800 ("isolate Monaco setup failures"), which touches monaco-setup.ts only.
- Per-step Monaco setup guarding (
monaco-setup.ts) — the single coarsetry/catcharound all registrations is replaced by arunMonacoSetupStep(name, setup)helper that wraps each language registration, each guard, andinstallMonacoContextMenuPasteindependently. An optional-language failure can no longer skip the non-optional delayer/diff disposal guards or right-click paste.
This directly addresses the one remaining open thread on the PR (monaco-setup.ts registration granularity), which has been retired. Both files still match the previously reviewed use-monaco-editor-mount.ts containment behavior.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
The try/catch around the onMount body did the opposite of containment: React already routed that throw to the page boundary, so swallowing it left a half-wired editor and hid the crash from the reporting pipeline. It also never saw the reported failure, which is raised inside @monaco-editor/react's own create effect before onMount runs. Revert the hook to main and wrap the editor element in RecoverableRenderErrorBoundary instead, so either throw degrades the file pane only, still files a crash report, and retries by remounting on the existing pane+path key.
Ten near-identical guarded calls, each repeating its own function name as a label, become one [label, step] table run by a single loop. Same behaviour: an optional registration that throws is logged and the rest still run. loader.config and the editor model registry stay unguarded — they are load-bearing, so catching there would only move the failure later.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This incremental pass covers the delta since the prior pullfrog review at 45fe800 — commits 7d01c5f and d478d49, which move containment from the mount hook to an error boundary around the editor element and fold the setup guards into one table.
- Reverted the
onMounttry/catch(use-monaco-editor-mount.ts) — restored tomain's content, so a mount throw again reaches a React boundary and is reported, instead of being swallowed with a half-initialised editor. - Contained Monaco init at the editor element (
EditorEditFileSurface.tsx) — the lazyMonacoEditoris now wrapped inRecoverableRenderErrorBoundarywithboundaryId="editor.monaco",surface="code-editor", and the pane+path key asresetKey; the page boundary no longer trips when Monaco throws. - Registered the new surface (
shared/crash-reporting.ts+ the main-process allow-list) —code-editorjoined the union and its validation set in the same commit. - Collapsed the setup guards (
monaco-setup.ts, newmonaco-setup-steps.ts) — the ten near-identical guarded calls become onerunMonacoSetupSteps([...])loop; one throwing step is logged and the rest still run. - Added tests — the containment test covers both crash shapes, asserts the page boundary and its sibling survive, checks the report args, and confirms Retry remounts; the setup table has its own test.
Verified locally: both new test files pass, and the containment test is a real probe — removing the boundary makes its two containment cases fail with the page-boundary fallback.
ℹ️ Monaco consumers outside the edit surface are still uncontained
The boundary is placed only around the monacoEditor element, but several other surfaces in this same app load Monaco and would still bubble an init failure to page.*. ChangesModeView is rendered from EditorEditFileSurface itself: when a file is opened in changes mode, its lazy DiffViewer (ChangesModeView.tsx:88) has no boundary, so a broken Monaco build still takes the workspace with it. The diff tabs (DiffViewer, CombinedDiffViewer), IpynbCellEditor, and MonacoCodeExcerpt are the same shape.
This does not block the fix — it makes the edit surface safe, which is the reported flow — but the PR title promises containment of Monaco initialization failures generally, and ChangesModeView is one toggle away from the surface that was hardened.
Technical details
# Uncovered Monaco mount sites
## Affected sites
- `src/renderer/src/components/editor/ChangesModeView.tsx:88` — lazy `DiffViewer`, no error boundary; reached from `EditorEditFileSurface` when `isChangesMode`.
- `src/renderer/src/components/editor/DiffViewer.tsx:358` and `combined-diff/CombinedDiffViewer.tsx` — diff tabs, no boundary.
- `src/renderer/src/components/editor/IpynbCellEditor.tsx:146`, `MonacoCodeExcerpt.tsx` — smaller Monaco consumers, no boundary.
## Required outcome
- Decide whether the new `code-editor` containment is intended only for the edit surface or for every Monaco mount. If the latter, the same `RecoverableRenderErrorBoundary` wrapper (with a distinct `resetKey` per site) should cover the changes-mode diff and the diff tabs at minimum.
## Open questions for the human
- Is `ChangesModeView` out of scope deliberately, or an oversight? A one-line answer is enough — no code change required for this PR if it is a follow-up.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
A guarded registration that throws was console-only, so a lost language or behaviour guard never reached crash reports. Record a breadcrumb so the containment stays visible in the field. Claude-Session: ab8ff806-4870-4ea8-bbf5-bbd123b1166e
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This incremental pass covers the delta since the prior pullfrog review at d478d49 — commit 70cb99e ("breadcrumb swallowed Monaco setup-step failures"), which touches monaco-setup-steps.ts and its test.
- Recorded a crash breadcrumb for each failed setup step (
monaco-setup-steps.ts) — the per-stepcatchnow callsrecordRendererCrashBreadcrumb('monaco_setup_step_failed', { step, message })alongside theconsole.error, so a failure that is intentionally swallowed to keep the rest of Monaco alive still lands in crash reports. - Pinned the breadcrumb with a test (
monaco-setup-steps.test.ts) — mocks the recorder and asserts the exact name and{ step, message }payload for the throwing step.
The change is additive and best-effort: the recorder is a guarded leaf module (cannot throw), the new name is not in the main-process coalesced set so it records normally, and its data is sanitized with message capped at 240 chars. At most ten breadcrumbs per renderer import, so there is no breadcrumb-ring flood risk. Both prior open threads remain resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Opening a file used to be able to blank out the whole workspace. If the code editor failed to start, the failure spread outward until Orca replaced the entire window with an error card. Now the failure stops at the file pane: a small "this part hit an error" card with a Retry button appears where the editor would be, and everything around it keeps working.
What Changed
Before. A user opens a file. Something in the code editor's own startup throws — in the reported crashes, a
ReferenceErrorfrom inside the bundled editor library while it builds the editor instance. React unwinds to the nearest place that can catch it, which is the page-level boundary, and the user loses the whole workbench view and has to retry the page.After. The same throw is caught one level in, around the editor element itself. The file pane shows the recoverable error card; tabs, terminal, sidebars and the rest of the page stay mounted and usable. Retry remounts the editor. The crash is still reported, so the diagnostics pipeline keeps seeing these failures.
Mechanism. Two changes:
EditorEditFileSurfaceis wrapped in the existingRecoverableRenderErrorBoundary(boundary ideditor.monaco, surfacecode-editor), reusing the pane+path key the editor was already keyed on as the boundary's reset key. That is the same pattern the rich-markdown editor, the terminal workbench, the sidebars and each modal already use.[label, step]table run by a single guarded loop instead of ten near-identical guarded calls whose labels restated the function names. This guard is new relative to main, where one registration throwing aborted the whole Monaco module import: now the failure is logged, recorded as amonaco_setup_step_failedcrash breadcrumb, and the rest still run. The trade-off is that two of the ten steps are themselves crash guards, so a silently failed one leaves the crash it prevents latent; that is still better than losing every editor.loader.configand the editor model registry stay unguarded on purpose — they are load-bearing, and catching there only moves the failure later.The previous revision of this branch also put a
try/catcharound the editor'sonMountbody. That has been reverted tomain's content, because it was wrong in three ways: the library invokesonMountfrom an effect, so a throw there had already reached a boundary and rendered a retry card; catching it left a half-initialised editor wired up (options sync, reveal, view-state save, Cmd+S); and it bypassed crash reporting, so the pipeline went blind to exactly the failures we are trying to see. It also never covered the reported crash, which happens in the library's create effect beforeonMountruns.Why
The goal is containment, not silence. An error boundary contains a failure at a chosen edge of the UI and still reports it; a
try/catchinside a callback silences it and leaves the surrounding machinery half-wired. Placing the boundary at the editor element is the smallest edge that keeps the rest of the workbench alive, and it needs no new state, flags or lifecycle wiring.Alternatives considered:
try/catchin the mount hook. Rejected: it cannot see the reported failure at all, and it trades a visible recoverable card for an invisible broken editor.RichMarkdownErrorBoundary. Rejected as duplication —RecoverableRenderErrorBoundaryalready provides the id, surface, reset key, reporting and fallback this needs.Linked Issue
No tracking issue. This came out of triaging the v1.4.205 crash reports, where React-error-boundary crashes originating in Monaco initialization showed up on macOS, Linux and Windows.
Visual Proof
N/A for a screenshot pair — the change has no new UI of its own. The "after" state reuses the existing recoverable-error card that already ships on the sidebars, modals and terminal workbench; the automated test below asserts that card renders in the file pane while the surrounding page stays mounted.
Testing
Automated, in the renderer vitest suite:
src/renderer/src/components/editor/EditorEditFileSurface.monaco-containment.test.tsxrenders the real surface inside a page-level boundary with a stub editor that throws from its mount effect, in both shapes the crash reports show: a direct throw (the library'seditor.createpath) and a throw from a callback the effect invokes (theonMountpath). It asserts the editor boundary catches both, the page boundary does not trip and its sibling stays mounted,reportReactErrorBoundaryCrashfires once withboundaryId: editor.monaco/surface: code-editor, and that Retry remounts the editor.EditorEditFileSurface, both containment cases fail with the page boundary's fallback text in the DOM.src/renderer/src/lib/monaco-setup-steps.test.tsasserts a throwing step is logged and every later step still runs.Gates run locally on macOS:
pnpm tc(all projects),pnpm teston the two new files pluscrash-reporting.test.tsandEditorContent.monaco-lifecycle.test.tsx(28 passed),pnpm run check:code-quality:changed(0 findings),oxlint,oxfmt.Not exercised: Windows and Linux (the change is platform-neutral React composition, no platform branches), and SSH (the editor surface is renderer-side; the boundary does not touch file reads or host routing).
AI Disclosure
Claude Opus 5.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
code-editoris a new member of the renderer-crashsurfaceunion and is added to the main process's runtime allow-list in the same commit. Renderer and main ship together, so there is no version skew; an unknown surface would have been rejected by that allow-list.Checklist
N/Awith reasonpnpm typecheckand the changed-file lint/quality gates pass locally; fullpnpm lint, the wholepnpm testsuite andpnpm buildare left to CI