block / block/buzz

Deletion error toasts disappear after four seconds and have no dismiss button

Open
#5,362 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Summary

Agent and team deletion errors use Sonner's four-second default timeout and provide no explicit close button. The messages can be long enough to require several lines, so they disappear before they can reliably be read or copied.

## Reproduction

1. Add an agent to a team.
2. Attempt to delete that agent while the team still references it.
3. Observe the multi-line error toast.

The toast automatically disappears after approximately four seconds and has no visible dismiss control.

## Expected behavior

- Error notifications remain visible substantially longer, or persist until explicitly dismissed.
- Error notifications include a visible close button with the accessible name `Close toast`.
- Success/informational notifications may retain their shorter default duration.
- Hover, keyboard, screen-reader, and reduced-motion behavior remain supported.

## Source evidence

- `desktop/src/shared/hooks/useToastEffect.ts:15-19` calls `toast.error(message)` without duration or close options.
- `desktop/src/shared/ui/sonner.tsx:1-25` configures styling only; no close button is enabled.
- Sonner 2.0.7 defaults to 4,000 ms and only renders its close control when `closeButton` is enabled.
- The existing deletion-error path is exercised in `desktop/tests/e2e/agents.spec.ts:2401-2423`.

## Suggested implementation

For error feedback, pass a persistent or clearly longer duration plus `closeButton: true`. Keep the change scoped to errors unless product design intentionally wants close controls on every toast.

Extend the existing agent deletion E2E test to verify that the toast remains after the old four-second boundary, exposes `getByRole("button", { name: "Close toast" })`, and disappears after that button is selected.

---
[aidevops.sh](https://aidevops.sh) v3.32.239 plugin for [OpenCode](https://opencode.ai) v1.18.9 with gpt-5.6-sol

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.