Parent issue: #20
Context
If a single message fails to render (e.g., malformed markdown, unexpected tool output), it can crash the entire chat view. Error boundaries would contain failures to individual messages.
Scope
- Create
src/components/ui/ErrorBoundary.tsx — a reusable React error boundary component
- Shows a friendly error message instead of crashing
- "Retry" button to attempt re-render
- Logs the error details to console for debugging
- Wrap
MessageBubble / MessageContent in the error boundary
- Wrap
ToolCallDisplay in the error boundary (tool results can have unexpected shapes)
Design
Error state should show something like:
"This message couldn't be displayed. [Show details] [Retry]"
Keep the styling consistent with the existing chat theme.
References
Parent issue: #20
Context
If a single message fails to render (e.g., malformed markdown, unexpected tool output), it can crash the entire chat view. Error boundaries would contain failures to individual messages.
Scope
src/components/ui/ErrorBoundary.tsx— a reusable React error boundary componentMessageBubble/MessageContentin the error boundaryToolCallDisplayin the error boundary (tool results can have unexpected shapes)Design
Error state should show something like:
Keep the styling consistent with the existing chat theme.
References
src/components/chat/