[ranges-tracker] add legacy orderedRejections field in tracked-changes (#36565)

* [docstore] use more realistic test stubs for ranges

* [monorepo] define ranges schemas in @overleaf/ranges-tracker

* [ranges-tracker] add legacy orderedRejections field in tracked-changes

* [monorepo] resolve @overleaf/ranges-tracker subpath imports in typescript

* [real-time] validate comment thread ids and tracked change id seeds

* [ranges-tracker] require ObjectId ids and tracked change metadata in ranges

* [monorepo] require ObjectId tracked change ids on the accept routes

* [web] use ObjectId comment thread ids in the DocumentController tests

GitOrigin-RevId: 58b20dec311d85b917ef63f9efbe745a265a2de6
This commit is contained in:
Jakob Ackermann
2026-09-17 12:01:19 +00:00
committed by Copybot
parent 833e44d142
commit 4e80d65efc
23 changed files with 501 additions and 383 deletions
@@ -1,36 +0,0 @@
const { expect } = require('chai')
const { insertOp, deleteOp } = require('../../../app/js/schemas')
describe('schemas', function () {
describe('insertOp', function () {
it('accepts a legacy fixedRemoveChange flag', function () {
const result = insertOp.safeParse({
i: 'foo',
p: 0,
fixedRemoveChange: true,
})
expect(result.success).to.equal(true)
})
it('rejects an unrecognized key', function () {
const result = insertOp.safeParse({ i: 'foo', p: 0, somethingElse: true })
expect(result.success).to.equal(false)
})
})
describe('deleteOp', function () {
it('accepts a legacy fixedRemoveChange flag', function () {
const result = deleteOp.safeParse({
d: 'foo',
p: 0,
fixedRemoveChange: true,
})
expect(result.success).to.equal(true)
})
it('rejects an unrecognized key', function () {
const result = deleteOp.safeParse({ d: 'foo', p: 0, somethingElse: true })
expect(result.success).to.equal(false)
})
})
})