Skip to content

Fix Windows toast notifications when unfocused - #4

Merged
zis3c merged 1 commit into
zis3c:mainfrom
CaoeUU:fix/windows-toast-notifications
Aug 18, 2026
Merged

Fix Windows toast notifications when unfocused#4
zis3c merged 1 commit into
zis3c:mainfrom
CaoeUU:fix/windows-toast-notifications

Conversation

@CaoeUU

@CaoeUU CaoeUU commented Aug 17, 2026

Copy link
Copy Markdown

Fixed #3

Problem

Windows toast notifications were not displayed.

Root cause

  1. The PowerShell here-string used to construct the toast XML was joined
    onto a single line, causing UnexpectedCharactersAfterHereStringHeader.
  2. CreateToastNotifier used the unregistered AppUserModelID
    Codex Notifier. Stable VS Code is registered as
    Microsoft.VisualStudioCode.

The notification subprocess ignored its error, so the failure was silent.

Changes

  • Constructed the toast XML with a valid single-quoted PowerShell string.
  • Corrected the VS Code AppUserModelID for Windows.

Verification

  • Reproduced the original PowerShell parser error.
  • Confirmed Microsoft.VisualStudioCode using Get-StartApps.
  • Verified that the notification appears while VS Code is unfocused.
  • Ran npm run ci.

Compatibility note

This AppUserModelID targets stable Visual Studio Code. VS Code Insiders or
other distributions may require separate AppUserModelID handling.

@zis3c

zis3c commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Thanks a lot for this PR. This fix was really helpful and matched an issue we had already received before. We have now merged it into our codebase, tested it, and shipped it in v0.1.10. Really appreciate the contribution and the help in improving Codex Notifier.

Screenshot 2026-08-18 105354

@zis3c zis3c closed this Aug 18, 2026
@zis3c zis3c reopened this Aug 18, 2026
@zis3c
zis3c merged commit 50645f1 into zis3c:main Aug 18, 2026
3 checks passed
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.

Windows not receive any notification

3 participants