[clsi] address zod violations (#36199)

* [editor-core] gracefully handle no-op TextOperation

* [web] avoid sending sync to pdf requests without a ?file

* [validation-tools] log deeper nested violations

* [editor-core] fix round trip of EditNoOperation

* [web] use custom error for sync to pdf w/o file, fix tests

* [validation-tools] include request params in log msg for violation

* Revert "[editor-core] gracefully handle no-op TextOperation"

This reverts commit c1d37261d5db72b37dbf39428c54edcfb5423f41.

* [web] gracefully handle rejected sync to pdf from context menu

GitOrigin-RevId: 21de7dc96b23575b0d67b6eb0c68ed9c2f86292b
This commit is contained in:
Jakob Ackermann
2026-09-17 11:48:12 +00:00
committed by Copybot
parent 761d4efc1f
commit 731ed50f78
14 changed files with 254 additions and 16 deletions
@@ -35,7 +35,8 @@ class Operation {
if (
'textOperation' in raw ||
'commentId' in raw ||
'deleteComment' in raw
'deleteComment' in raw ||
'noOp' in raw
) {
return EditFileOperation.fromRaw(raw)
}
@@ -78,4 +78,18 @@ describe('EditFileOperation', function () {
expect(editFileOperation1).to.deep.equal(edit('foo.tex', ['x']))
})
})
describe('fromRaw / toRaw', function () {
it('round-trips an edit no-op', function () {
const editFileOperation = Operation.editFile(
'foo.tex',
EditOperationBuilder.fromJSON({ noOp: true })
)
const raw = editFileOperation.toRaw()
expect(raw).to.eql({ pathname: 'foo.tex', noOp: true })
const roundTripped = Operation.fromRaw(raw)
expect(roundTripped).to.deep.equal(editFileOperation)
})
})
})