Skip to content

fix(acp): keep all direct-message replies flat - #4240

Open
kerpopule wants to merge 1 commit into
block:mainfrom
kerpopule:fix/flat-dm-agent-replies
Open

fix(acp): keep all direct-message replies flat#4240
kerpopule wants to merge 1 commit into
block:mainfrom
kerpopule:fix/flat-dm-agent-replies

Conversation

@kerpopule

Copy link
Copy Markdown

Summary

Keep managed-agent direct messages as a normal flat conversation. Every ordinary DM response is sent at the channel top level, even when the incoming DM carries legacy thread tags. Human-facing channel replies retain their existing thread-root behavior.

This intentionally applies the flat behavior more broadly than #3077. It resolves the top-level case in #3075 and removes the compounding nested-DM behavior described in #2748 by eliminating DM reply anchors rather than moving them to a root.

Implementation

  • Add a DM-specific prompt instruction that forbids --reply-to for both top-level and previously threaded DM events.
  • Remove DM reply-anchor generation while leaving non-DM anchor resolution unchanged.
  • Align the shared base prompt with the flat-DM contract.
  • Cover top-level DMs, legacy threaded DMs, and the shared prompt contract with regression tests.

Verification

  • cargo fmt --all -- --check
  • env -u BUZZ_ACP_LAZY_POOL cargo test -p buzz-acp: 662 unit tests and 9 integration tests passed
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • Existing channel-thread anchoring tests pass

just ci reached the mobile suite, where the unrelated ChannelDetailPage keeps follow mode off while a tall newest message stays visible test failed. This change does not touch mobile code.

Fixes #3075.
Addresses #2748 with the product behavior requested here: no threads in direct messages.

Co-authored-by: Steve Darlow <kerpopule@users.noreply.github.com>
Signed-off-by: Steve Darlow <kerpopule@users.noreply.github.com>

@alithia-dev alithia-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently verified this against current main (Buzz Desktop 0.5.5 source). The DM regression tests pass for both top-level messages and incoming messages that already carry thread tags, and the existing human-facing channel/thread tests still anchor replies to the root rather than the latest child. cargo fmt --all -- --check and cargo clippy -p buzz-acp --all-targets -- -D warnings pass. The full Windows run reached 659/670; the remaining 11 ACP subprocess/timing tests fail identically on unmodified main, so they are unrelated to this diff. This is the correct transport contract: flat DMs, root-relative channel/forum replies.

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.

buzz-acp: a top-level DM is answered in a thread, not inline — the DM branch supplies no reply destination

2 participants