feat: Document tree UX — full hierarchy + folder/file icons (#156)#157
Merged
Conversation
Load all docs once and build the parent→children tree client-side so the full hierarchy is visible upfront (Obsidian/Outline-like), instead of only roots with lazy-expanded children. Folders now render with Folder/FolderOpen icons distinct from leaf FileText, show a child-count badge, and use guide lines + deeper indent for clearer nesting. Expanded-by-default. Refs #156
🔍 Cora AI Code Review🟡 Warning (1)
Review powered by cora-cli · BYOK · MIT |
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
Improves the Documents page tree (#156) to feel more like Obsidian/Outline:
loadRootDocs()now fetches all docs once (docs.list()with noroots_only) and builds the parent→children tree client-side, instead of only loading roots and lazy-expanding children. The whole hierarchy renders immediately.Folder/FolderOpen(lucide) icons, distinct from leafFileText. Folders show a child-count badge.border-left) + deeper indent (16px) per level.Details
childrenCache), not the server'shas_childrenfield (which could be stale/inconsistent).toggleNode/selectDoc/expandPathToDocupdated to use the cache; lazyloadChildrenkept only as a fallback.Validation
svelte-check: 0 errors (36 pre-existing a11y warnings)vitest: 60 passed (7 files)cargo test: 13 passednpm run build: ✓Closes #156.