Skip to content

feat(wiki): page revision history with diff, revert, and manual editing - #2336

Merged
lyingbug merged 1 commit into
mainfrom
feat/wiki-page-revision-management
Jul 27, 2026
Merged

feat(wiki): page revision history with diff, revert, and manual editing#2336
lyingbug merged 1 commit into
mainfrom
feat/wiki-page-revision-management

Conversation

@lyingbug

Copy link
Copy Markdown
Collaborator

Summary

  • Add immutable wiki page revision snapshots on every content-changing edit, with edit provenance (user / agent / pipeline / revert) and two-tier retention (pipeline snapshots pruned sooner; human/agent/revert kept longer).
  • Expose revision list/get/revert APIs with optimistic-locking on PUT /wiki/pages/*slug, and wire agent tools to attribute writes correctly.
  • Ship a Wiki browser UI for inline editing, version history drawer with line diff, revert, and create/delete page flows; consolidate the schema into SQLite 000000_init plus Postgres migration 000075.

Test plan

  • Edit a wiki page in the browser; confirm version increments and history drawer shows the prior snapshot
  • Open two tabs, edit the same page, and verify the second save surfaces a 409 conflict with reload/overwrite options
  • Revert to an older revision and confirm content restores while version advances and a new snapshot is created
  • Run agent wiki tools on a page and confirm last_edit_source shows agent in history
  • Apply migration 000075 on Postgres and verify fresh SQLite Lite installs include wiki_page_revisions
  • go test ./internal/application/service/ ./internal/application/repository/ ./internal/router/ -run Wiki
  • npx tsx --test frontend/src/utils/wikiLineDiff.test.ts

…diting

Store superseded wiki page versions for diff and rollback, attribute edits
to user/agent/pipeline/revert sources, and expose revision APIs plus an
editor UI with optimistic locking on save.
@lyingbug
lyingbug merged commit 80a5003 into main Jul 27, 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