Skip to content

[Repo Assist] fix: apply NotificationSound setting to all toast notifications#95

Closed
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-issue-71-notification-sound-ec8ced57a23fcfe3-33e2035dbe22e209
Closed

[Repo Assist] fix: apply NotificationSound setting to all toast notifications#95
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-issue-71-notification-sound-ec8ced57a23fcfe3-33e2035dbe22e209

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated contribution from Repo Assist.

Root Cause

The NotificationSound setting in tray settings was saved and restored correctly by SettingsWindow but was never applied when building toast notifications. Every toast always fired with the system default sound regardless of user preference — all 14 direct .Show() call sites in App.xaml.cs bypassed the setting entirely.

Fix

Introduces a ShowToast(ToastContentBuilder) helper in App.xaml.cs that applies the audio preference before calling .Show():

  • None → silent toast (AddAudio(silent: true))
  • Subtlems-winsoundevent:Notification.IM
  • Default → system default (no-op, existing behaviour)

All 14 direct .Show() call sites in App.xaml.cs are routed through ShowToast(...) instead.

Test Status

Tests could not be run in the Linux CI environment (project targets Windows). The logic is straightforward: one helper method added, all call sites updated mechanically.

Closes #71
Closes #92

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64

The NotificationSound setting (Default / None / Subtle) was saved and
restored correctly by SettingsWindow but never applied when building
toast notifications. Every toast always fired with the system default
sound regardless of user preference.

Adds a ShowToast(ToastContentBuilder) helper that applies the audio
preference before calling .Show(), and updates all 14 toast call sites
in App.xaml.cs to use it:
  - 'None' → silent toast (AddAudio(silent: true))
  - 'Subtle' → ms-winsoundevent:Notification.IM
  - 'Default' → system default (no-op, existing behaviour)

Closes #71

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added automation bug Something isn't working repo-assist labels Mar 23, 2026
@github-actions github-actions bot mentioned this pull request Mar 23, 2026
36 tasks
github-actions bot added a commit that referenced this pull request Mar 31, 2026
When an agent invokes system.notify with sound=false, the PlaySound field
in SystemNotifyArgs was correctly populated by SystemCapability but then
silently ignored in OnNodeNotificationRequested. The toast was always
shown with sound regardless of the per-notification flag.

Fix: check args.PlaySound before showing the toast and add a silent
audio element when the agent has explicitly requested no sound.

This is orthogonal to the user-level NotificationSound preference
(addressed in PR #95): PlaySound=false suppresses sound for that
specific notification only, regardless of the global sound setting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shanselman
Copy link
Copy Markdown
Collaborator

Superseded by PR #125 which implemented the same NotificationSound fix against current code.

@shanselman shanselman closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation bug Something isn't working repo-assist

Projects

None yet

1 participant