Repository navigation
Description
Summary
TUI toasts emitted via client.tui.showToast() (and the underlying /tui/show-toast endpoint) have duration as the only control surface. Once shown, neither the user nor the emitting plugin can dismiss them early. For warning/error variants that legitimately need a long display window (10-30s), this leaves the toast blocking attention long after the user has read it.
Use case
The opencode-aidevops plugin renders session-start framework status (version, env, security posture, advisories) as a consolidated TUI toast. Severity is classified per line; variant and duration follow the highest severity present:
- error (30s): security advisories
- warning (15s): pulse-stalled / external contribution alerts
- info (8s): version + env lines
- success (5s): "all protections active"
Users typically absorb the message in 2-3s, but the toast stays up for the full duration with no way to clear it. The plugin also can't clear it programmatically once the context it reported has changed (e.g., user runs aidevops update in a side terminal — the stale advisory banner continues to occupy screen real estate).
Proposal
Two small additions, both opt-in:
-
User-side dismissibility — a keyboard shortcut (e.g.,
Escwhile a toast is visible) and/or a click target on desktop dismisses the currently-visible toast immediately. Default off if back-compat is a concern; optionaldismissible: booleanflag on the emit. -
Plugin-side programmatic dismiss —
client.tui.showToast()returns an identifier;client.tui.dismissToast(id)(or equivalent/tui/dismiss-toastendpoint) closes it beforedurationelapses. Current SDK shape for reference:packages/opencode/node_modules/@opencode-ai/sdk/dist/gen/types.gen.d.ts→TuiShowToastData.body+TuiShowToastResponses.
Related
- [BUG]Error toast popup almost immediately disappears. #17191 — inverse pain point (error toasts disappear too fast). A user-interaction primitive (press-to-pin, press-to-dismiss) addresses both directions with one mechanism.
- "Copied to clipboard" toast disappears almost immediately on macOS #23613 — same inverse complaint for the "Copied to clipboard" toast on macOS.
- Bug Report: TUI "Copied to clipboard" toast cannot be disabled #21542 (closed) — different concern (silencing a specific toast via env flag), but same underlying theme of users wanting finer control over toast lifecycle.
Scope
- Backward compatible: both additions are opt-in.
- Minimal SDK surface impact: one new field on
TuiShowToastData.body, one new endpoint, one new return shape. - Complements existing toast API rather than replacing it.
Happy to contribute a PR once the API shape is agreed — the aidevops plugin will ship it as a consumer on day one.
aidevops.sh v3.8.93 plugin for OpenCode v1.14.20 with claude-opus-4-7 spent 14h 47m and 437,940 tokens on this with the user in an interactive session.
Activity
github-actions commentedon Apr 22, 2026
For keybind-related issues, please also check our pinned keybinds documentation: #4997
herjarsa commentedon Apr 25, 2026
Superseded by #24404 - this feature request is now covered by the unified task state color convention PR.
herjarsa commentedon Apr 25, 2026
Superseded by #24404 - this feature request is now covered by the unified task state color convention PR.
marcusquinn commentedon Apr 26, 2026
@herjarsa #24404 looks like a different feature
herjarsa commentedon Apr 26, 2026
Retracting previous comment - this issue may not be superseded by #24404. #23879 requests DISMISSIBLE toasts (UX interaction), while #24404 is about color convention for states. Different aspect: interaction vs visual convention.
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.