feat(client): readable diffs in the proposal + activity cards #363

Closed
opened 2026-06-29 13:19:11 +00:00 by james · 0 comments
Owner

The chat confirmation card (#346) and the activity undo card (#356) render a proposed change's diff as raw pretty-printed JSON (renderDiff). Replace that with a readable, human field-level diff.

Scope

  • A shared diff renderer that understands the ProposedChange.diff shapes (per ADR-0030: create → { after }; update → { fields: { k: { old, new } } }; delete → { before }; merge → both sources + survivor) and renders them as labeled before→after rows rather than a JSON blob.
  • Use it in both the chat ProposalCard and the activity confirmation card (extract the shared component while we're at it — they currently duplicate renderDiff + destructive styling).
  • DS tokens + Carol's voice; entity/field names localized where practical (or humanized fallback like the activity entity nouns).
  • Pure render-logic where possible so it's node-testable; visual polish verified by the maintainer.

Out of scope

  • Rich semantic diffs of long text bodies (a simple old→new is fine for v1).

Part of epic #47 (polish on the write-confirmation surface).

The chat confirmation card (#346) and the activity undo card (#356) render a proposed change's `diff` as raw pretty-printed JSON (`renderDiff`). Replace that with a readable, human field-level diff. ## Scope - A shared diff renderer that understands the `ProposedChange.diff` shapes (per ADR-0030: create → `{ after }`; update → `{ fields: { k: { old, new } } }`; delete → `{ before }`; merge → both sources + survivor) and renders them as labeled before→after rows rather than a JSON blob. - Use it in both the chat `ProposalCard` and the activity confirmation card (extract the shared component while we're at it — they currently duplicate `renderDiff` + destructive styling). - DS tokens + Carol's voice; entity/field names localized where practical (or humanized fallback like the activity entity nouns). - Pure render-logic where possible so it's node-testable; visual polish verified by the maintainer. ## Out of scope - Rich semantic diffs of long text bodies (a simple old→new is fine for v1). Part of epic #47 (polish on the write-confirmation surface).
james closed this issue 2026-06-29 13:51:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/carol#363
No description provided.