Faster review panels, page breaks at the cursor, and reviewer roles
Load tracked changes for the paragraphs on screen, insert page breaks at the cursor, and enforce reviewer roles.

SuperDoc 2.34.0 adds three things for apps built around document review: a review panel that stays fast on long documents, a page-break button that works where the cursor is, and reviewer roles your collaboration server enforces.
Keep a review panel fast on long documents
A review sidebar shows the tracked changes next to the text on screen. Until now it had to load every change in the document to do that, which gets slow on a long contract with thousands of changes. Now it can ask only for the changes in the paragraphs it shows:
const result = await superdoc.activeEditor.doc.trackChanges.list({
blockIds: [paragraphId],
});Pass the IDs of the visible paragraphs; an empty list returns no changes. The option works in the browser editor
only: it isn't in the published trackChanges.list schema yet, so SDK and CLI callers that validate against it may
reject it. See List and inspect changes.
Insert a page break where the cursor is
A custom "Insert page break" button used to add the break at the end of the document. Now an insert of a single page
break with no target lands at the cursor, as a native Word page break (w:br w:type="page"):
const receipt = await superdoc.activeEditor.doc.insert({
content: { kind: 'break', break: { type: 'page' } },
});The break is tracked in suggesting mode, joins undo history, and appears for everyone in a shared document. It needs a mounted browser editor with a text cursor: a range selection, a table selection, or no cursor returns a failure. Other inserts without a target still append to the end. See Insert a native page break at the browser caret.
Let reviewers comment or suggest, but not edit
On a y-websocket server, you can now give someone a comment-only or suggest-only role that holds even if their editor
is modified. The roles cover new comments on a range and single-line plain-text suggested insertions; replies,
suggested deletions, and other review actions fall outside them and are denied. Other servers, including the
Hocuspocus template, need the same check. The new superdoc/collaboration-validation entry point (Node.js ESM) runs it:
import { classifyUpdate } from 'superdoc/collaboration-validation';
function shouldApply(update: Uint8Array) {
const decision = classifyUpdate({ accepted: roomDoc, update, roomName });
if (decision.kind === 'noop') return false;
return (
(decision.kind === 'comment' && permissions.canComment) ||
(decision.kind === 'suggestion' && permissions.canSuggest) ||
(decision.kind === 'edit' && permissions.canEdit) ||
(decision.kind === 'attribution' && permissions.canWriteRoom)
);
}classifyUpdate compares a raw Yjs V1 update with the room's accepted Y.Doc without applying it and returns
comment, suggestion, edit, attribution, noop, invalid, unverifiable, or unsupported. Reject the last
three and drop noop. Admit attribution from anyone allowed to write: the editor sends one after a burst of edits,
and rejecting it makes their next update unverifiable. See
Gate y-websocket updates by operation for room requirements.
Changed
- Review: listing tracked changes and accepting or rejecting one change are faster on large documents. Review marks paint for visible pages without waiting for the review warm-up.
- History: undo and redo of many formatting changes stay incremental.
- Opening: documents with many formatted runs open faster, and documents without tracked changes skip review preparation.
- Saving: saving an unedited document preserves its original package.
Fixed
- Track changes: tracked formatting, comment replies, and selection anchors survive edits, save, and reopen. Pressing Enter inside a tracked insertion or deletion splits it the way Word does, keeping author, date, and a new revision ID.
- Lists: new list items get the List Paragraph style, and paragraphs with an empty
w:lvlOverrideare numbered as Word numbers them. Lists in headers, footers, footnotes, and endnotes lay out correctly. - Rendering: tracked table sizing and grids, grouped header pictures, and inline EMF images render as Word lays them out.
- Memory: destroyed editors are released from module-level caches.
Document API compatibility
- Every mutation that can return a
CAPABILITY_UNAVAILABLEreceipt now lists it inpossibleFailureCodes. Clients that validate receipts against the published contract no longer reject real responses. - Tracked checkbox state changes and footnote configuration return
CAPABILITY_UNAVAILABLE. - Tracked section breaks relative to a paragraph return an unsupported-target receipt.
- Joining lists with incompatible numbering definitions requires explicit opt-in.