Description
After recent editor-related changes, the editor has become unstable and difficult to use.
There are three critical regressions affecting the core writing experience:
- Cursor unexpectedly jumps to the start/left of the block
@ note mentions are not working
/ slash commands are not triggering
These issues make continuous writing unreliable and break core editor functionality.
Expected Behavior
- Cursor remains stable while typing
- Typing
@:
- Opens the note mention menu
- Filters notes by title
- Inserts a reference using
noteId
- Should show the metion like
@xyz exactly and in blue color and clickable and when clicked will take to that note.
- Typing
/:
- Opens the SlashMenu
- Allows block type insertion (existing behavior)
Actual Behavior
- Cursor jumps to the beginning of the block while typing
@ does nothing (no menu, no filtering)
/ does nothing (SlashMenu does not open)
- Editor becomes frustrating to use for longer writing sessions
Suspected Causes
Likely related to recent changes in:
editor/ui/Block.tsx
contentEditable rendering logic
- Focus / blur handling
- Conditional rendering for note mentions
- Keyboard event interception
Possible causes include:
- DOM node replacement causing caret position loss
- Mention rendering switching between focused/unfocused states
- Keyboard events being swallowed by mention logic
- Conflicts between mention menu and slash menu listeners
Files to Investigate
editor/ui/Block.tsx
editor/ui/Editor.tsx
editor/ui/SlashMenu.tsx
- Note mention menu implementation
- Any recent changes touching:
onInput
onKeyDown
contentEditable
innerText / innerHTML
Steps to Reproduce
- Open any note
- Click into the editor
- Start typing
→ Cursor jumps to the beginning
- Type
@
→ No mention menu appears
- Type
/
→ Slash menu does not open
Environment
- App: Pulm (local-first notes app)
- Platform: Web (Tauri planned later)
- Storage: localStorage
- Branch:
dev
- Browser: Chromium-based (reproducible across browsers)
Severity
High / Blocking
This impacts the core editor UX and should be resolved before further feature development or desktop packaging.
Development Notes
Branch Policy
All development should happen on the dev branch.
- Do NOT push directly to `main`
- Create feature branches from `dev`
- Open pull requests targeting `dev`
- `main` is reserved for stable releases only
Description
After recent editor-related changes, the editor has become unstable and difficult to use.
There are three critical regressions affecting the core writing experience:
@note mentions are not working/slash commands are not triggeringThese issues make continuous writing unreliable and break core editor functionality.
Expected Behavior
@:noteId@xyzexactly and in blue color and clickable and when clicked will take to that note./:Actual Behavior
@does nothing (no menu, no filtering)/does nothing (SlashMenu does not open)Suspected Causes
Likely related to recent changes in:
editor/ui/Block.tsxcontentEditablerendering logicPossible causes include:
Files to Investigate
editor/ui/Block.tsxeditor/ui/Editor.tsxeditor/ui/SlashMenu.tsxonInputonKeyDowncontentEditableinnerText/innerHTMLSteps to Reproduce
→ Cursor jumps to the beginning
@→ No mention menu appears
/→ Slash menu does not open
Environment
devSeverity
High / Blocking
This impacts the core editor UX and should be resolved before further feature development or desktop packaging.
Development Notes
Branch Policy
All development should happen on the
devbranch.