Repository navigation
Conversation
ui/picker.qml sat at exactly its recorded 635-line ceiling, so the sort header the chooser is missing had nowhere to go. The footer is the one block in the window that is presentation alone: it reads the picker and changes nothing. It takes `picker` the way its sibling components do, and snapshot() reads the hint text from the component instead of the Text. No behaviour change; the existing picker checks are the net. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The chooser drew no column header, so a user whose window was sorted by size got a chooser sorted by size with nothing to say so and no way to change it. Sorting already existed end to end: the s and S bindings resolve in the listing context, Header.qml emits sortRequested, and the backend's sort command reorders the listing it holds. The chooser was the one surface that never connected to any of it. ui/PickerHeader.qml is Header.qml over the chooser's columns, and Header.qml takes the leadingSlot and compactDate pair Row.qml already takes, both defaulting to the window's geometry. The column, next and reverse decisions in ui/js/Sort.js are now pure functions the pane and the chooser share; the chooser offers Picker.SORT_ORDERS, which leaves out the hidden Kind column. requestSort in ui/picker.qml sends sort and asks for the first window. The folder is not read again, so marks and a save review are untouched, and the choice rides later listings through preserveSort without being written to ui.json. win.sortable is the single condition the header and the keys both read. Its listingFailed clause matters: a refused scan leaves the backend holding the previous folder while the chooser's path has moved, and with the clause removed a sort was observed drawing the previous folder's rows under the refused path, which is the path marks are built from. tests/js/picker.js covers the decisions. tests/picker-native.py gains a sorting group for clicks, keys, marks, refresh, the refused folder, Recent, the scrolled viewport and Save; it needs omarchy-drive and has not been run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s from name Review of the sorting change found three things worth repairing. listingFailed was set in onFailed's catch-all, so a statefile, read or state error would have disabled sorting over a listing that arrived fine. It is now set only where a scan or sort failure has left no listing for this path. preserveSort is declared on the chooser's Backend, the way ui/shell.qml declares it, instead of being switched on by the first sort. The saved order still seeds the first listing; after that the header's mark can only move when the chooser itself reorders. tests/picker-native.py sorting left ui.json seeded with kind for its second and third requests, whose expectations start from name, so both would have timed out on first run. The seed is removed once the byte-for-byte check has read it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
Preview read and approved; closing. The upstream PR carries this description. |
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.
The gap
Since thisisgm#134 the file chooser opens in the window's saved order, which is right. But it draws no column header, so a window sorted by Modified gives a chooser sorted by Modified with nothing on screen to say so and no way to change it.
Everything needed already exists:
s/Sresolve in thelistingcontext,Header.qmlemitssortRequested, and the backend'ssortcommand reorders the listing it holds. The chooser was the one surface connected to none of it. No Rust, protocol or keymap changes.main)Same folder, same saved order, same window size. After two clicks on Size, with a file checked beforehand:
Behaviour
ssteps Name → Size → Modified,Sreverses. The mark moves on the click, pertests/js/sort.js.Picker.SORT_ORDERS(name, size, mtime): Kind is inHIDDEN_COLS, and an order no header can mark has no feedback. A savedkindorder is still inherited, andSstill reverses it.ui.json.filter_listingruns before ordering inrun.rs, sosortreorders the already-filtered listing.s/Styped into the Save filename field are text.Three commits, separable
refactor:footer →ui/PickerFooter.qml.ui/picker.qmlsat at exactly its recorded 635 intools/flea-file-budget, so the header had nowhere to go. The footer is the one block there that only reads the picker. No behaviour change. If you would rather cut that file differently, the feature commit does not depend on how the room was made. The ledger entry is not raised; the file ends at 635.feat:ui/PickerHeader.qmlisHeader.qmlover the chooser's columns;Header.qmlgainsleadingSlotandcompactDate, the pairRow.qmlalready takes, defaulting to the window's geometry. The column / next / reverse decisions inui/js/Sort.jsbecome pure functions the pane and the chooser share, so a new backend sort key still changes one file.requestSortinui/picker.qmlis the one way in.fix:review repairs: see below.The one clause worth reading
win.sortableis the single condition the header and the keys both obey. ItslistingFailedclause is there because a refusedlistdeliberately leaves the backend holding the previous folder, while the chooser's path has already moved and its state readsempty. With the clause removed I observedsin a mode-000 folder drawing the parent's rows under the refused path, which is the pathPicker.rowPathbuilds marks and returned URIs from. A rescan never had this problem; it is the one question that choosingsortover a re-read opens, so the sort route closes it.Verification
Run:
tests/js.sh: new decision cases intests/js/picker.js, red first, then green.tests/js/sort.jspasses unchanged../tests/run-all.sh: the same pass/fail set asv0.3.1on my box (the suites that fail there need the media fixture,python-gobjectunder my Python, or a display, and fail identically on pristinemain).tools/flea-file-budgetexit 0.tools/flea-qmllint-gate: gated categories identical tov0.3.1; only the ungatedmissing-propertycontext count moved, 1680 → 1683.makepkgcheck()passes; the package is installed here and was driven through the real portal withomarchy-file-select.wtypeand clicks by a real pointer (ydotool), state read fromfleapicker snapshot, against a fixture whose name, size and modified orders are three different orders: every header click, thescycle and wrap,S, an inherited order, a mark surviving reorders, the hidden toggle, into a subfolder and back, the refused folder, Recent, and typing in the Save field.v0.3.1at the same width, single- and dual-pane: identical.Not run:
tests/picker-native.py sortinghas never been executed. It needsomarchy-drive, which I do not have. It is written against the harness's existing helpers and compiles; one bug in it was already found by reading and fixed in the third commit. Please treat it as unproven until it has run on your box, and I am glad to fix whatever it turns up.Known trade-offs
s/S. Those strings are the board's, so I left them alone.Header.qmlmeans the chooser instantiates its search strip, never visible here, and a right-click signal with no listener.Heads-up
thisisgm#175 also edits
ui/picker.qml. This branch leaves that file at exactly 635, so whichever lands second will need to re-solve the ceiling.🤖 Generated with Claude Code