Added placeholder for active items and headers/lists/etc#5104
Added placeholder for active items and headers/lists/etc#5104
Conversation
✅ Deploy Preview for fastrepl ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for char-cli-web canceled.
|
✅ Deploy Preview for unsigned-char ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8f5b552. Configure here.
| } | ||
|
|
||
| return ""; | ||
| }; |
There was a problem hiding this comment.
Duplicated placeholder logic across two files
Low Severity
dailyPlaceholder and Placeholder in raw.tsx share identical logic for mapping node types to placeholder strings — the heading level check, codeBlock → "Code", and the listItem/taskItem/blockquote parent-type checks are copy-pasted. If a new block type is added, both functions need updating independently, risking inconsistency. A shared helper accepting only the doc-level paragraph text as a parameter could eliminate this.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8f5b552. Configure here.


Now on all empty page we show placeholder about / command
Also when user uses command line or menu — we show placeholder for active item
Note
Medium Risk
Touches shared editor plugin decoration logic and selection-dependent rendering, which could cause placeholder regressions or cursor/decoration edge cases across all editors.
Overview
Adds context-aware placeholders across editors: daily notes now provide a custom
dailyPlaceholderand session raw notes expand theirPlaceholderto label empty headings, code blocks, list/task/quote paragraphs, and show/guidance on empty documents.Updates the shared
placeholderPluginto passparentintoPlaceholderFunctionand to also render a widget placeholder for the currently active nested empty block (not just empty nodes found duringdoc.descendants). Styles daily-note placeholders to a lighter gray via.is-empty::before.Reviewed by Cursor Bugbot for commit 8f5b552. Bugbot is set up for automated code reviews on this repo. Configure here.