buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix: workflow @mentions and Linux notification sounds

Open chessing234 opened this issue 4 months ago • 4 comments

Summary

  • Workflow-emitted **@Name** now gets p tags so ACP can wake the agent (#2686)
  • Play notification sounds from blob URLs so WebKitGTK can hear them (#2562)
  • Keep playing sounds even when the OS toast fails to deliver

Test plan

  • [x] cargo test -p buzz-relay --lib markdown_emphasis
  • [x] cargo fmt -p buzz-relay -- --check
  • [x] cargo clippy -p buzz-relay --lib -- -D warnings
  • [x] biome check on touched desktop files
  • [ ] Mention sound on Linux AppImage / tauri dev

Made with Cursor

chessing234 avatar Jul 24 '26 08:07 chessing234

Two notes on the workflow_sink.rs part (I filed #2686):

  1. _@Robby_ still wakes no one, and the new test can't see it. The left boundary now accepts _, but extends_name still treats _ as a name-continuation char, so after matching Robby the trailing _ fails the right-boundary check and the mention is rejected. The new test passes anyway because the same string also contains *@Robby*, which matches the same pubkey — and the output is deduplicated, so the assertion can't distinguish "both matched" from "only the * one matched". Standalone repro:

    resolve_mention_pubkeys("_@Robby_ take a look", &[m("Robby", &pk('a'))])  // currently []
    

    Dropping _ from extends_name fixes it without harming underscore display names — a member literally named will_smith still binds fully because longer names match first (worth pinning with its own test).

  2. This adds a fourth hand-maintained copy of the boundary rule. The same delimiter set now lives in hasMention.ts, buzz-sdk/mentions.rs (being consolidated in #2547 per review there), and twice-diverged here — the drift class that produced #2526 in the first place. Once #2547 lands, buzz_sdk::mentions::is_mention_lead is the shared definition and buzz-relay already depends on buzz-sdk; I have a ready branch converging workflow_sink on it (including the extends_name fix + tests) and am happy to PR it on top of either ordering — whichever lands first.

bosoud avatar Jul 24 '26 18:07 bosoud

Dropped _ from extends_name so _@Robby_ wakes Robby; added a standalone _@Robby_ case plus a will_smith longest-match pin. Happy to take your buzz-sdk converge PR on top once #2547 lands.

chessing234 avatar Jul 25 '26 05:07 chessing234

Rebased onto latest main to pick up nostr 0.44.6 (RUSTSEC-2026-0216) and the file-size ratchet baseline. Local Desktop file-size check is clean against current main.

CI workflows are waiting on maintainer approval for this fork push — please Approve and run workflows when you can.

chessing234 avatar Jul 29 '26 14:07 chessing234

@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance?

chessing234 avatar Aug 02 '26 08:08 chessing234

🔐 Codex Security Review

Status: review required for the current range.

The current range is 114dbf745f1fe0bdbecb70e07a07f03c23687bdc...3192e1f0d7c69cbaee144b41f9fc24ee2d0c8541. A new review must complete for this exact range. When manual authorization is required, a Block organization member must comment exactly @buzz-security-review 3192e1f0d7c69cbaee144b41f9fc24ee2d0c8541 to authorize a new review. Any previous review applies only to its recorded range.

github-actions[bot] avatar Sep 01 '26 15:09 github-actions[bot]