Skip to content

[WIKI-569] regression: parser kit extensions mismatch#7885

Merged
pushya22 merged 1 commit intopreviewfrom
fix/parser-kit
Oct 1, 2025
Merged

[WIKI-569] regression: parser kit extensions mismatch#7885
pushya22 merged 1 commit intopreviewfrom
fix/parser-kit

Conversation

@aaryan610
Copy link
Copy Markdown
Member

@aaryan610 aaryan610 commented Oct 1, 2025

Description

This PR fixes the bug where multiple link extensions were being registered via the parser kit.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Summary by CodeRabbit

  • New Features
    • Enabled undo/redo history in the editor for smoother, more reliable editing.
  • Refactor
    • Updated editor defaults for common blocks (paragraphs, headings, lists) and elements (code, block quotes, horizontal rules), aligning behavior with standard expectations. Some previously disabled elements may now be available or behave differently.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 1, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Replaced StarterKit.configure(...) with CustomStarterKitExtension({ enableHistory: true }) in CoreEditorExtensionsWithoutProps, updating the starter-kit initialization and enabling history. Imports adjusted accordingly; other listed extensions remain unchanged.

Changes

Cohort / File(s) Summary of Changes
Core editor starter-kit initialization
packages/editor/src/core/extensions/core-without-props.ts
Swapped StarterKit.configure(...) for CustomStarterKitExtension({ enableHistory: true }); removed StarterKit import, added CustomStarterKitExtension import; preserved existing extension list otherwise.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Editor
    participant CoreExtensions as CoreEditorExtensionsWithoutProps
    participant CustomStarterKit as CustomStarterKitExtension
    participant OtherExt as Other Extensions
    participant History

    Editor->>CoreExtensions: Request extension list
    Note over CoreExtensions: Initialization path updated
    CoreExtensions->>CustomStarterKit: Instantiate { enableHistory: true }
    CustomStarterKit-->>History: Initialize history support
    CoreExtensions-->>OtherExt: Include Emoji/Link/Image/Quote/HR/etc.
    CoreExtensions-->>Editor: Return composed extensions
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Palanikannan1437
  • sriramveeraghanta

Poem

I twitch my ears at history’s tune,
A custom kit now hums in June.
Snip the old, the new plugs in—
Extensions hop, aligned to win.
Tap-tap keys, my paws delight:
The editor’s flow feels just right. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description correctly identifies the bug fix and type of change, but it omits the required Test Scenarios and References sections from the repository’s template, leaving out how the fix was verified and any related issue links. Please add a Test Scenarios section detailing the steps or tests used to verify the fix and a References section linking any related issues or PRs to fully comply with the repository’s description template.
Title Check ❓ Inconclusive The title “[WIKI-569] regression: parser kit extensions mismatch” vaguely refers to a regression and an extensions mismatch but does not clearly summarize the primary change of replacing StarterKit.configure(...) with a new CustomStarterKitExtension({ enableHistory: true }) or the specific bug being addressed regarding link extension duplication. It is generic and does not give a teammate enough context to understand the key modification. Consider revising the title to explicitly mention the replacement of the starter kit extension and the enabling of history to fix the parser kit extension issue, for example: “Replace StarterKit.configure with CustomStarterKitExtension to resolve parser kit extension mismatch.”
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/parser-kit

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where multiple link extensions were being registered via the parser kit by replacing the direct TipTap StarterKit usage with a custom starter kit extension.

  • Removes direct StarterKit import and configuration
  • Introduces CustomStarterKitExtension with streamlined configuration
  • Simplifies extension configurations by removing inline options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

import { ImageExtensionConfig } from "./image";
import { CustomMentionExtensionConfig } from "./mentions/extension-config";
import { CustomQuoteExtension } from "./quote";
import { CustomStarterKitExtension } from "./starter-kit";
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CustomStarterKitExtension import is added but the corresponding file './starter-kit' may not exist or may not export this function. This could cause a runtime error if the module is not properly implemented.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +30
CustomHorizontalRule,
CustomLinkExtension,
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomHorizontalRule and CustomLinkExtension are now used without their previous configurations. This removes important styling (CSS classes) and functionality (link validation, protocols). The removed configurations should be preserved either in the CustomStarterKitExtension or applied here to maintain the same behavior.

Suggested change
CustomHorizontalRule,
CustomLinkExtension,
CustomHorizontalRule.configure({
HTMLAttributes: {
class: "my-4 border-t border-gray-300", // Example, replace with your actual class
},
}),
CustomLinkExtension.configure({
HTMLAttributes: {
class: "text-blue-600 underline", // Example, replace with your actual class
},
validate: href => {
// Example validation: allow only http, https, mailto, and tel
return /^(https?:\/\/|mailto:|tel:)/.test(href);
},
protocols: ['http', 'https', 'mailto', 'tel'],
}),

Copilot uses AI. Check for mistakes.
@pushya22 pushya22 changed the title regression: parser kit extensions mismatch [WIKI-569] regression: parser kit extensions mismatch Oct 1, 2025
@makeplane
Copy link
Copy Markdown

makeplane Bot commented Oct 1, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@aaryan610 aaryan610 closed this Oct 1, 2025
@aaryan610 aaryan610 reopened this Oct 1, 2025
@pushya22 pushya22 merged commit 931a48d into preview Oct 1, 2025
10 checks passed
@pushya22 pushya22 deleted the fix/parser-kit branch October 1, 2025 09:57
zy1000 pushed a commit to zy1000/plane that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants