Repository navigation
fix: stop the app's own overlapping saves from showing a false conflict [20261121-stop-app-s-own-overlapping-saves] - #104
Merged
Conversation
The app recognised its own change events by the last version it wrote per note. When an older save finished after a newer one had started, its event no longer matched and was merged as another window's edit: a false "edited in another window" message, and with text edits a duplicated paragraph. Track every version still being saved and release each when its save settles; any in-flight version's event is this window's own.
This was referenced Nov 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Topic:
20261121-stop-app-s-own-overlapping-savesChange summary
writteninapp.js). When saves of one note overlapped (e.g. holding Alt+Down), the older save's event came back after the newer save had started, didn't match, and was merged as another window's edit: a false "This note was also edited in another window" message, and with text edits a duplicated paragraph.extension/merge.js: newcreateOwnSaves()holds every version still being saved and releases each when its save settles.extension/app.js:persisttracks before saving and releases in.finally;acceptRemoteasksownSaves.isOwn(remote). The cross-window merge stays, for a possible second window later.tests/merge.test.js: 3 tests, one against the real file area and store with overlapping delayed saves and a failed save.Verify
node --test "tests/*.test.js"isOwnreduced to the latest versionVerified: green, and the run describes the tree as it is now.
Note:
npm testonmainis still the old form until #103 merges.Ship decision: GO
No Critical or Important finding. 8 readers, 0 fix-now.
Things I didn't touch
persist;app.jscan't be imported in Node. Moving the save sequence into one helper is deferred.Release
20261121-stop-app-s-own-overlapping-saves — no false conflict from the app's own saves
Change
Before release
kiln verifyran the full unit suite: exit 0, 217 of 217 pass on Node 22.17.1. (checked)Release steps
After release
Rollback
git revertthe merge commit, then open and merge that pull request, then release.