Skip to content

Add TUI notifications and attention sounds (disabled by default) - #26980

Merged
kommander merged 1 commit into
devfrom
notifications-aha
May 13, 2026
Merged

Add TUI notifications and attention sounds (disabled by default)#26980
kommander merged 1 commit into
devfrom
notifications-aha

Conversation

@kommander

@kommanderkommander commented May 12, 2026

Copy link
Copy Markdown
Collaborator
  • Added TUI attention API for notifications, sounds, sound packs, and per-call focus behavior.
  • Added internal notifications plugin for questions, permissions, session completion, and session errors.
  • Added built-in audio assets and sound playback support.
  • Added plugin sound pack registration with scoped cleanup and relative path resolution.
  • Added TUI config for attention, with notifications disabled by default in v1.
  • Added tests for attention behavior, notifications, config defaults, runtime boot, and plugin sound packs.
  • Added v2 spec noting notifications should default to enabled in v2.

@kommanderkommander changed the title tui notificationstui notifications (WIP)May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
@simonklee
simonklee requested a review from CopilotMay 12, 2026 09:50

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a host-owned “attention” subsystem to the TUI plugin API to support desktop notifications and semantic sounds, plus a new internal notifications plugin that uses it (e.g., question/permission/session done/error).

Changes:

  • Introduces api.attention (notify + soundboard) in the plugin API types and wiring.
  • Adds TUI attention configuration (schema, resolution, path handling) and updates docs/fixtures/tests accordingly.
  • Implements the host attention engine (createTuiAttention) with focus-aware delivery, sound packs, and built-in sounds; adds an internal notifications plugin.

Reviewed changes

Copilot reviewed 20 out of 67 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
packages/plugin/src/tui.tsAdds attention-related types and exposes attention on TuiPluginApi.
packages/plugin/package.jsonBumps @opentui/* peer dependency minimums to >=0.2.7.
packages/opencode/test/fixture/tui-runtime.tsUpdates resolved TUI config fixture to include attention defaults/overrides.
packages/opencode/test/fixture/tui-plugin.tsExtends test plugin API fixture with attention stub.
packages/opencode/test/config/tui.test.tsAdds coverage for attention config defaults + overrides + path resolution.
packages/opencode/test/cli/tui/plugin-loader.test.tsAdds coverage for scoped attention sound pack registration disposal + relative path resolution.
packages/opencode/test/cli/run/runtime.boot.test.tsUpdates boot config helper to include attention settings.
packages/opencode/test/cli/cmd/tui/notifications.test.tsAdds tests for the internal notifications plugin behavior and deduping logic.
packages/opencode/test/cli/cmd/tui/attention.test.tsAdds extensive tests for createTuiAttention behavior (focus gating, sanitization, sound packs, failures, disposal).
packages/opencode/src/cli/cmd/tui/plugin/runtime.tsAdds scoped attention API + plugin-relative file resolution and disposes host attention on runtime dispose.
packages/opencode/src/cli/cmd/tui/plugin/internal.tsRegisters the new internal notifications plugin.
packages/opencode/src/cli/cmd/tui/plugin/api.tsxThreads attention into the TUI plugin API factory.
packages/opencode/src/cli/cmd/tui/feature-plugins/system/notifications.tsImplements internal TUI notifications via api.attention.notify.
packages/opencode/src/cli/cmd/tui/config/tui.tsAdds attention config resolution, defaults, and relative-path resolution for sound overrides.
packages/opencode/src/cli/cmd/tui/config/tui-schema.tsAdds attention config schema and allowed semantic sound names.
packages/opencode/src/cli/cmd/tui/attention.tsImplements host attention engine (notifications + audio + soundboard + sanitization).
packages/opencode/src/cli/cmd/tui/app.tsxInstantiates attention host and passes it to plugin API + runtime.
packages/opencode/src/audio.d.tsAdds *.mp3 module typing for audio imports.
packages/opencode/specs/tui-plugins.mdDocuments attention config and api.attention usage.
packages/opencode/package.jsonAdds @opencode-ai/ui workspace dependency for bundled audio assets.
package.jsonBumps root @opentui/* versions to 0.2.7.
bun.lockLockfile updates for the new dependency and @opentui/* version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/opencode/src/cli/cmd/tui/plugin/runtime.ts Outdated
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
@kommander
kommanderforce-pushed the notifications-aha branch 2 times, most recently from 142e1cb to 2187de6CompareMay 12, 2026 20:51
@kommanderkommander changed the title tui notifications (WIP)Add TUI notifications and attention sounds (disabled by default)May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 12, 2026
opencode-agentBot added a commit that referenced this pull request May 13, 2026
@kommander
kommander merged commit d636785 into devMay 13, 2026
11 checks passed
@kommander
kommander deleted the notifications-aha branch May 13, 2026 01:26
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kommander