Repository navigation
The file view's columns sort the folder, of an indexed volume - #245
Merged
Merged
Conversation
ListObjectsRequest has Sort: name, size, modified or type, with - before it for descending, which a volume whose files are indexed lists from its index, as the backend can't, even while work is queued, so its order doesn't change meanwhile. The store sorts by the value, and the key, of the same, after start_after's object's value and key, so paging is the same. A volume whose files aren't indexed, or aren't yet, is ErrNotImplemented. The HTTP API, the client and the CLI have sort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… volume Of a volume whose files are indexed, and ready, File, Format, Size and Modified sort the folder, by the server's listing's sort, when their headers are clicked: File and Format ascending first, and Size and Modified descending. The folder controller's listing passes the sort, and another volume's folder, or a volume which can't be sorted any more, isn't sorted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unsorts it The order which is chosen of a volume is remembered in the browser, as its columns are, and is its folders' order when it's opened again, when it can be sorted. A volume which can't be sorted, for now, isn't, and its order is kept until it can be. Hiding the column it's sorted by sorts it of the first column's order, of the objects' names, which is remembered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved sorting regressions can trigger 501 errors during index upgrades, prematurely close open file panels, and reset the chosen order when returning to the same volume’s root.
3 open issues
What changed in this PR
Adds the file-view UI for server-side folder sorting introduced in #244, addressing the sorting portion of #218 for indexed volumes.
Changes:
- Enables sortable File, Format, Size, and Modified headers with column-specific initial directions.
- Passes sorting through paginated requests and clears it when switching volumes or losing sorting eligibility.
- Adds controller and eligibility tests, plus file-view documentation.
| File | Description |
|---|---|
frontend/test/folder.test.ts |
Tests sort requests, pagination, volume switching, and eligibility. |
frontend/src/volumes/view.ts |
Passes volume sorting eligibility to the file view. |
frontend/src/folder/view.ts |
Configures sortable headers and clears unsupported sorting. |
frontend/src/folder/format.ts |
Defines server sort keys and initial directions. |
frontend/src/folder/controller.ts |
Sends sort parameters and resets sorting across volumes. |
frontend/src/filer/schema.ts |
Adds the sort query field and eligibility helper. |
frontend/README.md |
Documents sortable columns and their behavior. |
Review effort: Balanced
The sorts of a listing of the index have title, of an object's dc:title, a task's rather than the backend's, or else its name, in any case, and kind, of its metadata:kind, or else its media type's major type, when it says what it is, as the web UI shows them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name sorts by the server's title, and Kind by its kind, ascending first, and hiding the column the folder is sorted by sorts it by Name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The last column which is shown can't be hidden, of the settings menu, whose item is disabled, and columns which were all hidden are the defaults. Needs go-server's disabled settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
djthorpe
marked this pull request as draft
November 23, 2026 17:18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…path, and its sort first Sorting by modified is of the seconds since the epoch, to the millisecond, rather than the stored text, whose fractions and offsets aren't in order. A sorted listing of a file's path is the file, alone, of the index, and a path with a / after it is the folder's. A sort which isn't one is a bad request, before a volume which isn't indexed is said to be unable to sort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
djthorpe
marked this pull request as ready for review
November 23, 2026 17:25
… and sorting keeps the panel open A volume's index has sortable, of whether its files are indexed, of its last scan which finished, so a volume whose index is raised to its files isn't sortable until they're scanned, as the server checks, and the web UI's headers are sortable of it. The folder controller keeps the volume which was last opened, so a volume whose root is found, which closes its folder, is still sorted. A file's panel isn't closed while its folder is loaded again, such as once it's sorted. 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.

Refs #218. Stacked on #244 (server-side sort), merged in. Needs
@mutablelogic/go-serverv1.8.31 (mutablelogic/go-server#242), whichfrontend/package.jsonnow requires. This is the UI half: clicking a column header sorts the folder, for volumes whose files are indexed.Which volumes:
volumeSortable(volume)is true when the volume's index mode includes files (objects,metadataorartwork) and its status isready. A rescan of a ready index staysready, so sorting keeps working through rescans.Which columns:
titlenamekindtypesizemodifiedEvery column can be sorted.
How
gs-tablesorts on header clicks once a column hassortandsortFirst. Clicking callsListController.setSort, which reloads from the top.FolderController'slist()passes the sort assort=-sizeand so on, still paging bystart_afterfrom the last loaded file.localStorage(gf-file-view-sort:<volume>), next to the columns. Opening a volume restores its sort when the volume is sortable, otherwise it isn't sorted.FolderController.unsorted). Only sorts the user picks are saved.TableSetting.disabled). A saved "all hidden" falls back to the defaults.refresh()again, which would load the first page twice.