In-project folder browser (FolderTile + breadcrumb, #58/#49)#168
Merged
Conversation
Issue #58/#49. The backend already mirrors a directory tree on import_folder(recursive) and returns folders + folderId per item; this wires the frontend to browse it. - mediaStore: keep the folder tree (was dropping list.folders); refresh now loads items + folders. - MediaPanel: per-level folder navigation driven by the existing uiStore.mediaPanelCurrentFolderId cursor. Renders child folders as FolderTile (lucide Folder, double-click / Enter to enter) above the file cards, a clickable breadcrumb (All / sub… / current) with an up-one-level chevron, and a wired search box that matches names library-wide. Folder nav applies to the Import view; favorites stays flat. Switching main tab or subtab resets the cursor to root. - folderTree.ts: extracted pure helpers (childFolders / folderTrail / normalizeFolderId) with cycle + dangling-parent guards. - i18n: folder breadcrumb / back / empty strings (zh + en). MediaCard drag/ghost (onDragStart/setDraggingMedia) left untouched. Tests: folderTree.test.ts (tree traversal + corrupt-data robustness) and mediaStore.test.ts (items+folders round-trip). pnpm build + pnpm test green (26 files, 189 tests).
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.
CapCut-style folder navigation in the media panel: child folders as FolderTiles (double-click to enter), breadcrumb + up-one-level, grid filtered by current folder. Backend import_folder already mirrors the tree. Frontend-only; new folderTree/mediaStore tests; web 189/189.
robot Generated with Claude Code