dropdead619 ยท GitHub

Conversation

Demezhan Kazhkenov Demezhan Kazhkenov

@dropdead619

@coderabbitai

๐Ÿ“ Walkthrough

Walkthrough

This change refactors list type handling in the editor utility to support runtime detection of available list extensions rather than relying on hard-coded assumptions. Two new helper functions are introduced: getAvailableListTypes(editor) to identify active list extensions and liftFromLists(chain, editor) to sequentially unwrap available list wrappers. The canExecute check, list unwrapping logic, and list type conversion now use these runtime checks to determine which list node types are available, replacing compile-time references to bulletList, orderedList, and taskList.

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~20 minutes

๐Ÿšฅ Pre-merge checks | โœ… 4 | โŒ 1

โŒ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage โš ๏ธ Warning Docstring coverage is 66.67% 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
Description check โœ… Passed The description is directly related to the changeset, explaining the bug, root cause (taskList extension not always present), and the solution implemented.
Linked Issues check โœ… Passed The PR successfully addresses issue #6099 by implementing dynamic list type handling that prevents errors when taskList or other extensions are unavailable.
Out of Scope Changes check โœ… Passed All changes in editor.ts are focused on fixing the list type handling issue described in #6099; no out-of-scope changes detected.
Title check โœ… Passed The title directly addresses the main change: guarding lift calls for unavailable list extensions to prevent runtime errors when certain list extensions are not registered.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing Touches ๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
๐Ÿ“ Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@vercel

@benjamincanac benjamincanac changed the title fix(Editor): guard calls for unavailable list extensions fix(Editor): guard lift calls for unavailable list extensions

Mar 18, 2026

benjamincanac

@vercel

@benjamincanac

Read the original on github.com โ†—