Reduce editor keydown plugin work#5906
Merged
Merged
Conversation
✅ Deploy Preview for old-char ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
012bfc7 to
0d97638
Compare
0d97638 to
8c3f1f3
Compare
223d25d to
0238516
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0238516. Configure here.
524e7f5 to
29a9304
Compare
ffc8630 to
74c1d2b
Compare
29a9304 to
e9dc4bd
Compare
74c1d2b to
cf88576
Compare
e9dc4bd to
b990913
Compare
Compute placeholder decorations from the selected block and limit image trailing paragraph repair to changed document ranges so large notes avoid document-wide plugin scans during typing.
b990913 to
9cc5fb2
Compare
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.

Compute placeholder decorations from the selected block and limit image trailing paragraph repair to changed document ranges so large notes avoid document-wide plugin scans during typing.
Note
Medium Risk
Placeholder and image-repair logic changed how empty blocks are targeted; behavior is covered by new tests but still affects all note editing UX.
Overview
Editor typing performance:
placeholderPluginno longer walks the whole document withdoc.descendants; it resolves a single empty block from the selection (including nested blocks and gap-cursor neighbors) and applies at most one decoration.imageTrailingParagraphPluginonly inspects images in transaction changed ranges (viagetChangedRanges) instead of every top-level child on each edit.Desktop:
ClassicMainBodyis wrapped in a memoizedClassicMainBodyHost, andTimelineViewis exported asmemo(...)so parents can skip redundant subtree work. Timeline tests pass explicit props onrerenderwhere memo would otherwise leave stale UI.Tests: New Vitest coverage for placeholder selection behavior and image trailing-paragraph insert/repair edge cases.
Reviewed by Cursor Bugbot for commit 9cc5fb2. Bugbot is set up for automated code reviews on this repo. Configure here.