Skip to content

fix(desktop): resolve activity feed showing channel UUID instead of message content#2201

Merged
wpfleger96 merged 3 commits into
mainfrom
duncan/observer-feed-send-preview
Jul 21, 2026
Merged

fix(desktop): resolve activity feed showing channel UUID instead of message content#2201
wpfleger96 merged 3 commits into
mainfrom
duncan/observer-feed-send-preview

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jul 21, 2026

Copy link
Copy Markdown
Member

Stops extracting agent-sent message content from shell command text and fetches it from the relay event instead, eliminating the case where the Activity feed rendered a bare channel UUID (or literal shell syntax) as the message body.

Problem

For buzz messages send --content - (stdin) forms — including printf pipes — the classifier's arg-parsing fell back to extractBuzzCliObjectPreview, which surfaces the first available flag value (--channel, --event, etc). Since --channel is present on every send, the UUID rendered as if it were the message text. Forms like --content "$(cat file)" or --content "$MESSAGE" had a related symptom: the literal shell syntax rendered as the message body instead of the content that was actually sent.

Fix

parseBuzzCliCommand (agentSessionToolClassifier.ts) now only extracts a --content value for messages.send when it is a statically exact inline string — any value containing $ or a backtick anywhere (stdin, command substitution, variable expansion) yields null and never falls through to the object-preview fallback. extractSimpleEchoPipeContent and its helper are removed — no shell-form-specific parsing left to extend.

When arg-side content is null, the useSentMessageBody hook (AgentSessionToolItem/useSentMessageBody.ts) fetches the real event body from the relay via getEventById, keyed off the message ID already recovered from the tool result by getSentMessageLink. The event is nostr-immutable, so the query is cached with staleTime: Infinity. CompactMessageSummary renders inline content, then fetched content, then the existing "Message content unavailable." placeholder — never a raw CLI flag value or shell fragment.

…essage content

Stop extracting message content from shell text for agent sends. The
classifier now only returns inline --content values; piped stdin, command
substitution, and heredoc forms yield null preview, which triggers a
fetch of the real event body from the relay via the new useSentMessageBody
hook. This eliminates the fallback to extractBuzzCliObjectPreview that
surfaced --channel UUIDs as message text.
Extract shouldFetchSentMessage and resolveSentMessageBody as pure
testable helpers from the hook. Tests cover the priority chain
(inline > fetched > null) and fetch-gating conditions.
@wpfleger96
wpfleger96 requested a review from a team as a code owner July 21, 2026 02:30
…paths

