Repository navigation
fix(editor): smooth writing during autosave and pan/zoom (1.3.5) - #36
Merged
Merged
Conversation
markm39
marked this pull request as ready for review
October 13, 2026 16:02
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.
Fixes the 1.3.4 regression: strokes lagged ~1 s while writing (during autosave), and pan/zoom was very laggy.
Changes
captureDocumentoff the main thread; sticky overscanned render target so pan/zoom doesn't re-render ink each frame. Pin lands once 0.3.9 is published.useViewportTransformStoresubscribed the whole note screen withuseSyncExternalStore; it now only creates the store (consumers already subscribe directly).autosaveQueue): a debounced save that fires while another is in flight waits for it, so an older capture can't land after newer ink. A save superseded by new ink reportspending(typed engine error), real failures still reporterror.Evidence (iPad Pro 13" M5 simulator, Release, 100-page dense fixture — not physical iPad)
New
testDenseWritingDuringAutosavePerformancewrites strokes 400 ms apart so every stroke overlaps a save.Tests
npm test116 pass (newautosaveQueue.test.mjs: no overlapping saves, superseded vs real failure),tscclean.OpenNotesUITestspass on the Release simulator build: cross-page stroke undo/redo/save/relaunch/PDF export, text/asset history, image crop, dense audit, invalid payload recovery, performance cases.