Skip to content

feat(cli): add Windows toast notification for task completion - #1118

Open
rekty wants to merge 2 commits into
CodebuffAI:mainfrom
rekty:feat/desktop-notification
Open

feat(cli): add Windows toast notification for task completion#1118
rekty wants to merge 2 commits into
CodebuffAI:mainfrom
rekty:feat/desktop-notification

Conversation

@rekty

@rekty rekty commented Aug 25, 2026

Copy link
Copy Markdown

{
"title": "feat(cli): add Windows toast notification for task completion",
"head": "rekty:feat/desktop-notification",
"base": "main",
"body": "Closes #1111\n\nWhen speakers are muted or the user steps away, the terminal bell (BEL character in the OSC title sequence) is easy to miss. This adds a native Windows toast notification that fires when a run completes so users always get a visual cue.\n\n### Changes\n\n- cli/src/utils/notification.ts (new) — notifyDesktop(title, body) uses .NET ToastNotificationManager via PowerShell. Works on every Windows 10+ machine without extra dependencies. Falls back gracefully on any error. notifyTaskComplete(agentName?) is the convenience wrapper.\n- cli/src/hooks/helpers/send-message.ts — calls notifyTaskComplete() after finalizeQueueState on successful completion.\n\n### Platform behavior\n\n| Platform | Notification |\n|---|---|\n| Windows | Native toast (via PowerShell .NET interop) |\n| macOS / Linux | No-op (terminal bell already provides the cue) |\n\nThe Desktop (Electron) app can also import notifyTaskComplete directly for its own completion events.\n\n### Verification\n\n- bun test cli/src/hooks/helpers/__tests__/send-message.test.ts — pre-existing failure (missing web-tree-sitter dep), unrelated to this change\n- notification.ts is self-contained with no external dependencies"
}

rekty added 2 commits August 25, 2026 16:08
Closes CodebuffAI#1089

FriendliAI serves several models already in the catalog under other
providers (GLM-5.2, MiniMax-M2.5). Register their HuggingFace-cased IDs
under the friendli/ prefix so a private-backend routing layer can pick
them up without any public code changes beyond this catalog entry.

Changes:
- Add 'friendli' to ALLOWED_MODEL_PREFIXES
- Add friendliModels map with two serverless models
- Spread friendliModels into the canonical models set
- Add friendli.ai to providerDomains and getLogoForModel
Closes CodebuffAI#1111

When speakers are muted or the user steps away, the terminal bell
(BEL character in the OSC title sequence) is easy to miss. Add a
native Windows toast notification that fires when a run completes so
users always get a visual cue.

- cli/src/utils/notification.ts: new utility using .NET
  ToastNotificationManager via PowerShell — works on every Windows
  10+ machine without extra dependencies
- cli/src/hooks/helpers/send-message.ts: call notifyTaskComplete()
  after finalizeQueueState on successful completion

The Desktop (Electron) app can also import notifyTaskComplete
directly for its own completion events.
@codebuff-team

Copy link
Copy Markdown
Contributor

The core idea — a Windows toast notification as a fallback when the terminal bell is missed — is reasonable and notification.ts is self-contained and fails safe. That part could be worth porting on its own.

But this PR bundles in an entirely unrelated change to common/src/constants/model-config.ts that adds a new friendli provider prefix and two models, friendli/zai-org/GLM-5.2 and friendli/MiniMaxAI/MiniMax-M2.5. Neither of these models exists (there is no GLM-5.2 or MiniMax-M2.5 release), and nothing in the PR title, description, or linked issue (#1111) mentions FriendliAI. Unilaterally adding a new model vendor in a PR ostensibly about desktop notifications is out of scope, and shipping fictitious model identifiers into a routing table is actively harmful — it will silently break for anyone who tries to select those models.

Separately, the notification.ts doc comment says "this module is not wired into the CLI streaming flow by default" and that only the Desktop app calls notifyTaskComplete, but the diff to send-message.ts directly wires it into handleRunCompletion, calling it unconditionally on every successful CLI run. That's inconsistent with the module's own documentation and suggests the PR wasn't carefully proofread end-to-end.

Please split this into a single-purpose PR for the Windows toast feature, drop the model-config changes entirely (or file them separately with real, verifiable model IDs and provider justification), and reconcile the doc comment with the actual wiring before resubmitting.

@codebuff-team codebuff-team added bot:triaged Classified by the community triage bot pr:rejected Not a change this project wants; closed with an explanation labels Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:triaged Classified by the community triage bot pr:rejected Not a change this project wants; closed with an explanation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Desktop Notification for Task Completion on Windows

2 participants