feat(buzz): honor reply_in_thread so replies can land flat in the channel - #74985
ChrisMena87 wants to merge 1 commit into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating this to the Buzz adapter; current main does pass ctx.event_message_id into the stream consumer (gateway/run.py:4192), and Buzz currently turns that target into --reply-to (plugins/platforms/buzz/adapter.py:587-590), so the premise is confirmed.
Problems
- The new placement behavior is untested.
tests/gateway/test_buzz_adapter.py:119-143already covers adapter config precedence and:387-423records send arguments, but this PR adds no assertions for config false, the true default,BUZZ_REPLY_IN_THREADprecedence, or the local-image branch changed atplugins/platforms/buzz/adapter.py:677. - The user-facing setting is undocumented:
website/docs/user-guide/messaging/buzz.md:19-58covers the canonical config and env-variable paths, andwebsite/docs/reference/environment-variables.md:694-708lists Buzz variables.
Suggested changes
- Add focused adapter tests for text and local-image sends, including default/config/env precedence.
- Document
gateway.platforms.buzz.extra.reply_in_thread; if keeping the env override, documentBUZZ_REPLY_IN_THREADtoo.
Automated hermes-sweeper review.
| return SendResult(success=False, error="Empty message") | ||
| args = ["messages", "send", "--channel", str(chat_id), "--content", "-"] | ||
| reply_target = reply_to or (metadata or {}).get("thread_id") | ||
| if not self.reply_in_thread: |
There was a problem hiding this comment.
Please add adapter tests for the false setting, the true default, and BUZZ_REPLY_IN_THREAD precedence. tests/gateway/test_buzz_adapter.py already has config-precedence and recorded-CLI-argument patterns that can assert omission or retention of --reply-to on this exact egress path.
|
Closing as implemented on main via #99429: extra.reply_in_thread: false / BUZZ_REPLY_IN_THREAD now map to reply_to_mode='off' and gate --reply-to on ALL send paths including cron standalone — a superset of this PR's send/send_image gate, same config key and env var (commit 972f031). You proposed this mechanism first; thanks for pioneering the flat-reply opt-out. |
Problem
Every Hermes reply on Buzz lands in a collapsed Thread pane instead of in the channel, which breaks the flow of the conversation for the human reading it.
The cause isn't Buzz's UI — it's that we always ask for a thread.
gateway/run.pybuilds the stream consumer withwith no platform condition, so every reply is anchored to the message that triggered it. The Buzz adapter turns that anchor into
--reply-to, and Buzz correctly renders a threaded reply as a thread. On platforms where a reply-anchor is just a quote this is invisible; on Buzz it means the answer is one click away, every single time.There is a
reply_in_threadkey already accepted per-platform ingateway/config.py(bridged into the platform config alongsidereply_prefix,require_mention, etc.), but only the relay/Slack lane reads it —gateway/relay/adapter.py::_effective_reply_in_thread. Settingreply_in_thread: falseunderplatforms.buzztoday is a silent no-op: the config validates, nothing changes.Change
Wire the existing key up in the Buzz adapter, following the same pattern
require_mentionalready uses in this file (env var >extra> default):BUZZ_REPLY_IN_THREADoverrides config.yaml, same asBUZZ_REQUIRE_MENTION.Honored in both outbound paths —
send()andsend_image().Default stays
True, so existing behavior is unchanged for everyone who doesn't set it.Verification
Tested against a hosted community relay (
*.communities.buzz.xyz), Hermes 0.19.0:reply_in_thread: false, the CLI invocation is['messages', 'send', '--channel', '<id>', '--content', '-']— no--reply-to, and replies appear in the channel.--reply-tois still passed, so threading is preserved.Notes
gateway/run.pyis left alone, since other platforms rely on it.website/docs/user-guide/messaging/buzz.mdif you'd like the key documented in the same PR.