Add page version history, restore and watch commands#2
Merged
Conversation
Implements tier 2 of the practical-coverage roadmap. Version history — `page history` lists a page's versions; `page restore --version N` rolls a page back. Restore has no native v1 endpoint, so it fetches version N's body and republishes it as a new version via the existing buildUpdatePage machinery — non-destructive, the history is kept. `restore` supports `--dry-run`. Watchers — `page watch` / `page unwatch` subscribe or unsubscribe the authenticated user (the v1 user-watch endpoints act on the credentialed user, so no current-user resolution is needed); `page watch-status` reports whether you watch a page. `watch` / `unwatch` support `--dry-run`. Each write op exposes a build* helper shared with `DescribeWrite`, keeping the --dry-run preview in lock-step with the sent request. Regenerates the CLI reference and updates the embedded confluence Skill. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Tier 2 of the practical-coverage roadmap — page history/restore and watchers.
Version history
page history <page>— list a page's versions (newest first)page restore <page> --version N [--message ...]— roll a page backRestore has no native v1 endpoint, so it fetches version N's body and
republishes it as a new version through the existing
buildUpdatePagemachinery — non-destructive, the history is kept. Supports
--dry-run.Watchers (self)
page watch/page unwatch— subscribe / unsubscribe the authenticated userpage watch-status— report whether you watch the pageThe v1
/user/watch/content/{id}endpoints act on the credentialed user whenno user is passed, so no current-user resolution is needed.
watch/unwatchsupport
--dry-run. Listing all watchers of a page was deliberately left out— v1 has no reliable public endpoint for it.
Design notes
build*helper shared withDescribeWrite, so the--dry-runpreview matches the sent request.Verification
gofmt/go vet/go test ./...all green; new tests cover the apiclientmethods (history list, restore's GET-then-PUT, watch GET/POST/DELETE, dry-run
plans) and the CLI commands.
make docsregenerated; generator is idempotent.--dry-runsmoke tests for restore / watch / unwatch.httptest-based unit tests.Roadmap tier 3 (page restrictions, space writes, comment edit/delete, whoami,
blogs, PDF export) remains a follow-up.
🤖 Generated with Claude Code