You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show differences (added/removed/changed text) when checking past versions #599
Is your feature request related to a problem? Please describe.
Right now, it's possible to view older versions of a page and revert to them; however, it's impossible to see what is different in those versions compared to each other or to the latest (current) version.
Describe the solution you'd like
There should be a way to compare any two versions of the file between each-other, as well as any version to the current one. The UI can look like Wordpress, Confluence or any other similar implementation.
Describe alternatives you've considered
A poor kludge exists currently by using the "show author colors" option, but it's not nearly enough and doesn't show subsequent changes by the same author.
Additional context
Any Wiki with versioning system requires this functionality, as it is essential for teams working together on a document (in Word/LibreOffice and similar tools, it's called "Tracked Changes").
Implemented. Collectives can now compare any two page versions, or a version against the current content, and shows exactly what changed: grouped by section, in the original rendered documents, or as literal Markdown source. Comparisons are shareable: a link pins two exact revisions and always shows the same pair, even after the page is edited or renamed.
The views
Changes (default): records grouped under the section heading they happened in, labelled by kind, each with its own before/after preview. A hide-formatting-only filter is available.
Full documents: both originals, read-only, highlighted at the reported positions, with paired navigation and independent scrolling. Wide, side-by-side, or Before/After tabs on narrow screens.
Markdown source: the literal text for everything a rendered view cannot show (line-ending changes, trailing whitespace, a missing final newline, rewritten link syntax). Runs in a cancellable worker with explicit limits.
Shareable links: compareFrom / compareTo pin two exact revisions. The pair survives reload, Back, Forward, copy and rename. A missing version fails explicitly instead of being silently swapped for a neighbour.
Each PR is one review unit, one commit, on its predecessor's branch, so every diff shows only its own change. Release order: Text 1-4 together, then Collectives 5 and 6.
Compatibility. Text capability is detected at runtime (a factory function check, not a version pin). Where it is missing, Collectives falls back to the stock Viewer compare() path unchanged, on Nextcloud 34 and wherever the Text factory is absent. On mobile the dialog refuses explicitly instead of showing one pane as a comparison. No Viewer change involved.
Correctness boundaries
Both editors share one ProseMirror schema instance; node types compare by identity. A second schema would give a wrong result, not a slow one.
Move detection is conservative: only exact moves are reported, anything ambiguous becomes remove + insert.
Attributes and formatting stay separate, so hiding formatting-only changes never hides a changed link target.
The semantic model reports a bounded result with an explicit limit, never a silent partial list.
Rendered comparison rejects input lines above 20,000 characters; literal source stops at a safe per-line display boundary.
The source worker enforces three limits (2,000,000 characters, 50,000 edits, 2,000 ms) and always reports itself as limited.
Comparison URLs validate their parameters; a missing version stays in the selector with a Retry action.
Verification
Text: focused Vitest 28/28; production Playwright 71/71 (zero retries/skips); full Vitest 1,760/1,761 (only the unchanged SyncService baseline); type check, lint and build pass (lint reports jsdoc warnings the repo config does not fail on).
Activity
max-nextcloud commentedon Oct 11, 2023
Working on a first iteration of this in nextcloud/text#4720
hweihwang commentedon Aug 14, 2026
Implemented. Collectives can now compare any two page versions, or a version against the current content, and shows exactly what changed: grouped by section, in the original rendered documents, or as literal Markdown source. Comparisons are shareable: a link pins two exact revisions and always shows the same pair, even after the page is edited or renamed.
The views
Demo (4K, 24 s): https://raw.githubusercontent.com/hweihwang/collectives/demo-assets/collectives-599/2026-09-final/featured/collectives-compare-versions-4k.mp4
The six PRs, in dependency order
Each PR is one review unit, one commit, on its predecessor's branch, so every diff shows only its own change. Release order: Text 1-4 together, then Collectives 5 and 6.
Compatibility. Text capability is detected at runtime (a factory function check, not a version pin). Where it is missing, Collectives falls back to the stock Viewer compare() path unchanged, on Nextcloud 34 and wherever the Text factory is absent. On mobile the dialog refuses explicitly instead of showing one pane as a comparison. No Viewer change involved.
Correctness boundaries
Verification
Full gallery
Walkthrough (3:49): https://raw.githubusercontent.com/hweihwang/collectives/demo-assets/collectives-599/2026-09-final/full-gallery/collectives-compare-versions-walkthrough.mp4
mejo- commentedon Sep 8, 2026
This is implemented now thanks to the work by @hweihwang ❤️