Skip to content

[deep-review] C2: NodeService.ShowToast bypasses user sound preferences for capture/record toasts #342

Closed

Description

@codemonkeychris

Summary

There are two ShowToast implementations in the tray with divergent behaviour. App.ShowToast honours the user's sound preference (None/Subtle/Default) and a 30-second deduplication window. NodeService.ShowToast does neither — it just fires ToastContentBuilder().Show(). Capture/record paths route through NodeService.ShowToast, so screen-record / camera-clip / camera-blocked / capture-complete toasts ignore the user's sound setting.

Where

  • Divergent: src/OpenClaw.Tray.WinUI/App.xaml.cs:3823 (App.ShowToast) vs src/OpenClaw.Tray.WinUI/Services/NodeService.cs:1786 (NodeService.ShowToast)
  • Callers using the wrong path:
    • Toast_ScreenCaptured — NodeService.OnScreenCapture (~line 1367)
    • Toast_ScreenRecordingComplete — NodeService.OnScreenRecord (~line 1402)
    • Toast_CameraBlocked — NodeService.OnCameraSnap/OnCameraClip (~lines 1430, 1465)

Why it matters

These toasts fire on privacy-sensitive operations (screen capture, camera). A user who silenced toasts because they're in a meeting or recording video gets unexpected sound. Worse: the toasts fire on attacker-controllable triggers (any screen.snapshot succeeds throttled-once-per-10s).

Proposed fix

Delete NodeService.ShowToast. Route capture/record toasts through App.ShowToast (or equivalent helper that honours preferences and dedup).

Add a regression test: set sound preference to None, fire a capture, assert no PlaySound invocation (or use a mockable toast service and assert the routing).

Note on root cause

This is one of several findings where copy/paste in NodeService diverged from the original in App. Filing a structural duplication issue separately to catalog the broader pattern.

Severity

Bug — privacy/UX regression visible on every screen-capture invocation.

Activity

  1. added
    bug
    on May 14, 2026
  2. AlexAlves87 commented on May 14, 2026

    @AlexAlves87
    Contributor

    Picking this up. Will remove NodeService.ShowToast and route capture/record toasts through App.ShowToast so sound preferences and deduplication are honoured.

  3. added a commit that references this issue on May 14, 2026
    0f618cf
  4. locked as resolved and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions