Repository navigation
feat(admin): folder tree picker for Add Library - #1003
Merged
Merged
Conversation
A folder the server can see but not list answered "Server Error" with a logged traceback; it is now a 400 "Permission denied" keyed to the path. Folders sort ignoring case, so dc sorts next to DC, and the listing names its parent folder (null at a filesystem root). ".." stays for the current picker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Experiment. A VTreeview rooted at the server's default folder replaces the combobox picker: one click chooses and opens a folder, a Parent folder button climbs while keeping what was loaded, Enter on a typed path re-roots there, and Show Hidden Folders refetches. Folders an existing library covers are disabled and say so. Nothing is chosen on open, since the default folder is the newest library's parent. Past 200 children the rest collapse into a "type the path" leaf, which keeps a 5,000-folder directory opening in about 0.6s. The old picker stays until the go/no-go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Toggling it re-rooted the tree at the chosen folder, collapsing everything above and beside it. It now refetches the root and each open folder with the new setting and keeps them open; a closed folder lists with the new setting when it is opened. Hiding never hides the way to the chosen folder, so unchecking it deep inside .claude keeps the open branch down to the choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The folder tree replaces it. With it go the store's folderPicker state, loadFolders and clearFolders, and the server's ".." entry: the tree climbs with parentFolder instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The Add Library dialog's combobox folder picker becomes a
VTreeviewrooted at the server's default folder.AdminFolderListView): a folder the server can see but not list answered "Server Error" with a logged traceback; it is now a 400 "Permission denied" keyed topath. Folders sort ignoring case, and the listing gainsparentFolder(null at a filesystem root) in place of the..entry.server-folder-tree.vue): one click chooses and opens a folder and lazy-loads its children; Parent folder climbs while keeping what was already loaded; Enter on a typed path re-roots there; a bad path shows the server's reason under the field. Folders an existing library covers are disabled with a bookshelf icon and say why. Nothing is chosen on open, because the default folder is the newest library's parent and always failed validation.server-folder-picker.vue, the store'sfolderPicker/loadFolders/clearFolders, and the server's..entry.Test plan
server-folder-tree(13 cases: default root, lazy load, leaves, cap, library nodes, choosing, Enter, bad path, Parent, Show Hidden in place and keeping the chosen branch, node-load errors); backendtest_admin_folder_list(casefold order, hidden folders,parentFolder, null at/, permission error shape).make lint,make ty,make test-frontend,make build-frontend,make testpass.🤖 Generated with Claude Code