Skip to content

feat(desktop): add Windows Toast notifications via go-toast library (#5294)#5365

Closed
Barsit wants to merge 1 commit into
esengine:main-v2from
Barsit:feat/desktop-notifications
Closed

feat(desktop): add Windows Toast notifications via go-toast library (#5294)#5365
Barsit wants to merge 1 commit into
esengine:main-v2from
Barsit:feat/desktop-notifications

Conversation

@Barsit

@Barsit Barsit commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

背景

Issue #5294: 桌面端(Wails)运行在后台时,任务完成或需要审批时没有 Windows 系统通知。

改动

3 个文件,45 行新增,15 行删除:

  1. internal/notify/sender_windows.go — PowerShell 调 BurntToast/msg.exe 改为 go-toast 库直调 Windows Toast API
  2. desktop/app.go — App 结构体加 notificationSender,startup() 中根据 notifications 配置初始化
  3. desktop/tabs.go — buildTabControllerWithLoadedSession() 中用 notify.NewSink() 包装 tabEventSink,自动触发 Toast

触发事件

  • TurnDone(回合完成)→ Turn finished / Turn failed
  • ApprovalRequest(需要审批)→ Approval needed
  • AskRequest(有提问需要回答)→ Question needs your answer

配置

编辑 ~/.config/reasonix.toml:

[notifications]
enabled = true
turn_done = true
approval_request = true
ask_request = true

测试

前台
16bf9d4a296334f5532c98d9d99037f

后台
5e92c5ec26095a658eedc315aa22b7c

Closes #5294

Implements esengine#5294 - adds Windows system toast notifications for the
Wails desktop app when the app is in the background (minimized to tray).

Changes:
- internal/notify/sender_windows.go: replace PowerShell BurntToast calls
  with go-toast library for reliable Windows Toast API integration
- desktop/app.go: add notificationSender field, initialize in startup()
  when NotificationsConfig.Enabled is true
- desktop/tabs.go: wrap tabEventSink with notify.Sink in
  buildTabControllerWithLoadedSession() so TurnDone/ApprovalRequest/
  AskRequest events trigger OS toast notifications

Front-end sounds (playSuccessChime / playAttentionChime) were already
wired and remain unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 26, 2026
@Barsit

Barsit commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

SivanCola added a commit to SivanCola/DeepSeek-Reasonix that referenced this pull request Jul 3, 2026
Credits the Windows Toast direction from PR esengine#5365 in the repository history.

Co-authored-by: Barsit <86559454+Barsit@users.noreply.github.com>
@SivanCola

Copy link
Copy Markdown
Collaborator

感谢 @Barsit 的实现和验证。#5847 已经合并到 main-v2,并吸收/改良了这个 PR 的核心贡献:

  • 保留了 Windows desktop system notification 的方向。
  • 采用了 go-toast / Windows native Toast 的实现思路。
  • 保留了把桌面 controller event stream 接入共享 notification sink 的机制。

#5847 还补上了 per-workspace config loading、macOS/Linux 共享平台 sender 复用、focused desktop regression tests,并修正了 Windows fallback 可能重复通知的问题。

贡献归因已经放进 #5847 的 PR body;采用自 #5365 的贡献也通过 commit-level Co-authored-by: Barsit <86559454+Barsit@users.noreply.github.com> 进入仓库历史。

因为 #5847 已覆盖并关闭 #5294,这个 PR 现在作为 superseded/adopted 关闭,而不是拒绝该方向。

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

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: 希望桌面端加入通知功能,在跑完的时候通过windows系统发通知

2 participants