Skip to content

[FEATURE]: dismissible toasts — user keyboard/click dismiss + plugin programmatic dismiss #23879

Closed as not planned

Description

@marcusquinn

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:

  1. User-side dismissibility — a keyboard shortcut (e.g., Esc while 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; optional dismissible: boolean flag on the emit.

  2. Plugin-side programmatic dismiss — client.tui.showToast() returns an identifier; client.tui.dismissToast(id) (or equivalent /tui/dismiss-toast endpoint) closes it before duration elapses. Current SDK shape for reference: packages/opencode/node_modules/@opencode-ai/sdk/dist/gen/types.gen.d.ts → TuiShowToastData.body + TuiShowToastResponses.

Related

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

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 22, 2026
  2. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  3. herjarsa commented on Apr 25, 2026

    @herjarsa

    Superseded by #24404 - this feature request is now covered by the unified task state color convention PR.

  4. herjarsa commented on Apr 25, 2026

    @herjarsa

    Superseded by #24404 - this feature request is now covered by the unified task state color convention PR.

  5. marcusquinn commented on Apr 26, 2026

    @marcusquinn
    Author

    @herjarsa #24404 looks like a different feature

  6. herjarsa commented on Apr 26, 2026

    @herjarsa

    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.

  7. assigned and unassigned on Apr 26, 2026
  8. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  9. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions