ZDDC/browse/css
ZDDC 9972e6773a feat(browse): markdown version-history viewer with diff + restore
Adds a "History…" context-menu item on markdown files in a history:true
subtree (server mode only — the audit is server-stamped). It opens a modal
that lists every saved version newest-first (timestamp + author + size,
current flagged), lets you View any version, Diff any two, and Restore one
(a forward PUT — non-destructive).

- shared/diff.js: dependency-free line/word LCS diff (window.zddc.diff),
  prefix/suffix trimming + a cell cap so large files don't stall the UI.
- browse/js/history.js: the modal (list / view / diff / restore), talking to
  GET <url>?history=1 and ?history=<sha>.
- loader.js carries the per-file history flag; events.js adds the menu item.
- Wired diff.js + history.js + history.css into browse/build.sh; diff.js into
  the zddc-test.html shim. tests/diff.spec.js covers the diff algorithm.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 12:49:00 -05:00
..
base.css refactor(browse): drop status-bar footer, route messages to toasts 2026-05-21 12:19:40 -05:00
history.css feat(browse): markdown version-history viewer with diff + restore 2026-05-28 12:49:00 -05:00
preview-yaml.css feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
tree.css fix(browse): YAML editor cut off at viewport bottom 2026-05-21 12:27:49 -05:00