Switch notes panel to RichTextEditor, add checklist button, fix dead comment button - #2
Merged
Merged
Conversation
Adds applyCheckboxList, mirroring the existing bullet/numbered-list toggle transforms: toggles a "- [ ] " marker on every non-blank selected line, converting a plain bullet in-place to "- [ ] " rather than double-prefixing, and toggles all-checked lines back to plain text in one click. Wires a new "checkbox-list" entry into TOOLBAR_ACTIONS so the button shows in MarkdownToolbar for both the notes panel and the kanban modal (both share the same component). Adds unit tests covering empty note, blank-line caret, full-selection toggle on/off, blank-line skipping mid-selection, existing-bullet conversion, and bare-caret behavior. Updates README's toolbar feature list to mention the checklist button. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The task panel/mobile surface now renders host.ui.RichTextEditor — the same TipTap-based WYSIWYG editor the Plan panel uses (markdown in, markdown out via tiptap-markdown; bold/italic/headings/lists/links/ code blocks/checklists reachable through its own bubble menu and "/" slash commands) — instead of the hand-rolled markdown textarea, per the request to model the notes editor on the existing Plan text area. The kanban card's "Edit notes" modal keeps the markdown textarea + MarkdownToolbar: host.ui.RichTextEditor calls useMermaidErrorToast, which requires a ToastProvider ancestor, and the host's PluginModalHost (where this plugin's modal mounts) does not render one — this is the same platform gap a prior commit (283b7f8, "fix: use a plain textarea in the kanban notes modal") already discovered and documented; it still applies. NotesEditor now branches on `presentation` internally to pick the right editor per surface, rather than exposing a separate prop. Since host.ui.RichTextEditor only consumes its `value` prop as the TipTap editor's initial content (no effect resyncs a later value change, same as the Plan panel's own tiptap-plan-editor.tsx), a `lastRichValueRef`-driven effect bumps an `editorKey` to force a remount whenever the note's value changes for a reason other than the editor's own onChange (a cross-tab sync refresh, or an accepted "Enhance with AI" preview) — mirroring task-plan-panel.tsx's own `editorKey` pattern for the same problem. Updates README to describe the new per-surface editor split and updates a stale test comment referencing the old unified-editor design. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- host.ui.RichTextEditor's bubble menu always renders a "comment" button (inherited unconditionally from the Plan editor's TipTapPlanEditor), but the plugin-facing RichTextEditor wrapper never forwards onSelectionChange, so clicking it is a silent no-op for every plugin that uses it, not just this one. There is no prop to disable it and no host change is in scope here, so this hides it with a small scoped CSS rule (injectPluginStyles) targeting the panel's own RichTextEditor instance via a new "kandev-notes-richtext" class. - Add a "Preview" toggle next to "Enhance with AI" in the kanban modal that swaps the plain textarea for host.ui.RichTextReadOnly (the Plan editor's read-only renderer), showing headings/lists/checkboxes/code blocks/links rendered as they'll look. This has no ToastProvider dependency (unlike the fully-editable RichTextEditor), so it's safe to mount inside the modal, which still can't host the editable rich editor due to that host-platform gap (documented in an earlier commit). - Confirmed the "Todos" tab seen alongside "Notes" in the add-panel menu is a built-in kandev panel (layout-manager/constants.ts), unrelated to this plugin. - Add unit tests for injectPluginStyles (single tag, idempotent, correct selector) and for initialize() being safe without a document global. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
host.ui.RichTextEditorfor the notes panel, matching the Plan editorContext
These 3 commits were made after PR #1 was merged but were never pushed, so they were missing from
main. This PR lands the remaining work.Test plan
ui/bundle.test.mjspasses🤖 Generated with Claude Code