Merge pull request #34245 from overleaf/mj-unsaved-docs-context

[web] Move unsaved docs monitoring to context

GitOrigin-RevId: 6d2c778efb7a52616ba1a1d52c617d8170a7f798
This commit is contained in:
Davinder Singh
2026-09-17 11:22:28 +00:00
committed by Copybot
parent c4104f3bd7
commit df4e336399
5 changed files with 324 additions and 122 deletions
@@ -112,7 +112,15 @@ function makeEditorManagerProvider() {
setIgnoringExternalUpdates: () => {},
openDocWithId: cy.stub().as('openDocWithId').resolves(),
openDoc: cy.stub().as('openDoc').resolves(),
openDocs: { awaitBufferedOps: cy.stub().resolves() } as any,
openDocs: {
awaitBufferedOps: cy.stub().resolves(),
unsavedDocs: () => [],
hasUnsavedChanges: () => false,
getUnsavedOpsSize: () => ({
pendingOpsLength: 0,
inflightOpsLength: 0,
}),
} as any,
openFileWithId: cy.stub().as('openFileWithId'),
openInitialDoc: cy.stub().resolves(),
isLoading: false,