Extend the inline-content guard to reject any --content value containing
a $ or backtick anywhere (not just leading $( or backtick), so shell
variable expansion and embedded command substitution no longer leak as
literal message text — those forms now fetch the authoritative event body
instead.

Add integration coverage for useSentMessageBody driving the real
useQuery/QueryObserver wiring (fetch-by-messageId, disabled-when-inline,
fetch-miss) plus render-level assertions for the fetched-content and
placeholder paths, closing the gap flagged in review pass 1/3.
@wpfleger96
wpfleger96 force-pushed the duncan/observer-feed-send-preview branch from 35797d2 to a27a6e5 Compare July 21, 2026 03:40
@wpfleger96
wpfleger96 merged commit c5d00a3 into main Jul 21, 2026
25 checks passed
@wpfleger96
wpfleger96 deleted the duncan/observer-feed-send-preview branch July 21, 2026 04:09
wpfleger96 pushed a commit that referenced this pull request Jul 21, 2026
…chive

* origin/main: (25 commits)
  feat(cli): filter archived instances from --template roster resolution (#2207)
  chore(release): release Buzz Desktop version 0.4.21 (#2209)
  fix(desktop): clarify data deletion action (#2208)
  feat: brand authentication complete page (#2192)
  fix(buzz-acp,buzz-agent): surface stall duration and fate (#2204)
  fix(desktop): resolve activity feed showing channel UUID instead of message content (#2201)
  feat(cli): add agents archive/unarchive/archived subcommands (#2173)
  chore(acp): strip stale finding-number references from comments (#2202)
  chore(release): release Buzz Mobile version 0.4.9 (#2200)
  Simplify first-community onboarding choices (UI only) (#2194)
  fix(mobile): sanitize Android image uploads (#2188)
  fix(cli): paginate channel directory queries (#2181)
  Fix persisted agent defaults display (#2182)
  [codex] Fix missing release tag detection (#2191)
  feat(web): authenticate gated community browsing (#2190)
  fix(timeout): unified turn-timeout fix — cap inheritance, steer renewal, activity-aware requeue, LLM stall surfacing (#2175)
  fix(desktop): scope draft store per workspace relay (#2179)
  chore(release): release Buzz Mobile version 0.4.8 (#2187)
  [codex] create release tags with dedicated App (#2186)
  fix(desktop): avoid forwarding click event as channel callback (#2174)
  ...
wpfleger96 added a commit that referenced this pull request Jul 21, 2026
…chive

* origin/main: (25 commits)
  feat(cli): filter archived instances from --template roster resolution (#2207)
  chore(release): release Buzz Desktop version 0.4.21 (#2209)
  fix(desktop): clarify data deletion action (#2208)
  feat: brand authentication complete page (#2192)
  fix(buzz-acp,buzz-agent): surface stall duration and fate (#2204)
  fix(desktop): resolve activity feed showing channel UUID instead of message content (#2201)
  feat(cli): add agents archive/unarchive/archived subcommands (#2173)
  chore(acp): strip stale finding-number references from comments (#2202)
  chore(release): release Buzz Mobile version 0.4.9 (#2200)
  Simplify first-community onboarding choices (UI only) (#2194)
  fix(mobile): sanitize Android image uploads (#2188)
  fix(cli): paginate channel directory queries (#2181)
  Fix persisted agent defaults display (#2182)
  [codex] Fix missing release tag detection (#2191)
  feat(web): authenticate gated community browsing (#2190)
  fix(timeout): unified turn-timeout fix — cap inheritance, steer renewal, activity-aware requeue, LLM stall surfacing (#2175)
  fix(desktop): scope draft store per workspace relay (#2179)
  chore(release): release Buzz Mobile version 0.4.8 (#2187)
  [codex] create release tags with dedicated App (#2186)
  fix(desktop): avoid forwarding click event as channel callback (#2174)
  ...

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 21, 2026
…chive

* origin/main: (25 commits)
  feat(cli): filter archived instances from --template roster resolution (#2207)
  chore(release): release Buzz Desktop version 0.4.21 (#2209)
  fix(desktop): clarify data deletion action (#2208)
  feat: brand authentication complete page (#2192)
  fix(buzz-acp,buzz-agent): surface stall duration and fate (#2204)
  fix(desktop): resolve activity feed showing channel UUID instead of message content (#2201)
  feat(cli): add agents archive/unarchive/archived subcommands (#2173)
  chore(acp): strip stale finding-number references from comments (#2202)
  chore(release): release Buzz Mobile version 0.4.9 (#2200)
  Simplify first-community onboarding choices (UI only) (#2194)
  fix(mobile): sanitize Android image uploads (#2188)
  fix(cli): paginate channel directory queries (#2181)
  Fix persisted agent defaults display (#2182)
  [codex] Fix missing release tag detection (#2191)
  feat(web): authenticate gated community browsing (#2190)
  fix(timeout): unified turn-timeout fix — cap inheritance, steer renewal, activity-aware requeue, LLM stall surfacing (#2175)
  fix(desktop): scope draft store per workspace relay (#2179)
  chore(release): release Buzz Mobile version 0.4.8 (#2187)
  [codex] create release tags with dedicated App (#2186)
  fix(desktop): avoid forwarding click event as channel callback (#2174)
  ...

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
tlongwell-block pushed a commit that referenced this pull request Jul 21, 2026
* origin/main:
  fix(desktop): keep project branches after reload (#2214)
  fix(git): make project branch workflows reliable (#2213)
  feat(desktop): manage project branches (#2212)
  fix(acp): honor relay rate limits and pace resubscribes on bad links (#2199)
  chore(lefthook): add CI-style path filtering to hooks (#2211)
  feat(cli): manage repository protection rules (#2193)
  feat(cli): filter archived instances from --template roster resolution (#2207)
  chore(release): release Buzz Desktop version 0.4.21 (#2209)
  fix(desktop): clarify data deletion action (#2208)
  feat: brand authentication complete page (#2192)
  fix(buzz-acp,buzz-agent): surface stall duration and fate (#2204)
  fix(desktop): resolve activity feed showing channel UUID instead of message content (#2201)
  feat(cli): add agents archive/unarchive/archived subcommands (#2173)
  chore(acp): strip stale finding-number references from comments (#2202)
  chore(release): release Buzz Mobile version 0.4.9 (#2200)
  Simplify first-community onboarding choices (UI only) (#2194)
  fix(mobile): sanitize Android image uploads (#2188)
  fix(cli): paginate channel directory queries (#2181)

Semantic resolutions in crates/buzz-acp/src/lib.rs:
- kept lazy_pool startup + pool_ready select guard from this branch,
  adopted main's comment cleanup (#2202)
- dropped this branch's duplicated steer_renewal_tests module: #2204 moved
  those tests to queue.rs on main

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant