Repository navigation
feat(sort): add sorting flyouts and list sort indicators - #2029
Conversation
Keep submenu titles aligned with the main choices and reduce the visual weight of their selected values. Place the List sort control before Refresh with a gap. Refs lgse#1652
Remove the empty indicator slot from plain sort actions as well as choices and submenu titles. Refs lgse#1652
Switch to Unsorted when the checked sort field is selected again, so both primary and flyout choices can be turned off. Refs lgse#1652
Update the action label and its translations in all supported languages. Refs lgse#1652
Allow several choices before dismissing the menu with Escape or an outside click. Keep checkmarks, submenu summaries and default actions current while the menu is open. Refs lgse#1652
Keep name options attached to the requested sort while metadata loads. Resetting to defaults supersedes that request so a late response cannot restore it. Resolve the browser helper import conflict while retaining the back-history updates from main. Refs lgse#1652
Each sort menu build registered a Browser observer, and Browser keeps observers until its tab closes, so every navigation and view rebuild added another closure that ran on every browser event for the life of the tab (the uptime slowdown fixed in lgse#2041). Track mapped menus in a small registry instead and refresh them from the tab's existing event dispatch when a sort finishes or a column reloads. Refs lgse#1652
…epth A sort stays pending after it applies, so once Columns replaced that column with another folder, the next sort, name-order or default action there started from the previous folder's request and saved it for the new folder. Overlay a request only while it is still waiting to apply to the folder it was made for. Refs lgse#1652
Filesystems without birth times (NFS, SFTP) left every listed row's creation time unknown, so a Created sort refilled the whole folder on each load, file by file over the network for remote folders, and a monitored change moved its row ahead of the filled ones. Refs lgse#1652
…efault List Extension and Created with the other fields and show Natural, Alphabetical and Case-sensitive names under a Name order heading, so no choice hides in a flyout that opens over the listing at the window edge. Unsorted has no row: unchecking the active field already turns sorting off. Drop the submenu summaries, their styling and the submenu-only keyboard routing, and rename the QA scenario to match. Refs lgse#1652
Native context menus open with a padded header row, so their contents only pad the bottom; the sort menu opens on a section title, which sat 8px closer to the top edge than its last row did to the bottom. Refs lgse#1652
The test pressed Down 100 ms after switching to Icons and assumed the grid already had several columns. On a loaded CI runner it had not been laid out yet, so Down reached the second tile and the test failed; this also failed lgse#2044's own CI. Wait until Down moves a whole row instead.
GTK 4.22, which CI uses, lays the fixture's tiles out about 450 px wide in a 460 px grid, one per row, where GTK 4.24 fits two. Requiring Down to pass the second tile therefore always failed on CI. Wait for the tiles to be laid out, then use whichever row start Down reaches; with one column Left from the second tile still must not enter the sidebar, and the test still fails on both versions without lgse#2044's fix.
|
@l0gicgate my agent dug into the remaining shard 2 failure in this CI run. Thought this might be useful for your agent to try, if you're still working on it. The timeout is in The unchanged test passed 10/10 isolated runs. Forcing a real The sample below keeps the simulated failure active until the fixture scope ends, and adds the background probe to the existing error cases as regression coverage. With it, the forced race passed 3/3 runs, all five ./scripts/test-headless.py -- a_chosen_folder_is_checked_off_the_ui_thread_while_the_chooser_stays_open --test-threads=1
./scripts/test-headless.py -- ui::browser::transfer::tests::chosen_destination:: --test-threads=1
./scripts/test-headless.py -- adapters::local_operations::probes::tests:: --test-threads=1This is a proof of concept against Sample patch for the agent to trydiff --git i/src/adapters/local_operations/tests/fs_quirks/kinds.rs w/src/adapters/local_operations/tests/fs_quirks/kinds.rs
index 9d9383fc..376ced29 100644
--- i/src/adapters/local_operations/tests/fs_quirks/kinds.rs
+++ w/src/adapters/local_operations/tests/fs_quirks/kinds.rs
@@ -261,6 +261,8 @@ pub(crate) struct Quirks {
pub lost_reply: Vec<(Op, &'static str, Errno)>,
/// Fails the matching call after skipping the given number of matches, once.
pub fail: Vec<(Op, &'static str, usize, Errno)>,
+ /// Fails every matching call until the scope is dropped.
+ pub fail_always: Vec<(Op, &'static str, Errno)>,
/// Runs once, before the matching call after skipping the given number of matches.
pub before: Vec<(Op, &'static str, usize, Racer)>,
/// Runs once, after the matching call after skipping the given number of matches, whether
diff --git i/src/adapters/local_operations/tests/fs_quirks/scope.rs w/src/adapters/local_operations/tests/fs_quirks/scope.rs
index 5df1fcfe..b16ca993 100644
--- i/src/adapters/local_operations/tests/fs_quirks/scope.rs
+++ w/src/adapters/local_operations/tests/fs_quirks/scope.rs
@@ -245,7 +245,14 @@ impl Scope {
if let Some(mut racer) = self.log(call)? {
racer();
}
- let fault = take_due(&mut self.state().quirks.fail, call.op, call.names);
+ let fault = {
+ let mut state = self.state();
+ take_due(&mut state.quirks.fail, call.op, call.names).or_else(|| {
+ state.quirks.fail_always.iter()
+ .find(|(op, pattern, _)| *op == call.op && matches(pattern, call.names))
+ .map(|(_, _, error)| *error)
+ })
+ };
if let Some(errno) = fault {
return Err(errno);
}
diff --git i/src/ui/browser/transfer/tests/chosen_destination.rs w/src/ui/browser/transfer/tests/chosen_destination.rs
index b2f70e07..89539055 100644
--- i/src/ui/browser/transfer/tests/chosen_destination.rs
+++ w/src/ui/browser/transfer/tests/chosen_destination.rs
@@ -322,9 +322,9 @@ impl ChosenFolderCheck {
}
}),
)],
- fail: match self.chosen {
+ fail_always: match self.chosen {
ChosenFolder::Failing(error, _) => {
- vec![(crate::adapters::FsOp::FolderStamp, "destination", 0, error)]
+ vec![(crate::adapters::FsOp::FolderStamp, "destination", error)]
}
ChosenFolder::SlowToAnswer | ChosenFolder::WriteOnly => Vec::new(),
},
@@ -334,6 +334,25 @@ impl ChosenFolderCheck {
(release, checked, scope)
}
+ fn probe_before_accept(&self) {
+ let ChosenFolder::Failing(error, _) = self.chosen else {
+ return;
+ };
+ let answer = Rc::new(RefCell::new(None));
+ let observed = answer.clone();
+ let _probe = crate::services::FileSource::probe_stamp(
+ &crate::adapters::LocalFileSource,
+ Location::local(&self.destination),
+ Rc::new(move |result| { observed.replace(Some(result)); }),
+ );
+ wait_until(|| answer.borrow().is_some(), "a background stamp before destination validation");
+ assert!(match (error, answer.borrow().as_ref()) {
+ (rustix::io::Errno::NOENT, Some(crate::services::StampAnswer::Missing)) => true,
+ (rustix::io::Errno::IO, Some(crate::services::StampAnswer::Unreachable)) => true,
+ _ => false,
+ });
+ }
+
fn last_started(&self) -> Started {
self.view.browser().last_started_operation()
}
@@ -418,6 +437,7 @@ fn a_chosen_folder_is_checked_off_the_ui_thread_while_the_chooser_stays_open() {
let (release, checked, _scope) = check.hold_the_folder_check();
let started = check.last_started();
+ check.probe_before_accept();
confirm_destination(&check.chooser_window);
wait_until( |
…ed check The chosen-folder check failed or held only the first stamp of the folder, which the chooser's own relocation, relist and freshness work could make first under load, so the check succeeded and the chooser closed. Inject into every unforced stamp of the case and pass over forced freshness stamps.
… widths The animated case read the column after a fixed 280 ms, but its ticks wait for frames, which a loaded runner draws late, so the column was still mid-animation. Wait for the column to end at the saved width instead.
Review and cleanupMerged Owner design changes. At the owner's request (lgse), the sort menu no longer uses flyouts:
This replaces the option 3 flyout summaries from #1652. All thirteen catalogs, Review against the description and #1652. The rest of the behaviour is confirmed:
There were no earlier review comments. Fixes pushed
Tests
Validation
Follow-ups outside this PR
CI: all checks pass on |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23A9H1qZrGZGQwUCVmta
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23A9H1qZrGZGQwUCVmta
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23A9H1qZrGZGQwUCVmta
Sync lgse/strata#2029, #2049, #2047, #1973, #2051: sort choices and flat sort menu, entry-menu creation, dialog focus halo, Settings size cap
Description
Adds sort flyouts based on option 3 in #1652. Name, Size, Modified and Type stay at the top. More sorting contains Extension, Created and Unsorted; Name order contains Natural and Alphabetical. Case-sensitive names and Folders first stay visible.
All rows align, including the default-sort actions. Closed submenu rows show their current value on the right in smaller, muted text. Selecting the active sort field again switches to Unsorted.
The menu stays open while options change, so several choices can be applied together. Checkmarks, submenu summaries and default-action visibility update in place. Mouse and keyboard activation both work; Escape or an outside click dismisses the menu. Changes made while a sort is still loading stay together. Reset to default cancels a pending choice, so a late response can't restore it.
In List view, Ctrl+3, Sort sits before Refresh with a gap between them. It shows a label when the visible column headers can't explain the active sort, including non-default Name comparison. Otherwise it stays icon-only. Unsorted has no label or header arrow. Ascending and Descending remain available in the menu for fields without a matching column.
Sort and name-comparison choices follow the existing default and per-folder preferences. The default action is now labelled "Apply as default sort", with translations updated in all thirteen languages.
Settled edge cases:
.tar.gzsorts undergz;.gitignoreand extensionless files have no extension.Random and transliteration are outside this first version. CodeScene was skipped at the owner's explicit request.
Visual evidence
screenrecording-2026-11-02_13-59-05.mp4
How to test
Expected result:
Selections update the same sort state across menus, column headers, shortcuts and saved preferences. The menu remains open through changes. Standard fields clear the More sorting summary; independent Name order settings remain visible. List labels explain sorts that visible headers can't represent, and header arrows appear only on matching fields. Saved choices follow the existing default and per-folder rules.
Related issue
Closes #1652