Repository navigation
Use a locator to wait for bracket marks to clear - #268
Merged
Merged
Conversation
jserv
reviewed
Oct 10, 2026
matthiola0
force-pushed
the
wait-editor-selection-paint
branch
from
October 10, 2026 15:37
ffab3a7 to
b3b5128
Compare
jserv
requested changes
Oct 10, 2026
jserv
left a comment
Contributor
There was a problem hiding this comment.
Check https://cbea.ms/git-commit/ carefully and enforce the rules.
matthiola0
force-pushed
the
wait-editor-selection-paint
branch
from
October 10, 2026 16:37
b3b5128 to
0136f88
Compare
The editor cache test already waits for bracket marks to clear before resetting the paint counter. Express the wait with a locator so the expected DOM state is clear, and document why the wait is needed.
matthiola0
force-pushed
the
wait-editor-selection-paint
branch
from
October 10, 2026 17:14
0136f88 to
bf39687
Compare
Contributor
|
Thank @matthiola0 for contributing! |
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.
CI for #263 failed in the editor cache test with
2 !== 1. Checking the assertion and repaint scheduling suggested a timing issue. I confirmed the ordering locally with a DOM trace and a controlled delay.The trace showed the bracket marks being cleared after the counter reset, while the editor text was still unchanged. The selection repaint is queued through
requestAnimationFrame, but the test resets the counter and replaces the text without waiting for it to finish. It can then count both operations and fail even when the editor behaves correctly.This waits for the bracket marks to clear after selecting all text, then resets the counter before replacing the text. The expected count remains one.
Main now includes this wait through #252. After rebasing, the remaining changes are the locator wait suggested in review and a comment explaining why the selection repaint must finish before resetting the counter.