Repository navigation
Fix Docs table autosave jsdom geometry - #3259
Merged
ymichael merged 1 commit intoSep 8, 2026
Merged
Conversation
ymichael
deleted the
bb/ci-flake-fix-docs-table-autosave-geometry-thr_5bhg9sbvjp
branch
September 8, 2026 18:09
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.
Human comments
What was wrong
The Docs jsdom suite provided
matchMediabut no Range geometry boundary. jsdom 29 exposes Element geometry while omittingRange.getClientRects()andRange.getBoundingClientRect(). ProseMirror 1.41.8 calls those methods while reconciling an edited table and scrolling its selection, so the uncaught TypeError aborted the editor update before the existing 700 ms autosave could callsaveNote. The 2-second assertion in the failing current-main run reported that upstream exception rather than a slow save.What changed
The Docs app test setup now provides zero-sized, browser-shaped Range geometry for jsdom and restores the original property descriptors after every test. No app behavior, timer, assertion, wire contract, CLI, or documentation changed.
How you verified
c49ba3f546d1049f0d0f4e51850908028a318d52withTypeError: target.getClientRects is not a functionfrom ProseMirrorsingleRect/coordsAtPos.pnpm exec vitest run --config plugins/docs/vitest.config.ts plugins/docs/app.test.tsx -t "renders and autosaves editable Markdown tables" --reporter verbose --maxWorkers=2(1 passed; unchanged 2-second wait).pnpm exec turbo run test --filter=bb-plugin-simple-notes --concurrency=2 -- --maxWorkers=2(66 passed).pnpm exec turbo run typecheck --filter=bb-plugin-simple-notes --concurrency=2.pnpm exec turbo run build --filter=bb-plugin-simple-notes --concurrency=2 --force.pnpm exec prettier --check plugins/docs/app.test.tsx.