Repository navigation
feat(cli): tag the target author on buzz reactions add - #9121
bostonaholic wants to merge 6 commits into
Conversation
NIP-25 says a reaction should carry a `p` tag naming the author of the reacted-to event. Without it, an author cannot find reactions to their own messages with a `#p` filter, which the Buzz Inbox reactions feed (block/buzz-app#2646) reads. `buzz reactions add` now fetches the target event, adds `["p", <target author>]`, and fails with not_found when the target is not readable (the relay already rejects reactions to unknown targets). buzz-acp status reactions and the desktop app keep the bare SDK builders, so agent status reactions stay out of the Inbox. Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Boston <mboston@squareup.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🔐 Codex Security Review
Review SummaryOverall Risk: MEDIUM
Findings[MEDIUM]
|
Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Boston <mboston@squareup.com>
## Why NIP-25 says a reaction should carry a `p` tag naming the author of the reacted-to event. buzz-app's Activity → Reactions tab (block/buzz-app#2638, merged) finds reactions to your messages with a `#p` read. Reactions sent from mobile have no `p` tag, so they never appear there. #9121 makes the same change for `buzz reactions add`. ## What - Every reaction sent from mobile now carries `["p", <message author>]`. This covers the reaction pill, the quick-reaction row, the emoji picker, and reactions on system rows. - Removing a reaction is unchanged. - Agent status reactions (buzz-acp) and the desktop app are unchanged by decision. Agent status reactions stay out of Activity. ## Testing - New unit test: `ChannelActions.addReaction` publishes exactly `["e", target]` and `["p", author]`. It fails without the change (actual tags: `[['e', 'target-event']]`). - The message-actions widget test now checks that a quick reaction passes the message's author. - `just mobile-check`: format and `flutter analyze` are clean (no issues). - `just mobile-test`: 4,507 passed, plus the push-unconfigured and secp256k1 suites. All pass. - No screenshots: the change is one tag on the published event, and nothing on screen changes. - Not yet: a run on a device, and the human test. ## How a human can test 1. On mobile, as user B, react 👍 to a message from user A. 2. As user A, open Activity → Reactions in a current buzz-app build. 3. It works if a "B reacted 👍" row appears. Before this change, no row appears. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Matthew Boston <mboston@squareup.com> Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The target lookup gates the write, so a read replica that has not caught up must not turn a just-published message into not_found. Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Boston <mboston@squareup.com>
…ction-p * origin/main: (111 commits) feat(mobile): tag the reacted-to message author on reactions (#9141) fix(mobile): steady New DM picker rows and animate picks (#9249) perf(mobile): keep remote images on disk and show small ones as thumbnails (#9158) fix(relay): deliver slow cross-node events late instead of closing their recipients (#9235) fix(mobile): read only shown events from filtered Activity rows (#9215) fix(mobile): show the channel name as the notification subtitle (#9173) fix(mobile): keep Home's header clean under sheets (#9152) fix(mobile): show already-loaded custom emoji in the iOS reactions sheet (#9150) mobile: add follow and remind actions to inbox row menu (#9142) fix(mobile): start no threads in Solo chats (#9123) mobile: persist user profiles so names and avatars render on launch (#9116) fix(mobile): keep a sent thread reply above the composer (#9026) [buzz] Recover database pool capacity after stalled connections (#9267) feat: send a User-Agent on relay WebSocket upgrades (#9246) Record why relay connections close and quiet close warnings (#9245) fix(relay): say "channel owner or admin" in the call_webhook save refusal (#9169) feat(mobile): consolidate Solo chat settings in one sheet (#9255) fix(cli): preserve attachments across successive edits (#9226) fix(mobile): swipe left to reply so swipe-back keeps rightward drags (#9127) mobile: long-press a message link for open, copy and share (#9135) ... Signed-off-by: Matthew Boston <mboston@squareup.com>
main changed BuzzClient::new to take Credentials. Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Boston <mboston@squareup.com>
An ids-only read leaves out system channels and, for non-members, unlisted open channels, so the CLI returned not_found for reactions the relay accepts. An empty lookup now submits without `p` and the relay decides; its rejection reaches the user unchanged. Lookup errors still fail before submitting. Co-authored-by: mboston Implementer <932d3b6ebea6cc83e091551ae46d1c7e7f8f7d0fa8e9cef5e6facc8544af413b@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Boston <mboston@squareup.com>
|
🤖 Both findings in the security review (#9121 (comment)) are fixed.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
NIP-25 says a reaction should carry a
ptag naming the author of the reacted-to event. Without that tag an author cannot query reactions to their own messages with a#pfilter. The buzz-app Activity reactions tab (block/buzz-app#2638, merged) is built on that query. buzz-app's own publishers already add the tag.What
buzz reactions addnow looks up the target event and adds["p", <target author>]to the reaction. This covers both plain emoji and custom emoji (--emoji-url).consistency: strong), so a message published moments ago isn't missed during replica lag.pand the relay decides. A reader-scoped lookup leaves out system channels and, for non-members, unlisted open channels, even though the sender can react there. If the target really doesn't exist, the relay's rejection (invalid: reaction target event not found) reaches the user unchanged. A failed lookup (auth, network, relay error) still stops the command before anything is sent.ptag and stay out of the Inbox.Testing
ptagptagconsistency: strongpcargo clippy -p buzz-cli --all-targets -D warningsandcargo fmt --checkare clean.Demo
Built
target/debug/buzz(0a1bbb9) run against a stub relay. In the stub,aaaa…is readable,cccc…exists but an unscoped read can't see it (like a system channel), andbbbb…doesn't exist:How a human can test
buzz messages send --channel <id> --content hi.buzz reactions add --event <that id> --emoji "👍".buzz reactions add --event <64 hex chars that don't exist> --emoji "👍". It works if this prints the relay'sreaction target event not foundand exits 2.🤖 Generated with Claude Code