Skip to content

Agentic UI: Fix crash when a toast is replaced in place with a different shape - #4443

Open
shaunandrews wants to merge 1 commit into
trunkfrom
fix-toast-replace-in-place-crash
Open

Agentic UI: Fix crash when a toast is replaced in place with a different shape#4443
shaunandrews wants to merge 1 commit into
trunkfrom
fix-toast-replace-in-place-crash

Conversation

@shaunandrews

Copy link
Copy Markdown
Contributor

Related issues

  • None (split out of the stu-2162-site-header-actions exploration)

How AI was used in this PR

Claude Code cherry-picked this fix out of a larger exploration branch and verified it (the regression test, lint, typecheck) in isolation.

Proposed Changes

Fixes a crash that occurred when an app toast was updated in place and its content shape changed — for example, a running-sync toast transitioning into its success or failure result, where the result gains or loses a description. Previously React tried to update the existing Notice across that shape change and crashed; now the Notice re-mounts cleanly instead, so the toast transitions smoothly with no crash.

Testing Instructions

  1. Run the included regression test: npm test -- apps/ui/src/components/app-toasts/index.test.tsx — it exercises the toast-shape transition directly and must pass.
  2. Manual repro (optional): trigger a toast that starts in a running state with a description (e.g. a sync in progress), then let it transition to a result state without a description (e.g. success/failure), and confirm the toast updates cleanly with no crash.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shaunandrews shaunandrews changed the title Fix crash when a toast is replaced in place with a different shape Agentic UI: Fix crash when a toast is replaced in place with a different shape Aug 4, 2026
@shaunandrews
shaunandrews requested review from a team and bcotrim August 4, 2026 19:17
@shaunandrews
shaunandrews marked this pull request as ready for review August 4, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant