3 months ago
70d9f75Previously the only React error boundary was at the app root
(CrashReportingErrorBoundary), which replaces the entire window with a
'Reload' screen. A malformed feed item, a bad agent-generated a2ui surface,
a canvas, or a settings panel taking the whole window down is especially
bad in the separate popout quick-chat / menu-bar / canvas renderer
processes.
- CrashReportingErrorBoundary.tsx: add InlineErrorBoundary class with the
same telemetry forwarding (operation=react_inline_error_boundary) plus a
small inline destructive-toned fallback tile ('This ... couldn't be
rendered.' + Retry) mirroring FeedRow error rows and the a2ui
UnknownComponent tile. The root boundary stays as the window backstop.
- ChatFeed.tsx: wrap each FeedRow so one bad item degrades to one tile
instead of killing the feed (label includes the item kind).
- A2uiRenderer.tsx: wrap the root RenderNode so a bad model surface
degrades to one tile.
- App.tsx: wrap both Canvas call sites (canvas window + right-pane canvas).
- SettingsShell.tsx: wrap activePage.render() so a broken settings panel
doesn't blank the settings shell.
- test/inline-error-boundary.test.tsx: lock in fallback render, telemetry
forwarding, retry reset, custom fallback, and that the root boundary
still renders its fullscreen backstop.Parenta7bfa1c