Summary
In the Document API, some structural ops report capabilities().operations[op].tracked === true but, when invoked with { changeMode: 'tracked' }, apply the change directly and produce no tracked change — no redline, nothing for a reviewer to accept/reject, and no error. The tracked capability flag is therefore unreliable as a signal of whether an op will actually record a tracked change.
This is distinct from #3592 (ops that legitimately can't be tracked and are flagged tracked:false). Here the capability flag says true but tracking silently no-ops.
Reproduction (v1.38.0, programmatic, Suggesting mode)
const doc = editor.doc;
doc.capabilities().operations['tables.insertRow'].tracked; // => true
// before: table has 4 rows; trackChanges.list({}).items.length === 10
doc.tables.insertRow({ nodeId: '<tableNodeId>' }, { changeMode: 'tracked' });
// after: table has 5 rows (row WAS inserted)
// trackChanges.list({}).items.length === 10 (0 NEW tracked changes)
// no error thrown
Result observed: rowAdded: true, newTrackedChanges: 0, callResult: NO-THROW, with capability.tracked === true.
Expected
One of (in order of preference):
- The row insertion is recorded as a tracked change (Word records row insert/delete as reviewable revisions), or
- If structural row/column tracking isn't supported,
capabilities() reports tracked:false for these ops (so callers can branch correctly), or
- At minimum, calling a
tracked:false-in-reality op with changeMode:'tracked' errors consistently instead of silently applying directly.
Actual
tables.insertRow reports tracked:true, accepts changeMode:'tracked' without error, and applies directly with zero tracked changes.
Inconsistency across the surface (same version)
Calling with { changeMode: 'tracked' }, three different behaviors occur:
| op (example) |
capabilities().tracked |
behavior with changeMode:'tracked' |
format.apply (inline bold/color) |
true |
tracked — records a tracked change ✅ |
styles.paragraph.setStyle, format.paragraph.setAlignment |
false |
throws "... does not support tracked mode" |
tables.insertRow |
true |
silently applies directly, 0 tracked changes ❌ |
So a caller cannot rely on capabilities().tracked alone, nor on a consistent error contract, to decide how an op will behave under tracked mode.
Impact
For Document-API / AI-assisted review workflows, a tool that calls tables.insertRow (or other structural row/column ops) under tracked mode silently bypasses the review gate: the structural change lands with no redline and no way to accept/reject it, while the API reports the op as track-capable.
Environment
Summary
In the Document API, some structural ops report
capabilities().operations[op].tracked === truebut, when invoked with{ changeMode: 'tracked' }, apply the change directly and produce no tracked change — no redline, nothing for a reviewer to accept/reject, and no error. Thetrackedcapability flag is therefore unreliable as a signal of whether an op will actually record a tracked change.This is distinct from #3592 (ops that legitimately can't be tracked and are flagged
tracked:false). Here the capability flag saystruebut tracking silently no-ops.Reproduction (v1.38.0, programmatic, Suggesting mode)
Result observed:
rowAdded: true,newTrackedChanges: 0,callResult: NO-THROW, withcapability.tracked === true.Expected
One of (in order of preference):
capabilities()reportstracked:falsefor these ops (so callers can branch correctly), ortracked:false-in-reality op withchangeMode:'tracked'errors consistently instead of silently applying directly.Actual
tables.insertRowreportstracked:true, acceptschangeMode:'tracked'without error, and applies directly with zero tracked changes.Inconsistency across the surface (same version)
Calling with
{ changeMode: 'tracked' }, three different behaviors occur:capabilities().trackedchangeMode:'tracked'format.apply(inline bold/color)styles.paragraph.setStyle,format.paragraph.setAlignment"... does not support tracked mode"tables.insertRowSo a caller cannot rely on
capabilities().trackedalone, nor on a consistent error contract, to decide how an op will behave under tracked mode.Impact
For Document-API / AI-assisted review workflows, a tool that calls
tables.insertRow(or other structural row/column ops) under tracked mode silently bypasses the review gate: the structural change lands with no redline and no way to accept/reject it, while the API reports the op as track-capable.Environment
@harbour-enterprises/superdoc1.38.0.docx; body story;documentMode: 'suggesting'.tracked:falseside of this).