Skip to content

Show the revision history, what changed since the last visit and who changed a line - #187

Merged
markusressel merged 5 commits into
masterfrom
feature/history
Nov 14, 2026
Merged

markusressel merged 5 commits into
masterfrom
feature/history

Conversation

@markusressel

Copy link
Copy Markdown
Member

Do not merge before the device test. haad-64 merges after Markus has tested it on his phone against production (backend b7dd3ae).

Brings the history work of #183–#186 to master:

  • History: editor menu → History. Who changed the page and when, agents shown as "Bob via Claude Code", the changed sections, and an inline diff with the changed words marked. Editors can restore a version or undo a single change.
  • Changes since the last visit: opening a page shows a banner when others changed it, with the changes hunk by hunk.
  • Each part only shows when server-info lists history, changes and revert.

Device test (Markus, on the phone, production wiki)

Install the debug APK from the apk-files artifact of this PR's CI run. It updates the Obtainium debug app in place, and Obtainium keeps updating normally afterwards.

  1. Open a page you edited before → menu (⋮) → History. The list shows names, times and changed sections, and an agent's edits show a robot and "via ".
  2. Tap an entry → the diff shows; changed words are marked. Tap Open on a block → the editor goes to that place.
  3. On a test page: Undo this change on an older entry → "Change undone", and a new "Revert …" entry on top. Check the page text.
  4. Same test page: Restore this version → "Version restored", and the text matches that version.
  5. Have someone (or the web client in another account) change a page you looked at before. Reopen it on the phone → a banner reads "Changed by … since you were here". Tap it → the changes show. Leave and reopen → the banner is gone.
  6. Reading only: as a reader, or offline, nothing breaks, and undo and restore are hidden for readers.

Use a test page for 3 and 4; both show up as normal edits in the history and can be undone.

🤖 Generated with Claude Code

markusressel and others added 4 commits November 14, 2026 03:51
Models follow a real backend answer: authors who are not accounts come
with empty strings, and times carry the committer's offset.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The editor menu opens the history: who changed the page and when, with
agents and the changed headings. An entry opens to the inline diff of its
commit with the changed words marked, a hunk opens the editor there, and
editors can restore an older version.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Tell what changed in a page since the last visit

On opening a page, a banner names who changed it since the account last
looked and where; it opens the changes hunk by hunk, and a hunk goes to its
place in the page. The server keeps the seen mark, set with the token of
the shown answer and again on leaving, so the own edits are no news later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix what the emulator test against a real backend found

- The changes since the last visit were asked for inside a state update,
  which runs again when the state changed meanwhile: each run marked the
  page seen, so the shown answer was always empty. Leaving the page no
  longer marks it on ON_STOP either, which the screen gets while opening.
- The account itself is left out of the names of the banner.
- In the history an agent goes with its own person: "Bob via Claude Code,
  Anna" instead of "Bob, Anna via Claude Code".
- Lines with little in common get no word marks.
- A commit time a little ahead of the device clock reads as now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Editors on a server with revert get "Undo this change" on every entry but
the first version. Later changes stay; a conflict names the sections where
they are in the way. The history menu entry and the changes since the last
visit only show on servers that have them, read from server-info features.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…188)

* Restore a single section from the history

A hunk under a heading of an older version offers to restore that section,
on servers with blame (which covers section restore), like the web client.
A section missing in the version or in the page is said in words. Adds the
REST client for blame as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tell who last changed a line and when

A tap on the author strip, or on the line numbers next to it, asks the
server's blame and shows the author of the lines around it, their agents,
the time and the message of the change, with a way into the history.
Lines not committed yet say so instead of a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@markusressel markusressel changed the title Show the revision history and what changed since the last visit Show the revision history, what changed since the last visit and who changed a line Nov 14, 2026
@markusressel
markusressel merged commit a03e53c into master Nov 14, 2026
3 checks passed
@markusressel
markusressel deleted the feature/history branch November 14, 2026 11:07
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