Repository navigation
Notifications: show clickable desktop banners on Windows - #127
Open
katulevskiy wants to merge 3 commits into
Open
katulevskiy wants to merge 3 commits into
katulevskiy wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Source: zeronsh#662 Source revision: ae8358d
Contribution Managerneeds triage · medium risk · untriaged Open review workspace · Revision Next actions:
This summary is maintained by the review app. Decisions and test evidence are recorded in the workspace; the app does not merge PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream mirror
Source: zeronsh#662
Original author: @RemingtonWilcox
Original revision:
ae8358dc70e2ff2e10879d608f47b9672be267f1This PR is an isolated Contribution Manager pilot mirror. Its reviews, checks and merge state are separate from upstream. An empty
[skip ci]commit suppresses automatic bulk CI; the code tree matches the imported upstream revision.Summary
notify::postwas a no-op there, so only the chime played. Session banners (run finished, waiting on input, run failed), the connection banner and the agent-update banner now show as Windows toasts through gpui's own system notifications (cx.show_system_notification). No new dependency and no platform code in Zeron.run_appcallscx.set_app_identity("sh.zeron.app", "Zeron"), the macOS bundle id. gpui registers it underHKCU\Software\Classes\AppUserModelIdwith aDisplayNamewhen it first posts, so portable copies get named banners too.cx.on_system_notification_responseroutes a clicked banner to the existingopen_notification_target, the same path macOS banner clicks take. Agent-update banners open Settings → Agents as on macOS. A banner without a chat (the connection banner) just brings Zeron forward.<audio silent="true">, so Zeron's chime stays the only sound and the existing sound settings still apply.zeron.issdeclares theAppUserModelId\sh.zeron.appkey withuninsdeletekeyso uninstall removes what gpui wrote. It also setsAppUserModelID: "sh.zeron.app"on the Start-menu and desktop shortcuts (see below).scripts/test-windows-installer.ps1checks the shortcut's ID and that the key exists after install and is gone after uninstall.notify::posttakingcx. Notification settings and when banners fire are unchanged, including Only when in the background.Worth a close look
set_app_identityalso sets the process's AppUserModelID (SetCurrentProcessExplicitAppUserModelID), not just the toast identity. Without a matching ID on the shortcut, a pinned Zeron and the running window would show as two taskbar buttons. The installer now stamps the same ID on its shortcuts. Two gaps remain: taskbar pins made before this change, and Start-menu shortcuts from installs that only ever updated in-app (the updater doesn't rewrite shortcuts). Those keep the old ID until Zeron is re-pinned or the installer runs again. I haven't checked this by hand. A gpui option to name toasts without changing the process ID would avoid it, but that would be a zui change.DisplayNamebut noIconUri. With the installer's shortcut carrying the ID, Windows should take the icon from it. Portable copies may show a blank or generic icon. If so, the fix belongs in zui (registering anIconUri), not here.Activatedevent.windowsdependency. gpui already covers all of that.Test plan
notify::tests::windows_banners_replace_per_chat(gpui test platform): a chat's second banner replaces its first, keyed by chat id, and a chat-less banner gets its own slot. It fails without the change (nothing delivered).cargo test --locked -p zeron-ui --lib notify::testson Windows 11 x64: 2 passed.cargo check --locked -p zeron-ui --tests: no new warnings in touched code.rustfmt --checkis clean for the changed hunks.scripts/test-windows-installer.ps1(needs Inno Setup, and it touches the current user's registration; CI runs it). The shortcut-ID check was tried by hand on existing shortcuts.ui-testsworkflow): https://github.com/RemingtonWilcox/zeron/actions/runs/37240689962Screenshots
The banner from a finished run while Zeron was minimized, on Windows 11. This is a debug build run in place, not an installed one. It shows the name "Zeron", an icon, the chat title and "Run finished":
Zeron after clicking that banner: restored, focused, and on the notified chat (a different chat was selected before). Dark, device name pixelated:
Not captured: a banner from an installed build or a portable copy, and the sound (no audio capture, so "no second sound" is unverified).
🤖 Generated with Claude Code