fix(agents-server-ui): surface signal failure toasts#4452
Merged
Conversation
Contributor
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4452 +/- ##
===========================================
- Coverage 85.41% 34.25% -51.16%
===========================================
Files 2 190 +188
Lines 48 14429 +14381
Branches 11 4925 +4914
===========================================
+ Hits 41 4943 +4902
- Misses 7 9472 +9465
- Partials 0 14 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Electric Agents Mobile BuildAndroid preview build for commit
|
kevin-dp
added a commit
that referenced
this pull request
Jun 2, 2026
Fork failures used to be swallowed by the .catch(() => {}) at the
ChatView call site, so server-side validation errors (invalid
fork_pointer.offset, out-of-range sub_offset, etc.) never reached the
user. Emit a danger toast from createForkEntity for network failures,
non-2xx responses, and invalid response shape — matching the
kill/signal toast pattern from #4452. The action still re-throws so
existing callers continue to short-circuit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signal and kill requests can fail after optimistic UI state has already been applied, for example when the server rejects persistence because a migration is missing. Previously those failures were easy to miss because the action callers intentionally swallowed rejected termination attempts, which made failed termination look like a no-op from the UI.
This PR adds a small server UI toast channel and mounts a global Base UI toast provider/viewport so local UI actions can surface failures without coupling every caller to notification rendering. The channel keeps the existing imperative showToast(...) API for non-React action code, then bridges those events into Base UI's toast manager.
The kill and signal optimistic action mutation functions now emit danger toasts for non-2xx responses and request-level failures, including the HTTP status and compacted server error text when available, while preserving the existing rejected mutation behavior.
The toast rendering is scoped to agents-server-ui and now uses @base-ui/react/toast primitives for provider, viewport, root, content, title, description, close, timeout handling, limits, and high-priority announcements for danger toasts. Styling stays on the existing design tokens plus lucide icons. A patch changeset is included for @electric-ax/agents-server-ui.