feat(ui): sort columns + per-panel filter#67
Merged
Conversation
Both panels gain two controls users coming from any file manager expect:
- **Sort columns**: clicking the Name / Size / Modified column header
sorts by that column ascending; clicking it again flips to descending.
A small ▲ / ▼ glyph marks the active column in accent colour. The
"dirs first → files → symlinks" grouping is preserved (file-manager
convention); the chosen column orders WITHIN each group. Sort state
persists across breadcrumb navigation but resets per panel session.
- **Filter row** between the breadcrumb and the filelist: substring
match (case-insensitive) on the entry name. 150 ms debounce so
typing doesn't thrash. Esc clears, × button clears. Filter does NOT
recurse — it operates on the current view only; finding files
deeper still needs the cross-tree comparison via /api/browse/stats.
Filter resets on directory navigation since a stale filter from
another folder is rarely what the user wants.
Selection semantics under filter:
- "Select all" (header checkbox) toggles only the visible/filtered
entries — selecting hidden entries silently would surprise users.
- Selections made before a filter survive while the filter is active
(the underlying selection list isn't pruned), so toggling the filter
off shows them again.
- allSelected() returns true iff every visible entry is in the
selection.
Pure client-side: no API changes, no Java touched. ~150 lines of
browser.js + index.html + style.css across both panels.
Co-Authored-By: Claude Opus 4.7 (1M context) <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
Two pieces of file-manager UX both panels were missing.
Clickable sort columns
Per-panel filter
A new row between the breadcrumb and the filelist with a text input.
/api/browse/stats, which is a separate feature.Selection semantics under filter
allSelected()Implementation
Pure client-side: ~50 lines in
browser.js(state,displayEntries(),_compareEntries,setSort,clearFilter), header markup tweaks inindex.htmlfor both panels, and.col-sortable/.col-sorted/.panel-filterstyles instyle.css. No API changes, no Java touched.Test plan
mvn compileclean;mvn test -Dtest=ArchitectureTest8/8 pass.🤖 Generated with Claude Code