feat: recursive subfolder filtering + gallery tree navigation#140
Merged
vitosans merged 3 commits intoApr 27, 2026
Merged
Conversation
…nail sizing - Recursive subfolder filtering: selecting an intermediate folder shows all child images - Gallery tree navigation panel with collapsible folder hierarchy (sticky, resizable) - Thumbnail size controls (S/M/L) for adjustable grid density - Fix path collision when multiple gallery roots share overlapping relative paths - Fix auto-detect mode collapsing nested folders to ambiguous basenames - Security test suite for path traversal edge cases Addresses feedback from ComfyAssets#126. Fixes code review items P1/P2 from ComfyAssets#135. Co-Authored-By: Kai Bowie <kaigtb@proton.me>
Contributor
|
Can you fix the linting errors? Also I will be traveling for the next few days will be checking remote. |
Contributor
Author
|
Thanks for the quick review! I'll fix the linting errors and push an update. Safe travels — no rush on the review. -kai |
Contributor
Author
Contributor
Author
|
Hey @vitosans — quick heads up, filed #142 for a minor UX issue: the scan dialog says "Only images with ComfyUI metadata will be processed" but the code also supports A1111/Reforge Happy to include the fix in this PR if you'd prefer to keep it bundled. Let us know! 🐾 |
…omfyAssets#126) - Add collapsible folder tree sidebar to gallery view - Support hierarchical year/month/date folder navigation - Include ancestor path expansion for proper tree structure - Add subfolder filtering to gallery image queries - Update admin subfolder dropdown with ancestor support - Fix trailing whitespace in SQL queries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Sorry, just touched down today. Did not have access while I was out. |
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
2025/08/) shows all images in child foldersChanges
Backend
database/operations.py: Addedinclude_ancestorsparameter toget_prompt_subfolders()— generates all intermediate path segments for tree renderingpy/api/prompts.py:/subfoldersendpoint accepts?include_ancestors=truepy/api/images.py:/gallery/subfoldersendpoint also accepts?include_ancestors=true;serve_output_imageaccepts optional?root=Nfor future multi-root disambiguation; auto-detect mode preserves full folder paths instead of collapsing to basenamesFrontend
web/js/admin.js: Subfolder dropdown requests hierarchical data and renders with indentationweb/js/gallery.js: Folder tree panel (collapsible, sticky, resizable), subfolder filtering on image grid, S/M/L thumbnail size buttons using inline grid-template-columnsweb/gallery.html: Split-pane layout with independently-scrolling folder tree and image gridTests
tests/test_lora_database.py: 3 new tests forinclude_ancestorsbehaviortests/test_path_security.py: 12 new tests covering symlink escape, path traversal, null bytes, and root index validationTest plan
Addresses feedback from #126 (subfolder filtering + gallery navigation).
Fixes code review items P1 and P2 from #135.