feat(desktop): create notes & folders from the left nav (⌘N / ⇧⌘N, right-click) - #59
Conversation
…ght-click) - b2-core: Vault::create_note — the model-free create sibling of add_note (shared file write + project_file, the same posture as Vault::write): the new note is projected immediately (tree / keyword search / graph) and its chunks join the DB-derived pending set for the next embed pass. add_note is unchanged; both share write_new_note. - b2-desktop: thin create_note command (fake vault, outside the embed slot), AddTargetExists/AddDestination user-message mappings, command-layer tests. - ui: New note / New folder icons in the tree head with ⌘N / ⇧⌘N shortcuts, contextual on the selection (the open document's folder, or the last folder clicked/right-clicked, tracked as state.selectedDir). The name is typed into an inline input row in the tree: Enter creates and opens the note in edit mode, blur creates quietly, Escape cancels; on a refusal the input stays up with the typed name. The tree's right-click menu is taken over wholesale (New note / New folder targeting the row under the cursor). Folders are staged UI state (pendingDirs) that materialize on disk with their first note — create_note makes parent dirs, so no empty dir the index-derived tree couldn't list is ever written. The tree pane render is memoized (the note-pane pattern) so an unrelated repaint can't eat the typed name. Auto-index: a created note is projected at creation and embeds through the existing autosave → trailing-embed pipeline once content is typed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RybX9LpMF7FvaJRgpcs3Cy
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (18)
📝 WalkthroughWalkthroughAdds model-free note creation across the core vault, desktop IPC, and UI tree. Notes are projected without embedding, invalid destinations are reported, and the UI supports inline note or staged-folder creation. ChangesNote creation flow
Estimated code review effort: 4 (Complex) | ~60 minutes Suggested reviewers: Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
(shared file write + project_file, the same posture as Vault::write): the
new note is projected immediately (tree / keyword search / graph) and its
chunks join the DB-derived pending set for the next embed pass. add_note
is unchanged; both share write_new_note.
AddTargetExists/AddDestination user-message mappings, command-layer tests.
contextual on the selection (the open document's folder, or the last folder
clicked/right-clicked, tracked as state.selectedDir). The name is typed into
an inline input row in the tree: Enter creates and opens the note in edit
mode, blur creates quietly, Escape cancels; on a refusal the input stays up
with the typed name. The tree's right-click menu is taken over wholesale
(New note / New folder targeting the row under the cursor). Folders are
staged UI state (pendingDirs) that materialize on disk with their first
note — create_note makes parent dirs, so no empty dir the index-derived
tree couldn't list is ever written. The tree pane render is memoized (the
note-pane pattern) so an unrelated repaint can't eat the typed name.
Auto-index: a created note is projected at creation and embeds through the
existing autosave → trailing-embed pipeline once content is typed.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01RybX9LpMF7FvaJRgpcs3Cy
Summary by CodeRabbit
New Features
Bug Fixes