Skip to content

fix(widgets): Add error boundary to widget footer#110506

Draft
priscilawebdev wants to merge 1 commit intomasterfrom
priscilawebdev/fix/widget-footer-error-boundary
Draft

fix(widgets): Add error boundary to widget footer#110506
priscilawebdev wants to merge 1 commit intomasterfrom
priscilawebdev/fix/widget-footer-error-boundary

Conversation

@priscilawebdev
Copy link
Member

@priscilawebdev priscilawebdev commented Mar 12, 2026

Wrap the Widget component's Footer slot in an ErrorBoundary, matching the
existing pattern used for the Visualization slot.

Previously, errors in footer content (e.g. null data passed to rendering
components) would propagate up and crash the entire page. Now footer errors
are contained within the widget frame, showing a WidgetError message while
the rest of the widget (title, visualization) continues to render normally.

This came up from a crash on the agent monitoring page where a null modelId
in the LLM Calls widget footer took down the whole page. The root cause null
check is in #110505 — this PR adds defense-in-depth so similar issues in any
widget footer won't crash the page.

image image

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks! Wondering about that Panel change, though! I was thinking that adding a <Container position="relative" (or whatever the syntax is) wrapper around WidgetError to accomplish the same thing might be better. Seems like composing the wrapper is cleaner than adding props to the element

priscilawebdev added a commit that referenced this pull request Mar 13, 2026
Wrap `ModelsTable` with `<ErrorBoundary mini>` on the agent models
landing page so that rendering errors (e.g. null `modelId` hitting
`.toLowerCase()`) are contained within the table instead of crashing the
entire page.

This follows the existing pattern of wrapping table consumers at the
call site. The widget footer error boundary was added in #110506 but
`ModelsTable` (a standalone `GridEditable` table) was unprotected.
@priscilawebdev priscilawebdev force-pushed the priscilawebdev/fix/widget-footer-error-boundary branch from f6bc70f to 47a3d82 Compare March 13, 2026 09:47
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@priscilawebdev priscilawebdev force-pushed the priscilawebdev/fix/widget-footer-error-boundary branch from 47a3d82 to 417178f Compare March 13, 2026 09:52
@priscilawebdev priscilawebdev force-pushed the priscilawebdev/fix/widget-footer-error-boundary branch from 417178f to 7591dd1 Compare March 13, 2026 12:07
@priscilawebdev priscilawebdev marked this pull request as draft March 13, 2026 12:46
@priscilawebdev priscilawebdev force-pushed the priscilawebdev/fix/widget-footer-error-boundary branch from 7591dd1 to 56b754b Compare March 13, 2026 12:47
Wrap the Footer slot content in an ErrorBoundary so a crashing
footer component does not take down the entire widget.

Remove absolute positioning from WidgetError so it uses flow layout
by default. Callers that need absolute positioning (visualization
slot, widgetFrame, score cards, insights, explore) now compose it
via a Container wrapper instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@priscilawebdev priscilawebdev force-pushed the priscilawebdev/fix/widget-footer-error-boundary branch from 27511b7 to ee0bd32 Compare March 13, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants