Description
Selecting a file mention in the chat editor can trigger a frontend runtime exception during insertion. The error indicates that the fileMention node cannot be converted to a ProseMirror fragment, which suggests that multiple versions of prosemirror-model may be loaded in the application bundle.
Steps to Reproduce
- Open the chat interface.
- Trigger the file mention picker.
- Select a file mention from the suggestion list.
- Observe the runtime error during insertion.
Expected Behavior
The selected file mention should be inserted into the chat editor without crashing the page.
Actual Behavior
The frontend throws a Runtime RangeError:
Can not convert <fileMention, ""> to a Fragment (looks like multiple versions of prosemirror-model were loaded)
The stack trace points to:
components/chat/FileMentionNode.tsx:87
components/chat/FileMentionList.tsx:56
components/chat/FileMentionList.tsx:71
components/chat/FileMentionNode.tsx:118
Screenshots
Environment
- Component: Frontend
- Framework: Next.js 16.2.7 with Turbopack
- Browser: Not specified
- OS: Not specified
Additional Context
The failure occurs while calling insertContentAt for a custom fileMention node. The dependency graph should be checked for duplicate prosemirror-model versions or incompatible editor-related package versions.
Description
Selecting a file mention in the chat editor can trigger a frontend runtime exception during insertion. The error indicates that the
fileMentionnode cannot be converted to a ProseMirror fragment, which suggests that multiple versions ofprosemirror-modelmay be loaded in the application bundle.Steps to Reproduce
Expected Behavior
The selected file mention should be inserted into the chat editor without crashing the page.
Actual Behavior
The frontend throws a
Runtime RangeError:Can not convert <fileMention, ""> to a Fragment (looks like multiple versions of prosemirror-model were loaded)The stack trace points to:
components/chat/FileMentionNode.tsx:87components/chat/FileMentionList.tsx:56components/chat/FileMentionList.tsx:71components/chat/FileMentionNode.tsx:118Screenshots
Environment
Additional Context
The failure occurs while calling
insertContentAtfor a customfileMentionnode. The dependency graph should be checked for duplicateprosemirror-modelversions or incompatible editor-related package versions.