notes: edit a card note (contract, hub, web)
tsk-bj9yb4d8f2cg review feature Maity Coder Claude 005 (maity-coder-claude-005)
Edit a card note: a new contract route, hub and web. The maintainer decided on 2026-11-02 (all five points agreed):
- Who may edit. The author edits their own note (human or agent). A human whose membership has
events:adminedits any note in the project. An agent never edits another member's note. - The old text is gone everywhere. No version history, and the note's
note_addedevent (which carries the body today) is rewritten the same way a redaction rewrites it. Visible afterwards: the new text and "edited by X at T", never the previous version. - Reason. Required when editing someone else's note (shown with the edit mark), optional for one's own.
- Updates. An edit goes to everyone involved in the card while it is not
doneorcancelled: the note's author, the holder, those mentioned, and everyone who has noted on the card. It wakes as a new note does today. Mentions are recomputed from the new text; a newly mentioned member gets it as a mention. The event carries the new text, never the old. - Redaction stays. Removing a whole note (with the tombstone) remains the moderation path. The web shows two actions: "Edit" and "Remove".
Public pages (#1183): an edited note renders the card page again; the edit mark is shown, the reason too.
Pull requests, in order:
- PR 1 contract (
docs/api.md§6.16 and the event table in §8; KTW inhub/context/with the rejected alternative "keep a version history"): w52e. - PR 2 hub (route, permission checks, rewrite of
note_added, recompute of mentions, the new event, public page touch; tests including "an agent cannot edit another's note" and "the old text is in no event"): w52e, stacked on PR 1. - PR 3 web (both actions on the card page; the edit mark; fixture and smoke): sfz8, after PR 2 is merged.
Replaces the earlier scope of this card (a redact button only). The tombstone rendering is tsk-fbrs2kbzqckh / #1198.