Operating system
macOS (automated regression test)
Orca version
1.4.197, main at fe4237c
Details
With autosave off, Save and Close can delete edits made while the file write is pending. The dialog dismisses before the write finishes, so the editor remains usable. The save queue preserves newer text as a dirty draft, but the close handler then closes the tab unconditionally and deletes that draft.
Trigger:
- Disable autosave, edit a file, and close its tab.
- Choose Save in the confirmation dialog.
- While the write is pending, type more text or delete the file's contents. A slow SSH write makes this window easier to hit.
- Let the earlier write finish. The tab closes with only the earlier text saved, and the newer draft is gone.
Expected: save the newer edits too, or keep the tab and draft open for another save decision.
I reproduced this with the real autosave controller, save queue, and editor store, deferring the filesystem bridge write. The regression test also covers edits still buffered by the rich editor's flush callback. All three cases fail because the tab closes. Normal save-and-close and write-failure cases pass. This is automated source-level reproduction, not a live SSH UI test.
The unconditional close is in editor-autosave-controller.ts.
Related but different: #1237 covered a missing save prompt; #18376 fixes a save-quiesce request that never settles. This race happens after the user accepts the save prompt and the write completes successfully.
Operating system
macOS (automated regression test)
Orca version
1.4.197, main at fe4237c
Details
With autosave off, Save and Close can delete edits made while the file write is pending. The dialog dismisses before the write finishes, so the editor remains usable. The save queue preserves newer text as a dirty draft, but the close handler then closes the tab unconditionally and deletes that draft.
Trigger:
Expected: save the newer edits too, or keep the tab and draft open for another save decision.
I reproduced this with the real autosave controller, save queue, and editor store, deferring the filesystem bridge write. The regression test also covers edits still buffered by the rich editor's flush callback. All three cases fail because the tab closes. Normal save-and-close and write-failure cases pass. This is automated source-level reproduction, not a live SSH UI test.
The unconditional close is in editor-autosave-controller.ts.
Related but different: #1237 covered a missing save prompt; #18376 fixes a save-quiesce request that never settles. This race happens after the user accepts the save prompt and the write completes successfully.