Skip to content

feat: browser notification when agent session ends - #356

Open
xCss wants to merge 1 commit into
agegr:mainfrom
xCss:feat/browser-notification-on-agent-end
Open

feat: browser notification when agent session ends#356
xCss wants to merge 1 commit into
agegr:mainfrom
xCss:feat/browser-notification-on-agent-end

Conversation

@xCss

@xCss xCss commented Aug 2, 2026

Copy link
Copy Markdown

Closes #339. Ref discussion #317.

What

When the browser tab is in the background, a Web Notifications API popup fires when the agent finishes responding.

Behavior

  • Tab visible: no notification (user is already watching)
  • Tab hidden / minimized: system notification fires with the session name as title
  • First run: permission is requested lazily on the first background completion
  • Permission denied / unsupported browser: silently skipped

Implementation

Single change to handleAgentEnd in AppShell.tsx (~15 lines). i18n keys added to en.ts and zh-CN.ts.

Key en zh-CN
i18n.sessionComplete Session complete 任务完成
i18n.taskFinished Task finished. 任务已完成。

Screenshot

7a0c7e75-1909-4f4b-b31b-38dae6f62335

Closes agegr#339. Ref discussion agegr#317.

When the tab is in the background, fires a Web Notifications API popup
on agent completion. The notification title uses the current session
name (falls back to i18n "Session complete"); the body is the i18n
"Task finished." string, so both en and zh-CN are covered.

Permission is requested lazily on the first background completion;
denied or unsupported browsers are silently skipped.
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.

Feature request: Desktop/notification popup when agent task completes (like OpenCode)

1 participant