Skip to content

fix(notifications): restore agent-task-complete dispatch broken by #944 - #1200

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-broken-notis
Apr 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-broken-notis

Conversation

@nwparker

@nwparker nwparker commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • PR feat(terminals): per-tab activity indicators #944 (per-tab activity indicators) removed the only renderer-side producer of agent-task-complete notifications inside onAgentBecameIdle, on the theory that BEL would cover the same ground.
  • In practice, the "Agent Task Complete" toggle in Settings has had zero event producers since feat(terminals): per-tab activity indicators #944 merged — notifications users explicitly opted into silently stopped firing. Not every agent CLI reliably emits BEL on completion (Gemini, some Codex flows), so BEL is not a complete substitute.
  • This restores the dispatch from onAgentBecameIdle in pty-connection.ts, keeping tab/worktree unread state BEL-only (so non-agent long-running tasks remain first-class attention sources). Double-firing with a concurrent BEL is already collapsed by the existing 5 s per-worktree dedupe in main/ipc/notifications.ts.
  • Types plumb { source: 'agent-task-complete' | 'terminal-bell', terminalTitle? } through pty-connection-types.ts, use-terminal-pane-lifecycle.ts, and use-notification-dispatch.ts. The existing unit test that asserted idle-does-nothing is updated to reflect the intended behavior.

Fixes the report that notifications stopped working after installing today's build.

Test plan

  • pnpm typecheck
  • pnpm lint (2 unrelated pre-existing warnings)
  • pnpm vitest run src/renderer/src/components/terminal-pane/pty-connection.test.ts — 20 passed
  • pnpm vitest run src/main/ipc/notifications.test.ts — 10 passed
  • Manually: launch a Claude agent, let it finish, confirm OS notification fires with "Agent Task Complete" enabled in Settings
  • Manually: ring BEL + finish agent within 5 s → single notification (main-process dedupe)
  • Manually: disable "Agent Task Complete" toggle → no notification on agent idle, BEL still fires

Made with Orca 🐋

PR #944 removed the sole renderer-side producer of 'agent-task-complete'
events on the assumption that BEL would cover the same ground. In
practice, not every agent CLI reliably emits BEL on completion (Gemini,
some Codex flows), so the "Agent Task Complete" toggle in Settings had
zero producers and did nothing.

Re-dispatch from onAgentBecameIdle while keeping unread state BEL-only.
Double-firing with a concurrent BEL is already collapsed by the
5 s per-worktree dedupe in main/ipc/notifications.ts.

Co-authored-by: Orca <[email protected]>
@nwparker
nwparker merged commit db7b633 into main Apr 28, 2026
3 checks passed
@nwparker
nwparker deleted the nwparker/fix-broken-notis branch April 28, 2026 06:39
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

1 participant