You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/apply-streamed-markdown.concurrent.test.ts
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -183,24 +183,32 @@ describe('two-writer: peer edits while the agent streams', () => {
183
183
// peer survival here is CRDT-dependent — reported above, not hard-asserted.
184
184
})
185
185
186
-
it('FULL REWRITE: agent replaces the whole doc while the peer edits the middle — no duplication',()=>{
186
+
it('FULL REWRITE: peer edits original content that the agent then deletes in a full rewrite',()=>{
187
187
const{ A, B }=seededPair('# Title\n\nAlpha\n\nBeta\n\nGamma')
188
188
constsession=beginAgentStream(A.editor)!
189
189
190
+
// Peer edits Beta WHILE it still exists — genuinely concurrent with the impending rewrite.
191
+
// (Asserting the insert landed guards against a false-green where the target was already gone.)
0 commit comments