fix(cli): preserve attachments when editing messages (issue 3022) - #3062
Open
ijoukov wants to merge 1 commit into
Open
fix(cli): preserve attachments when editing messages (issue 3022)#3062ijoukov wants to merge 1 commit into
ijoukov wants to merge 1 commit into
Conversation
ijoukov
force-pushed
the
agent/preserve-cli-edit-attachments
branch
from
July 28, 2026 03:59
5d1ca9a to
a4580ac
Compare
ijoukov
marked this pull request as ready for review
July 28, 2026 04:01
Buzz edit events replace both message content and attachment metadata. Resolve the original message plus its latest kind 40003 edit so repeated CLI edits preserve the effective attachment state instead of resurrecting an older set. Carry forward the complete imeta set and the trailing Markdown references required for rendering. Preserve existing file labels and spoiler formatting, synthesize missing references when metadata and content have drifted, avoid duplicates, and retain --clear-attachments as the explicit destructive path. Add an SDK edit-builder variant for full attachment sets and regression coverage for preservation, clearing, replacement, deduplication, and the signed HTTP command payload. Fixes block#3022 Signed-off-by: Ivan Joukov <1191567+ijoukov@users.noreply.github.com>
ijoukov
force-pushed
the
agent/preserve-cli-edit-attachments
branch
from
August 2, 2026 02:38
a4580ac to
cde4b47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
buzz messages editso editing message text preserves the message’s effective attachment stateinstead of silently removing attachments.
Buzz edit events replace both content and attachment metadata. The CLI previously emitted kind
40003edits withoutimetatags or the Markdown references used to render attachments, causingexisting attachments to disappear.
This change:
40003edit before publishing another edit.imetaattachment set by default.--clear-attachmentsas the explicit way to remove attachments.The SDK’s existing edit builder remains unchanged; a new builder variant accepts the complete
attachment set.
Related issue
Fixes #3022
Testing
Automated:
cargo test -p buzz-sdk -p buzz-cli— 524 tests passedcargo clippy -p buzz-sdk -p buzz-cli --all-targets -- -D warningscargo fmt -p buzz-sdk -p buzz-cligit diff --checkFunctional Docker smoke test using Postgres, Redis, MinIO, and a locally running relay:
--clear-attachmentsand verified attachments were removed.The full
just cigate was not completed locally because this Linux environment lacks the GTK/WebKitsystem libraries required by the desktop Tauri checks. The affected CLI and SDK checks above pass.