Skip to content

3.24.2: a note Paste world writes is refused a Save until Download - #49

Merged
tmoosting merged 6 commits into
mainfrom
fix/paste-clears-numbers
Nov 30, 2026
Merged

tmoosting merged 6 commits into
mainfrom
fix/paste-clears-numbers

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Paste world over a note the vault already holds could let a later Save send older clipboard text under a change number that still matched the world's, over newer text on onlyworlds.com.

Now every note Paste world writes with other bytes takes the number 0, recorded in batches, so Save and auto-sync refuse it as stale until a Download. Download keeps its incremental pull and adds the rows of those notes from one walk from the start, so an element the world has not changed since gets its number back; an id no row names loses its 0 once those rows were read. A failed extra walk leaves the 0s.

1181 tests; the new ones fail without each part. Walked in a real Obsidian on the built bytes (main.js a3249d21): Paste-number 3 of 3 (the control, 3.24.1, fails on the number row), four-notes 29, inherited (local) 18, pull and save 23, upload 10, auto-sync 12, own property 14, property removal 18.

🤖 Generated with Claude Code

…es (a Save is refused as stale)

A pasted note's text is the clipboard's, possibly older than the world's, and its recorded change number was the pull's: a Save sent the older text under a number that still matched. The number goes to 0 for a replaced note; bytes left as they were keep it.
…m the start while one holds it

A cold read found the first version left a pasted note stuck at 0 for good when the world had not changed since the last pull, and left a note made for an id with a number or none untouched. The number is now recorded per note, for every note written with other bytes, and a Download pulls from the start while an id holds it.
…; Paste batches its writes

The second cold read found the cold walk lost a pending view resync, replaced every typed-into note of the world, and left ids the feed never names at 0 for good. The incremental walk stays; rows of the ids at 0 are added from a walk from the start; an id still at 0 after a complete run is cleared. Paste writes its zeros 25 notes at a time.
…iling leaves it

Third cold read: a failed extra walk still cleared the pasted ids, so the next Save went out with no check. Also a test for a paste of more notes than one batch.
@tmoosting
tmoosting merged commit 1c89092 into main Nov 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant