Skip to content

fix(agents-server-ui): surface signal failure toasts#4452

Merged
icehaunter merged 3 commits into
mainfrom
codex/signal-failure-toasts
Jun 1, 2026
Merged

fix(agents-server-ui): surface signal failure toasts#4452
icehaunter merged 3 commits into
mainfrom
codex/signal-failure-toasts

Conversation

@icehaunter
Copy link
Copy Markdown
Contributor

@icehaunter icehaunter commented Jun 1, 2026

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Electric Agents Desktop Builds

Build artifacts for commit 5449fb8.

Platform Status Artifact
macOS Apple Silicon Passed DMG
macOS Intel Passed DMG
Windows x64 Passed Installer
Linux x64 Passed AppImage / deb

Workflow run

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 0% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.25%. Comparing base (b2ddd59) to head (5449fb8).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...gents-server-ui/src/lib/ElectricAgentsProvider.tsx 0.00% 34 Missing ⚠️
.../agents-server-ui/src/components/ToastViewport.tsx 0.00% 33 Missing ⚠️
packages/agents-server-ui/src/lib/toast.ts 0.00% 13 Missing ⚠️
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     
Flag Coverage Δ
packages/agents-mobile 85.41% <ø> (ø)
packages/agents-server 75.14% <ø> (?)
packages/agents-server-ui 5.66% <0.00%> (?)
typescript 34.25% <0.00%> (-51.16%) ⬇️
unit-tests 34.25% <0.00%> (-51.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Electric Agents Mobile Build

Android preview build for commit 5449fb8.

Platform Profile Status Build
Android preview Passed EAS build

Workflow run

Copy link
Copy Markdown
Contributor

@samwillis samwillis left a comment

Choose a reason for hiding this comment

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

LGTM

@icehaunter icehaunter merged commit c89aac8 into main Jun 1, 2026
34 checks passed
@icehaunter icehaunter deleted the codex/signal-failure-toasts branch June 1, 2026 13:00
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>
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.

2 participants