Skip to content

Forum posts and comments cannot be edited: Desktop discards the kind:40003 edits the relay already accepts #6433

Description

@Nautiqs

What's missing

There is no way to edit a forum post (kind:45001) or a forum comment (kind:45003) in Buzz.
Forum cards expose a Delete action and nothing else, so the only way to fix a typo in a
long-form post is to delete it and repost, which loses the event id that every reply,
reaction and mention already points at.

This is not a relay limitation. The relay already accepts and stores the edit. Desktop
fetches it and then throws it away.

Evidence: the relay accepts it today

Measured on a private, ephemeral forum channel:

Event Kind Result
2d65a211c38e1f5bb9c552d6a68ded90f6ecd1b8b84236da8ab21a86d439484a 45001 post created
e85cda57c2d7271c9a856f9b08c306781524263b735f90f8e3bd2fcd93f03b76 40003 edit of the post, e tag -> the 45001, accepted and stored
e68aa989f4dd272a9f18bf31f5368326692d31af0187f89a28a86514497b6ebc 45003 comment created
b1efa0248076c7acfba690efd158075a659eb97ea91bae8fbed32fedbf55eea2 40003 edit of the comment, accepted and stored

After both edits, reading the 45001 still returns the original content.

Why it works at the write layer

validate_edit_ownership (crates/buzz-relay/src/handlers/ingest.rs:920) checks only that
the signer is the target's effective author (or the owning human of the authoring agent) and
that the target lives in the same channel. It never inspects the target's kind. Compare
validate_forum_vote_target in the same file (:1001), which explicitly requires
KIND_FORUM_POST or KIND_FORUM_COMMENT at :1034. The edit validator has no equivalent
gate, so a 40003 aimed at a 45001 is valid by construction.

build_edit (crates/buzz-sdk/src/builders.rs:389) is likewise kind-agnostic on the target.

Where it stops

  1. desktop/src-tauri/src/commands/messages/forum.rs does query kind:40003 events for the
    rows it returns (:183, :238), but only to compute link-preview suppression (:122).
    The edit's content is never applied to the message.
  2. get_forum_thread (forum.rs:253) explicitly filters kind:40003 out of the reply list.
  3. No edit affordance exists in the UI. ForumPostCard.tsx:113 and ForumThreadPanel.tsx:107
    and :254 render DeleteActionMenu and nothing else.

Note that the data is already delivered: the CLI thread filter
(crates/buzz-cli/src/commands/messages.rs:439) lists 40003 among the reply kinds, and the
edit event does come back alongside the root. This is a folding gap, not a fetching gap.

Why it matters

Forum channels are the long-form surface (VISION.md:19, :28). Long-form is exactly where
a post is a living document: correcting a spec, fixing a broken link, adding acceptance
criteria after discussion. Chat messages (kind:9) can be edited; the surface built for text
that people actually revise cannot.

Repost-and-delete is not equivalent. It breaks every e tag pointing at the old id: replies
are orphaned, reactions are lost, and any agent that stored the id now references a tombstone.

Suggested fix

Client-side only. No relay change, no new event kind, no spec change.

  1. Fold kind:40003 content onto the target in forum_message_from_event, the same way the
    chat path already folds edits, and stop discarding 40003 at forum.rs:253.
  2. Add an Edit action beside Delete in DeleteActionMenu (or a shared post-action menu) for
    posts and comments the current identity authored.
  3. Render the usual "edited" marker for parity with chat.

Related

Environment

Read against main at commit cd0d33f0, ahead of desktop-v0.5.17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions