Add a file-tree navigation pane to the desktop UI - #11
Conversation
The desktop app was navigable only by search; add a left-most file-tree pane so the vault is browsable — navigate, open a folder, click a file to read it. Core gains one new façade op, `Vault::list_notes() -> Vec<NoteSummary>` (b2id/path/title, no body; a pure model-free read, path-ordered), backed by `db::all_notes`. The desktop host exposes it as a thin `list_notes` command (deserialize -> one façade call -> serialize), staying a dumb adapter. The tree is folded from the flat list in `ui/`, keeping presentation logic out of the host. Index-first like `search`: the tree shows exactly the notes the index knows, so every entry is `read`-resolvable and a click always opens. Opening a note from search or a wikilink auto-expands its ancestor folders and highlights it. The tree refreshes after reindex. Tests: 3 `list_notes` integration tests (tests/list.rs) + a command-layer test; clippy/fmt clean; frontend type-checks and builds. Docs updated (tasks.md, desktop-ui-mvp.md §4). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NFfZfhuWBCkc58mQCNcsDo
|
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 (13)
📝 WalkthroughWalkthroughAdds a ChangesFile-tree listing feature
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MainTS as main.ts
participant Api
participant TauriCmd as list_notes command
participant Vault
participant Db
User->>MainTS: boot()
MainTS->>Api: listNotes()
Api->>TauriCmd: invoke("list_notes")
TauriCmd->>Vault: list_notes()
Vault->>Db: all_notes(conn)
Db-->>Vault: Vec<(b2id, path, title)>
Vault-->>TauriCmd: Vec<NoteSummary>
TauriCmd-->>Api: Vec<NoteSummary>
Api-->>MainTS: notes
MainTS->>MainTS: treePaneHtml(state)
MainTS-->>User: render file tree
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 |
The desktop app was navigable only by search; add a left-most file-tree
pane so the vault is browsable — navigate, open a folder, click a file to
read it.
Core gains one new façade op,
Vault::list_notes() -> Vec<NoteSummary>(b2id/path/title, no body; a pure model-free read, path-ordered), backed
by
db::all_notes. The desktop host exposes it as a thinlist_notescommand (deserialize -> one façade call -> serialize), staying a dumb
adapter. The tree is folded from the flat list in
ui/, keepingpresentation logic out of the host.
Index-first like
search: the tree shows exactly the notes the indexknows, so every entry is
read-resolvable and a click always opens.Opening a note from search or a wikilink auto-expands its ancestor
folders and highlights it. The tree refreshes after reindex.
Tests: 3
list_notesintegration tests (tests/list.rs) + a command-layertest; clippy/fmt clean; frontend type-checks and builds. Docs updated
(tasks.md, desktop-ui-mvp.md §4).
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01NFfZfhuWBCkc58mQCNcsDo
Summary by CodeRabbit
New Features
Bug Fixes