Skip to content

OBJ-93 — Version history + diff + restore screens - #44

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-93-m84-version-history-diff-restore-screens
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-93-m84-version-history-diff-restore-screens

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Add /doc/:id/versions page: paginated list (10/page) of document versions with checkboxes to select two for diffing and a Restore button on non-current rows
  • Add /doc/:id/diff?from=N&to=M page: renders added (green), removed (red), and changed (side-by-side before/after) entries from the OBJ-79 diff API
  • Restore calls OBJ-80 endpoint, shows a CSS-only auto-dismissing toast (3s), and reloads the list with the new version at the top

Test plan

  • scripts/validate-obj-93.ps1 exits 0 (all API + DB + Playwright assertions pass)
  • Playwright: list → diff → restore → v4 at top (version-current-4 badge visible)
  • Playwright: pagination shows "Page 1 of 2" for 11 versions, Next navigates to v1
  • Playwright: diff view renders diff-changed-section with before/after columns
  • validation/obj-93-db.txt shows version_number=4, restored_from=1
  • validation/obj-93-api.txt shows all assertions PASS

Add /doc/:id/versions (paginated list, checkbox multi-select, restore button
with CSS toast) and /doc/:id/diff?from=N&to=M (added/removed/changed side-by-side).

Consumes OBJ-77 (list versions), OBJ-79 (diff), OBJ-80 (restore). Three
Playwright tests cover list → diff → restore → new version at top, pagination
(11 versions → 2 pages), and diff changed-entry rendering.
@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-93 M8.4 — Version history + diff + restore screens

Milestone: M8 · Wave: 3

Summary

Versions panel: list, pick two, view diff, restore. Calls the M4 endpoints.

Acceptance

  • Versions list paginated
  • Diff view renders added/removed/changed entries
  • Restore action shows the new version at the top

Validation

  • DB check: after restore from UI, document_versions shows the new entry with restoredFrom
  • Live API check: Playwright UI test exercises list → diff → restore → assert new version appears
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

@objectgyan
objectgyan merged commit e986f37 into main May 17, 2026
3 of 5 checks passed
objectgyan added a commit that referenced this pull request May 17, 2026
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.

1 participant