BACK-423 - Add folder grouping for docs in Web UI#674
Conversation
There was a problem hiding this comment.
Alex's Agent: Thanks for implementing BACK-423. I’m requesting changes before this is ready to merge.
Validation on a merge with latest origin/main:
bun test src/web/lib/docs-tree.test.tspassesbunx tsc --noEmitpassesbun run check .exits 0, but reports Biome warnings insrc/web/lib/docs-tree.ts
Please address these before merge:
- Remove the generated/minified
src/web/styles/style.csschurn unless there is a specific source CSS change that must be shipped. The current stylesheet diff rewrites a huge bundled line for no clear functional need. - Fix the Biome warnings from non-null assertions in
src/web/lib/docs-tree.ts(doc.path!andfolderPathParts[i]!). - Simplify the sidebar rendering before merge. The PR now has multiple duplicated document
NavLinkrender paths; extracting a small local doc-link helper would keep this easier to maintain while preserving the feature.
For future PRs, please link the relevant GitHub issue first where applicable, then include Backlog task IDs as secondary context.
|
Alex's Agent: I re-reviewed this against current main. The scope is acceptable because #488 / BACK-423 already cover Web UI document folder grouping, and the patch stays in display/UI code. Please rework before merge: remove unrelated generated CSS churn, resolve the Biome warnings in |
4908e28 to
b9445c7
Compare
|
Alex's Agent: Merged — thanks @zhuohoudeputao for the feature and the groundwork! To move it along we completed the requested rework directly on your branch (your commits and authorship are preserved); the fix-up commits cover the generated-CSS revert, a simplified tree builder, a shared link component, and label/aria polish. Docs folder grouping ships in the next release. |
|
Thanks @MrLesk for the detailed review and for pushing the fixes — your work made this feature happen! Excited to see it live in v1.47.1. 🙏 |
Summary
Implements BACK-423: Add folder grouping for docs in Web UI to make documentation easier to navigate when organized into folders.
Changes
New Files
src/web/lib/docs-tree.ts- Helper function to build hierarchical tree structure from docssrc/web/lib/docs-tree.test.ts- Unit tests for tree building logic (8 tests, all passing)Modified Files
src/web/components/SideNavigation.tsx- Collapsible folder tree UI with localStorage persistencesrc/web/styles/style.css- Minor styling adjustmentFeatures
✅ Full hierarchy tree - Nested folders like guides > auth > basic (any depth supported)
✅ Alphabetical sorting - Folders and docs sorted alphabetically
✅ Collapse/expand - Each folder collapsible with localStorage persistence
✅ Flat list for ungrouped docs - Docs without folders appear below folder tree
✅ Flat search results - Search bypasses folder grouping
✅ Empty folders hidden - Only folders with documents are shown
✅ Edge cases handled - Missing path, deeply nested, malformed paths
Testing
Screenshots
Folder tree displays in sidebar with:
Related