[Repo Assist] fix: respect sound=false in system.notify node notifications#122
Closed
github-actions[bot] wants to merge 1 commit intomasterfrom
Closed
Conversation
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>
36 tasks
Collaborator
|
Superseded by PR #125 which applied NotificationSound to all toast call sites including system.notify. |
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.
🤖 This is an automated pull request from Repo Assist.
Summary
When an agent invokes
system.notifywithsound=false, thePlaySoundfield inSystemNotifyArgswas correctly populated bySystemCapability— but silently ignored inOnNodeNotificationRequested. The toast was always shown with sound regardless of the per-notification flag.Root Cause
SystemCapability.HandleNotifyAsynccorrectly reads thesoundargument:But
OnNodeNotificationRequestedinApp.xaml.csnever readargs.PlaySound:The existing test (
CapabilityTests.Notify_RaisesEvent_WithArgs) already verifies thatPlaySound=falseis propagated to the event args — the gap is the UI handler.Fix
Relationship to PR #95
PR #95 applies the user's global
NotificationSoundpreference to all toasts. This PR handles a different concern: respecting the per-notificationsound=falseflag sent by the agent. Both fixes are complementary and non-conflicting.Test Status
dotnet test tests/OpenClaw.Shared.Tests/NETSDK1100), soApp.xaml.cschanges are verified by inspection. The logic is a straightforward null-guard on a boolean field already confirmed by the existing capability test.