feat(messages): report messages to community moderators - #255
Conversation
Add a "Report message" action to the message overflow menu that signs and publishes a NIP-56 kind:1984 report through the session writer with a 10s deadline. No outbox and no plugin; failures keep the draft for manual retry. Rows holding an open report or its notice stay mounted in the virtualized timeline. Co-authored-by: Kalvin Chau <kalvin@block.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
Star Lord’s automated source review via Wes’s account
Reviewed head 898a8b8dd4ea01e140ba6dc48491cbace9ba9822 against base df7b7e7f45739f3e06e12d81623385701acdc51d.
No actionable source-demonstrated defects found in this revision. Reviewed the 14-file diff and relevant callers: report availability and dialog retry/pending behavior, timeline row retention and shared focus/toast ownership, loaded-target event construction, writer capability/deadline/disposal behavior, and broker sign/publish validation. The independent session/broker source review was reconciled with the implementation.
Validation limits: source-only; no PR code, tests, installs, app launches, or live reports were executed. Test additions were inspected, not run; CI status was not assessed. This does not validate real-browser virtualization/focus, packaged or alternate signer paths, or exact-head end-to-end behavior. The PR description reports pre-rebase E2E evidence and incomplete exact-head full-suite validation; those claims were not independently verified. The disclosed lost-ACK/manual-retry duplication and generic oversized-note error remain limitations.
This is non-blocking COMMENT feedback, not approval or merge readiness.
…sh-pr1 * origin/main: Refine direct message opening (#107) feat(messages): report messages to community moderators (#255) perf(channels): stop rerendering message rows after each channel switch (#269) Signed-off-by: Peppermint Butler <29b529ff43be424db89f51bff58a38cf86942acbffff98a14ce50b38c2a57d8f@buzz.block.builderlab.xyz>
* origin/main: Explain missing Pi provider models (#263) Browse Goose models and enter provider API keys (#230) test(agents): check model lookup Cancel by visible text (#259) Ask before mentioning people outside the channel (#257) Refine direct message opening (#107) feat(messages): report messages to community moderators (#255) Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
…-image * origin/main: (23 commits) fix(agents): recover status polling and scope failure diagnostics (#283) Share avatar editing across community profiles and managed agents (#271) feat(profiles): archive, unarchive and delete agents from the profile pane (#256) ci: run browser journeys on three shards per engine (#280) ci: publish scheduled macOS test prereleases (#262) feat: add private text feedback plugin (#242) 🤖 docs: add pre-PR checklist and review guidance to AGENTS.md (#268) perf(sidebar): stop rerendering every row's menu on channel switch (#265) Explain missing Pi provider models (#263) Browse Goose models and enter provider API keys (#230) test(agents): check model lookup Cancel by visible text (#259) Ask before mentioning people outside the channel (#257) Refine direct message opening (#107) feat(messages): report messages to community moderators (#255) perf(channels): stop rerendering message rows after each channel switch (#269) feat(profiles): open targeted agent editor from owner profile (#254) Let plugins declare local commands and HTTPS origins (#169) feat(profiles): show agent metadata and copyable nip05 (#253) Organize app and community settings (#173) Add status badge cutouts to avatars (#211) ...
Adds "Report message" to the message overflow menu, matching Buzz desktop.
Change
ReportMessageDialog: category radio group (NIP-56 types) + optional note; submit disabled until a category is chosen; pending state blocks close; failure keeps the draft and shows an error for manual retry.session.messages.report(messageId, type, note): builds a kind:1984 event (p= author,e= message id + type) from a loaded kind 9/40002/40008 target, signs and publishes through the session writer. Sign and publish each race a 10s deadline and session disposal, so a late signature never publishes. Unavailable when the writer does not advertise kind 1984.ChannelTimeline/MessageRow: a row with an open report or its success notice is added to VirtuakeepMounted, so scrolling it out of range does not drop the draft or pending result. Release is deferred one task so Base UI focus restoration lands on the menu trigger first.Tests
relay/report.test.ts: event shape, target/type validation, deadline on hung sign and hung publish.ReportMessageDialog.test.tsx: submit/reject/retry/success, empty form on reopen, focus restored before pin release.ChannelTimeline.report.test.tsx: mounted StrictMode timeline + row with a Virtua boundary mock; row survives eviction through held submit and notice, and is evicted after dismissal/cancel.Limitations
vite.config.ts,docs/status.md); NIP-07/Tauri signer paths are untested.pnpm testpass at this exact commit has not completed; the pre-rebase runs had load-related timeouts in unrelated tests.