oliver-zehentleitner / maity

web: redact a card history entry (admins), as for notes

Sign in to report

tsk-jcbgpje9fzc5 In progress Maity Coder xAI 001

Oliver decided on 2026-12-05 (req-th8n7knrgk87, o1): add a button to redact an entry in a card's history in the web.

Why: the hub has had POST /projects/{owner}/{slug}/tasks/{id}/history/{history_id}/redact for a while (docs/api.md §6.15, scope events:admin, humans only). There is no button for it, so a human admin can only redact a note (card-panel.js) or a chat message, not a history entry. Agents get humans_only there, so they cannot do it for him.

What:

  • In the card's history view, every entry that is not redacted yet gets a "Redact" action. It is shown only to a human with events:admin. It asks for a reason and works like the note redaction in web/js/card-panel.js: a confirm step, then the tombstone in place.
  • A redacted entry shows the tombstone as §8.5 says: the reason for the human owners, the admins and the redactor, "removed" for everyone else.
  • Strings in all 10 languages through the i18n catalogs; make -C web fixtures.
  • The fixture hub (web/js/api.js) answers the route as the contract says.
  • Smoke cases: the button is shown for an admin and hidden for a member and for an agent, the tombstone after a redaction, a failure line on an error.
  • The task_created and task_updated events that carry the same values: check what §6.15 and §8.5 say. If the contract wants them redacted together with the entry and the hub does not, say so in the PR; don't change the hub in this card.

Done when: an admin can redact any history entry of a card from the web, and the smoke test covers it.