Wiki Sidebar — Page Tree Navigation

Left-hand sidebar (200px) added to the wiki reading layout (desktop only, hides at <1100px).

Behaviour

  • Groups all pages by path prefix (e.g. engineering/ → folder arrow ▸ engineering/, children indented)
  • Top-level pages (no / in path) shown directly
  • Active page highlighted: lime accent colour + 2px left border + --color-accent-dim background
  • Pages sorted alphabetically by prefix

Data

Reuses the same useQuery({ queryKey: ['pages'], queryFn: fetchPages }) as PageList.tsx.
TanStack Query shares the cache — no extra network request when navigating between wiki pages.

Limitations

  • No click-to-collapse for folders (shows all pages always). Add virtual scroll or collapse in a follow-up if page counts get large.
  • Limited to 40 items practical before overflow; consider capping with a "show all →" link for large wikis.

Edit mode

Sidebar is hidden in edit mode — WikiPageView returns the full-width editor directly, sidebar never mounts.

Files

  • web/src/components/organisms/WikiSidebar.tsx — component
  • web/src/app/globals.css.wiki-sidebar, .wiki-sidebar__*, .wiki-reading-layout CSS
  • web/src/components/organisms/WikiPageView.tsx — wired as first grid column in reading mode

See also: wiki-gutter