Skip to content

fix(shared-notes): drop the table crash workaround, fixed upstream in BlockNote 0.53 - #25615

Merged
ramonlsouza merged 7 commits into
bigbluebutton:v4.0.x-developfrom
GuiLeme:rollback-blocknote-fix
Aug 18, 2026
Merged

ramonlsouza merged 7 commits into
bigbluebutton:v4.0.x-developfrom
GuiLeme:rollback-blocknote-fix

Conversation

@GuiLeme

@GuiLeme GuiLeme commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Updates BlockNote from 0.51 to 0.53 in bigbluebutton-html5 and
bbb-shared-notes-server, drops the local workaround added in #25076 now that the
upstream bug is fixed, and adds a regression suite that would catch it coming back.

Changes

1. Drop the bbbFixCursorAtOrigin workaround. #25076 patched a crash where clicking
the editor's left margin next to a leading table threw a position-out-of-range error and
took the client down. It was fixed upstream in TypeCellOS/BlockNote#2911 (issue #2748),
so the local patch is removed in favour of the upstream fix.

2. Migrate to withCollaboration. This is the riskiest part of the PR and touches
the whole collaboration path, so it deserves attention in review. In 0.53 collaboration
is no longer a BlockNoteEditorOptions field — it ships as an extension behind the
@blocknote/core/yjs subpath. The useCreateBlockNote options object is now wrapped in
withCollaboration(...). Behaviour is meant to be unchanged: same Hocuspocus provider,
same awareness object, same remote-cursor rendering.

3. New dependencies (and one removal). 0.53 moved y-prosemirror, yjs,
y-protocols and the @y/* packages from transitive dependencies of @blocknote/core
into optional peerDependencies. npm does not install optional peers, so anything the
runtime actually loads has to be declared explicitly now:

Package Where Why
y-prosemirror@^1.3.7 html5, shared-notes-server @blocknote/core/dist/yjs.js imports it at the top level. Without it the notes server crash-loops at boot with ERR_MODULE_NOT_FOUND. Range matches the core's peer.
yjs@^13.6.29 html5 Was only transitive before. Also raises the shared-notes-server range from ^13.6.23, which sat below the core's ^13.6.27 peer floor — both tiers now declare the same range.
y-protocols@^1.0.7 shared-notes-server Loaded at runtime by @hocuspocus/server (y-protocols/awareness, y-protocols/sync), but until now it only survived in the tree because third parties declare it as a non-optional peer — the same fragility that broke y-prosemirror here. Already the range html5 uses, so both tiers stay on one protocol line. Resolved version is unchanged; the lock diff is just dropping "peer": true.

Also removes [email protected] from bbb-shared-notes-server, added by accident in #24519
and imported nowhere (npm flags it as deprecated).

4. Regression coverage. bigbluebutton-tests/playwright/sharednotes/blocknote/table.spec.ts
covers the three interactions around a leading table that used to crash the client:
arrowing left out of the first cell, clicking the editor's left margin, and the alignment
control inside a cell. Each asserts no out-of-range error, no error screen, and an editor
that still accepts typing.

Testing

  • Clean npm ci + build on both tiers, notes server boots and serves.
  • Shared notes manually exercised: table insertion, the three crash interactions,
    multi-user collaboration and remote cursors.
  • New table.spec.ts suite passing.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 48fab05a-4774-4dbe-8d77-2ddafb1541a3

📥 Commits

Reviewing files that changed from the base of the PR and between 8306364 and 2f860b0.

⛔ Files ignored due to path filters (1)
  • bbb-shared-notes-server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • bbb-shared-notes-server/package.json
  • bbb-shared-notes-server/src/common/singleton.ts
  • bigbluebutton-tests/playwright/sharednotes/blocknote/util.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • bbb-shared-notes-server/package.json
  • bigbluebutton-tests/playwright/sharednotes/blocknote/util.ts

Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review.


Walkthrough

BlockNote dependencies are upgraded to 0.53.0. Shared Notes now uses withCollaboration with Yjs dependencies. The cursor-at-origin extension is removed. New Playwright utilities, selectors, and regression tests cover table navigation, left-margin clicks, alignment controls, page errors, and continued editor usability.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 2f860

The change updates the shared-notes editor dependencies and collaboration integration while removing an obsolete crash workaround and adding regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: ramonlsouza

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: removing the table crash workaround after the upstream BlockNote 0.53 fix.
Description check ✅ Passed The description directly explains the dependency update, workaround removal, collaboration migration, and regression coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@antobinary antobinary added this to the Release 4.0 milestone Aug 13, 2026
@ramonlsouza
ramonlsouza self-requested a review August 14, 2026 16:18
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@ramonlsouza
ramonlsouza merged commit 71a1af1 into bigbluebutton:v4.0.x-develop Aug 18, 2026
36 checks 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.

3 participants