Skip to content

docs(ui): record the History & Versions diff-rendering decision#246

Open
angela-helios wants to merge 1 commit into
mainfrom
docs/236-history-diff-decision
Open

docs(ui): record the History & Versions diff-rendering decision#246
angela-helios wants to merge 1 commit into
mainfrom
docs/236-history-diff-decision

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

Closes #236. The research issue asked for "a decision recorded here (and ideally an ADR or a short section in docs/ui-requirements.md)" — this is that record, as a standing doc in docs/ (the ui-requirements doc lives on an unmerged branch, so the decision gets its own file the same way docs/search-conformance-plan.md does).

Contents: the adopted two-layer server-side approach (json_patch::diff semantic view — zero new deps, the inverse of the existing PATCH interaction — plus similar with word-level inline highlighting rendered through Askama, no JS runtime), the executed spike output characterizing RFC 6902 array churn on a front-inserted name[] element, and the recorded decisions on metadata-noise filtering, version selection, where the diff is computed, and deleted-version rendering. Alternatives table and full discussion stay in the issue.

Implementation is tracked by the History & Versions screen work, not this issue.

Two server-side layers rendered through Askama with htmx fragment
swaps: json_patch::diff (already a dependency; the inverse of the
PATCH interaction) for the semantic field-level view, and similar
(inline feature, added at implementation time) for the word-level
textual view. Client-side diff libraries rejected: they break the
no-CDN and JS-off baselines.

Includes the spike output characterizing RFC 6902 array churn on a
front-inserted name[] element (six-op cascade, accepted for v1), and
the decisions on metadata noise filtering, version selection, where
the diff is computed, and deleted-version rendering.
@smunini

smunini commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Can you implement a prototype and we can evaluate from there.

@smunini smunini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a prototype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research: htmx-friendly diff rendering for the History & Versions view

2 participants