Skip to content

fix(react): prevent a crash while loading the user who resolved a thread - #3443

Merged
nperez0111 merged 1 commit into
mainfrom
fix/resolved-comment-author-loading
Nov 30, 2026
Merged

nperez0111 merged 1 commit into
mainfrom
fix/resolved-comment-author-loading

Conversation

@nperez0111

@nperez0111 nperez0111 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Render the resolution marker with the existing author-loading state while the resolving user is being fetched. Previously, rendering threw before the user could load.
  • Cover resolved empty threads and the existing behavior for open empty threads in the sidebar and floating card.

Refs #3435. This reproduces an upstream crash for a resolved empty thread with an uncached author; the original downstream crash was not independently confirmed.

Verification

  • Confirmed the regression failed before the fix.
  • All 6 targeted Chromium tests passed after the fix.
  • Type-aware lint passed.

Summary by CodeRabbit

  • Bug Fixes
    • Resolved comments display a loading state when resolver details are unavailable, rather than causing an error.
    • Threads remain visible and selectable while comments or resolver information load. Their content updates when the information arrives, and deleted threads disappear from view.

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blocknote Ready Ready Preview Nov 30, 2026 2:50pm UTC
blocknote-website Ready Ready Preview Nov 30, 2026 2:50pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Resolved comments display a loading label when resolver data is unavailable. Browser tests cover empty-thread selection, arriving comments, thread deletion, and delayed resolver data. The browser test configuration includes the new test.

Changes: Empty thread rendering

Layer / File(s) Summary
Resolved comment fallback
packages/react/src/components/Comments/Comments.tsx, packages/react/src/components/Comments/ThreadsSidebar.browser.test.tsx
Resolved comments display "loading" when resolver data is unavailable. The authorInfo fallback now uses nullish coalescing. A browser test checks the resolved thread before and after resolver data arrives.
Sidebar browser coverage
packages/react/src/components/Comments/ThreadsSidebar.browser.test.tsx, tests/vite.config.browser.ts
Browser tests cover empty-thread selection, arriving comments, and thread deletion. The browser configuration includes the new test.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • TypeCellOS/BlockNote issue 3435 — It covers empty comment-thread handling, which the new browser tests exercise. The issue does not confirm the upstream crash.

Suggested reviewers: matthewlipski, yousefed

Merge Risk: Minimal · up to 9d33f

The change prevents a crash while the user who resolved a thread is still loading, and adds browser tests for it. No merge-blocking risk was found.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description covers the core of the change. The Summary explains the fix: the resolution marker uses the existing author-loading state while the resolving user is fetched, and the crash before the … Add the missing template sections: Rationale (why the fix is needed), Changes (a list of the Comments.tsx, ThreadsSidebar.browser.test.tsx, and tests/vite.config.browser.ts edits), Impact (effects on existing resolved and open thread displa…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a crash fix in the React package while loading the user who resolved a thread. It matches the raw summary, which says Comments no longer throws when resolver data is m…
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.
Full details: Title check

Explanation

The title names the main change: a crash fix in the React package while loading the user who resolved a thread. It matches the raw summary, which says Comments no longer throws when resolver data is missing and shows "loading" instead. It follows the conventional commit style and is specific enough for a reviewer scanning history. It is 72 characters, within common limits.

Full details: Description check

Explanation

The description covers the core of the change. The Summary explains the fix: the resolution marker uses the existing author-loading state while the resolving user is fetched, and the crash before the fix is described. It also lists the new test coverage for resolved and open empty threads. The Verification section covers testing and lint. It does not follow the repository template: the Rationale, Changes, Impact, Screenshots/Video, Checklist, and Additional Notes sections are missing. The Testing content is only partly covered by Verification. The description also does not state whether the downstream crash was confirmed, though it notes this in the Summary.

Resolution

Add the missing template sections: Rationale (why the fix is needed), Changes (a list of the Comments.tsx, ThreadsSidebar.browser.test.tsx, and tests/vite.config.browser.ts edits), Impact (effects on existing resolved and open thread display), Testing (move or expand the Verification details, including the 6 Chromium tests), Screenshots/Video (state whether it applies), and Checklist (mark each item). Add Additional Notes if needed. Keep the note that the downstream crash was not independently confirmed.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the threads at dawn
An empty card stays safely drawn
New comments hop into the view
A loading name comes into view
When threads depart, their marks do too
The burrow’s sidebar stays in queue

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb3ac95c-5f99-49b6-9fa5-411528d94809
Commits

Reviewing files that changed from the base of the PR and between d0246bb and 9d33f63.

Files selected for processing: 1

  • tests/vite.config.browser.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@nperez0111
nperez0111 force-pushed the fix/resolved-comment-author-loading branch from d0246bb to 104199b Compare November 30, 2026 14:47
@nperez0111 nperez0111 changed the title Fix crash while loading the user who resolved a thread fix(react): prevent a crash while loading the user who resolved a thread Nov 30, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@3443

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@3443

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@3443

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@3443

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@3443

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@3443

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@3443

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@3443

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@3443

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@3443

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@3443

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@3443

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@3443

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@3443

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@3443

@blocknote/xl-typst-exporter

npm i https://pkg.pr.new/@blocknote/xl-typst-exporter@3443

commit: 9d33f63

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-11-30 15:06 UTC

@nperez0111
nperez0111 merged commit 199fbe8 into main Nov 30, 2026
38 checks passed
@nperez0111
nperez0111 deleted the fix/resolved-comment-author-loading branch November 30, 2026 15:05

This branch was successfully deployed

2 active deployments
Preview – blocknote-website — 9d33f635 Deployed Nov 30, 2026 by vercel[bot]
Preview – blocknote — 9d33f635 Deployed Nov 30, 2026 by vercel[bot]
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.

1 participant