Skip to content

feat: Document tree UX — full hierarchy + folder/file icons (#156)#157

Merged
ajianaz merged 2 commits into
developfrom
feat/156-doc-tree-ux
Jul 9, 2026
Merged

feat: Document tree UX — full hierarchy + folder/file icons (#156)#157
ajianaz merged 2 commits into
developfrom
feat/156-doc-tree-ux

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improves the Documents page tree (#156) to feel more like Obsidian/Outline:

  • Full tree visible upfrontloadRootDocs() now fetches all docs once (docs.list() with no roots_only) and builds the parent→children tree client-side, instead of only loading roots and lazy-expanding children. The whole hierarchy renders immediately.
  • Folder vs file distinction — nodes with children render Folder/FolderOpen (lucide) icons, distinct from leaf FileText. Folders show a child-count badge.
  • Clearer nesting — guide lines (border-left) + deeper indent (16px) per level.
  • Expanded by default — all folders expand on load so the full structure is visible.

Details

  • "Has children" is now derived authoritatively from the built cache (childrenCache), not the server's has_children field (which could be stale/inconsistent). toggleNode/selectDoc/expandPathToDoc updated to use the cache; lazy loadChildren kept only as a fallback.
  • Single-round-trip load (was: 1 + N per expanded node).

Validation

  • svelte-check: 0 errors (36 pre-existing a11y warnings)
  • vitest: 60 passed (7 files)
  • cargo test: 13 passed
  • npm run build: ✓

Closes #156.

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
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

⚠️ Review recommended — warnings found.

🟡 Warning (1)

  • unknown:? — Cora AI review could not complete: failed to parse LLM JSON response: parse failed (original: EOF while parsing a value at line 1 column 0, after repair: EOF while parsing a value at line 1 column 0). Review was skipped; no code quality issues were found by the automated check.

Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit d5efaf3 into develop Jul 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Document tree UX — full hierarchy + folder/file distinction (Obsidian/Outline-like)

1 participant