Skip to content

fix: resolve the P2 bugs from the 1.2.0 release-candidate QA sweep - #2026

Merged
l0gicgate merged 57 commits into
lgse:mainfrom
wmfeht:fix/1998-release-candidate-p2-fixes
Nov 2, 2026
Merged

l0gicgate merged 57 commits into
lgse:mainfrom
wmfeht:fix/1998-release-candidate-p2-fixes

Conversation

@wmfeht

@wmfeht wmfeht commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Stacked on #2025; merge that first. Until then this diff also shows #2025's commits.

Fixes the nine P2 bugs from the 1.2.0 release-candidate QA sweep. Each fix was made and reviewed on its own branch, then merged here.

No user-facing strings changed. Docs updated: keyboard-navigation.md, filesystem-compatibility.md, preview-sandbox.md, architecture.md, testing.md.

Not verified locally:

  • scripts/code-health.sh did not run, because CS_ACCESS_TOKEN was not set. A reviewer checked the new and changed functions against the AGENTS.md limits by hand.
  • The full Rust suite ran (3795 passed) before four small review follow-ups (refactors, a test helper and a docs rewrap). Those were checked with scoped runs. The full QA suite, fmt and clippy ran on the final code.
  • fix(startup): an unresponsive gvfsd still delays the window by about 27 s #2006 was timed on a private session bus with a gvfsd that never answers: the fallback came at about 2.3 s. There was no display, so the window itself was not timed.
  • The new QA scenarios have no measured cost yet.

Visual evidence

N/A. These are keyboard routing, focus, location, file-monitoring and startup-order fixes; the behaviour is described above and in the steps below.

How to test

  1. fix(trash): with a Columns filter open, dismissing the Shift+Delete confirmation returns focus to the wrong row #1998: make box/ with a1.txt to a4.txt and b.md. In Columns, open it, press Ctrl+F, type a, click a3.txt, press Shift+Delete, then Escape, then Down.
  2. fix(location): the breadcrumb and Ctrl+L stay on the mirrored child folder after leaving Columns #1999: in Columns, press Down onto a subfolder so it opens in a child column, then press Ctrl+3 (List). Look at the breadcrumb, then press Ctrl+L.
  3. fix(sidebar): an empty PINNED heading shows when nothing is pinned #2000: launch with a fresh HOME and no gtk-3.0/bookmarks. Look at the sidebar, then toggle the sidebar through rail, hidden and full.
  4. fix(navigation): Menu or Shift+F10 on the Back button opens the context menu instead of the back history #2001: in List, open alpha, press Alt+Up, open beta, press Shift+Tab until Back has focus, then press Shift+F10 (and Menu).
  5. fix(rename): in Columns, Tab after renaming a folder whose child column is open opens no editor on the next item #2002: in Columns, open a folder with delta/, epsilon/ and notes/. Select delta, press F2, type d2 and press Tab. Repeat with Shift+Tab on epsilon.
  6. fix(preview): List and Columns media stepping counts text files named as videos, then gets stuck #2003: make a folder with three real .h264 streams, a real clip.mp4, a text file fake.mp4 and a text file notes.h264. In List (and Columns), preview the first video and press Ctrl+Alt+> repeatedly.
  7. fix(browser): the open folder goes stale when another program renames one of its ancestors #2004: open mon/b/c in List, Icons or Columns. In a terminal, run mv mon/b mon/b2 && echo 2 > mon/b2/c/two.txt.
  8. fix(undo): Ctrl+Z after Move to Trash does nothing while filter results are showing #2005: in Columns or List, filter box/ with Ctrl+F a, focus a result, press Delete, then Ctrl+Z, then Ctrl+Y.
  9. fix(startup): an unresponsive gvfsd still delays the window by about 27 s #2006: start Strata on a private session bus whose org.gtk.vfs.Daemon service never starts (for example, its Exec sleeps).

Expected result:

  1. Focus returns to a3.txt, and Down moves to the next visible result.
  2. The breadcrumb names the folder List shows. Ctrl+L prefills that folder, and Enter does not go into the child.
  3. No PINNED heading, separator or gap at any point. It still appears while dragging files over the sidebar.
  4. The back-history list opens. No context menu opens, and the location doesn't change.
  5. delta becomes d2 and the editor opens on epsilon with its name selected, and the same for Shift+Tab.
  6. The header reads "of 4", stepping visits only the four real videos, and never gets stuck.
  7. The pane follows to mon/b2/c and shows two.txt without F5.
  8. Ctrl+Z restores the trashed file and Ctrl+Y trashes it again. The filter text stays the same.
  9. Strata gives up on GVfs after about 2 s and the window opens on local VFS.

Related issue

Closes #1998
Closes #1999
Closes #2000
Closes #2001
Closes #2002
Closes #2003
Closes #2004
Closes #2005
Closes #2006

wmfeht and others added 30 commits November 1, 2026 23:49
Back restores every column with no cursor. Pressing Left into an
ancestor column then left its cursor empty, and F2, Delete, copy, cut
and duplicate fell back to the folder the *parent* column has open, so
they renamed or trashed the root column's folder instead of the focused
row.

- Left gives a parent column without a cursor the folder it has open, as
  descending into that folder would have left it. A parent still loading
  takes it once listed, through its own load target with no fallback, so
  a folder gone or hidden meanwhile leaves no cursor rather than one on
  an unrelated entry. Any cursor placed meanwhile, reveal or failed load
  cancels it; relocation rebases it and a kept listing clears it. The
  lgse#1437 preferred entry and its fallback are unchanged.
- The "folder you entered" fallback for rename, delete and copy/cut
  applies only when the active column is the deepest one.
- focus_parent, focus_child, select and the cursor moves share one
  place_committed_cursor helper (formerly focus_only).

Fixes lgse#1993
Renaming a Ctrl+F filter result left focus and selection on whichever
result took over its row, so the next Delete trashed a neighbour.

When a rename completes, the stale-result prune finds the old path gone
before the search index lists the new one, drops the result, and the
results fall back to the result now in its slot (List, Icons) or to no
selection (Columns). In Columns, rename labels were also looked up
through the directory listing instead of the result rows, so the
optimistic and restored names landed on the wrong row.

Results now record a rename when it starts, from the inline editor
(Enter or Tab) or the 10xer rename prompt. The prune keeps the renamed
result in place under its new path while the view would show it, and
the first update that lists the new path carries the selection, anchor
and focus over to it; Columns also moves its cursor there. A rename to a
path in another folder is recorded as a move: the result is dropped, not
kept as a phantom, and no remaining result takes its selection, as the
listing does. Failed and abandoned renames forget only their own record,
so a newer rename's record survives. Columns rename labels resolve
through the results, the directory reveal leaves result rows alone, and
the Columns listing-focus fallback over results reuses
focus_results_on_cursor, so focus returns to a refused result after its
error dialog.

Fixes lgse#1994
…rrows

Plain Home, End, Page Up and Page Down move the cursor, selection and
anchor in the model, but in List and Icons GTK's own Shift range origin
stayed at the last arrow position, so a following native Shift+Home,
Shift+End or Shift+arrow extended from there. Move that origin to the
model's anchor after these moves, as restores and Ctrl+click already do.

Columns passed Shift+Home and Shift+End to its GTK list, whose origin its
model-driven arrows never set, so they selected only the edge item.
Extend to the first or last item from the model's anchor there, as its
Shift+arrows and Shift+page keys do.

In List and Icons, plain arrows and their h j k l letters moved GTK's
cursor while the model kept its old anchor, so Shift+Page Up/Down and
Shift+click extended from an earlier item. The dispatcher now runs GTK's
arrow binding for both and anchors the model at the cursor when the move
replaced the selection, not when GTK keeps a range at an edge. It also
cancels a pending click-to-rename, which the browser's own key handler no
longer sees once the dispatcher stops the key; an unmoved letter is still
stopped so it is never typed.

Fixes lgse#1995
With keyboard focus inside a rendered document, PDF, table or archive
preview, Delete moved the previewed file to Trash, Shift+Delete asked to
delete it permanently, Ctrl+D duplicated it, F2/Ctrl+R started renaming
it and Ctrl+Alt+N moved it into a new folder. The guards only exempted
text widgets (lgse#670), so any other preview widget let the default-map
file commands act on the selection behind it.

Check whether focus is anywhere inside the preview drawer, whatever
widget it renders, for these commands, as the clipboard keys already
did. The 10xer map is unchanged: its preview keys hand focus back to the
listing before a file command runs.

Fixes lgse#1996
… cost

Answer the window dispatcher's preview-focus check with PreviewDrawer::owns_focus. The slot, overlay, revealer and resize grip that the old check also accepted are never focusable, so the result is unchanged. Describe what the check tests rather than overclaiming, and leave the new scenario's cost out until it is measured.

Refs lgse#1996
The folder picker stripped "~/" and joined the remainder onto home, so a
remainder starting with "/" (as in "~//x") replaced home with the
filesystem root. Go, copy to and move to then searched and acted outside
home. Trim leading slashes from the remainder so repeated slashes after
"~" collapse as in POSIX paths.

Fixes lgse#1997
Also name the jump-key test helper after what it does, so it no longer shares a name with the video-clip helper.

Refs lgse#1993
The rail sync showed every section heading toggle whenever the sidebar
rebuilt or left the icon rail, including the empty Pinned section that
should appear only while files are dragged over the sidebar. The
first-paint rebuild therefore showed an empty PINNED heading at startup.

The rail sync now reapplies the empty section's drag visibility, which
also keeps its heading hidden in the rail during a drag.

Fixes lgse#2000
In Columns, Tab after renaming a folder whose child column was open
renamed it but opened no editor on the next item. When the rename
landed, relocating the open child column truncated the columns from
that depth, and the truncation cancelled every inline rename, including
the editor Tab had just opened in the retained parent column. The
cursor mirror was blocked by that editor, so the child column and
breadcrumb kept showing the renamed folder.

Truncating columns now cancels only a rename inside the columns it
closes, and Tab mirrors the child column to the item the rename moves
to at once, without a preview, before its editor opens.

Fixes lgse#2002
…result

In Columns with Ctrl+F results showing, dismissing the Shift+Delete
confirmation (Escape or a backdrop click) left focus on the wrong
result, so the next arrow and Delete acted on a file the user did not
pick.

The confirmation returns focus through the window's listing fallback,
focus_rebuilt_active_column. It scrolled to the browser's directory
cursor mapped through the column's listing, then focused the list, but
the results replace those rows and keep their own cursor, so the
directory position landed on an unrelated result row (the top one when
the cursor was on the first file). 0530b01 (lgse#1994) already made that
fallback focus the results on their cursor; this adds the regression
scenario for the delete confirmation in Columns, Icons and List, both
dismissals and the next arrow key, a mutation that removes that
branch, and documents the behaviour.

Fixes lgse#1998
…a drag

Also clarify when sync_empty_pinned_section runs.

Refs lgse#2000
The breadcrumb and the Ctrl+L text followed the deepest column on every
ColumnAdded event and were never resynced on a view switch. After Columns
mirrored a child folder beside the focused column, switching to List or
Icons showed the active (parent) folder while the location bar still
named the child, so Ctrl+L then Enter entered the child unasked.

The location bar now follows one mode-aware rule: the deepest column in
Columns, the active folder in Icons and List. A view switch, an added
column and relocated columns all sync through it.

Fixes lgse#1999
Previous/next audio and video built their sequence from file names and
dropped only files whose metadata probe had answered "not media". List
and Columns never run that probe, so text named like a video (fake.mp4,
notes.h264) was counted and stepped to; its text preview then dropped
the player and stranded media stepping. Icons only agreed because it
probes visible cards.

A file now joins the sequence when its probe found media or, until the
probe reaches it, when its leading bytes back the media name: the same
check the preview makes before choosing a player. Bytes are read off the
GTK thread and cached per file; unread files stay out until they answer,
and the shown player's position and previous/next buttons refresh when
they do. The shown file always anchors its sequence.

Fixes lgse#2003
The window and chooser key handlers run in the capture phase, so they
claimed the context-menu key and opened the pane's context menu before
the focused Back button's own key controller could list its history.
Both now leave the key to a focused Back button that has a history menu.

Cover the keyboard paths in the back-history-dropdown QA scenario and in
the window and chooser keyboard dispatch tests.

Fixes lgse#2001
… show

With a pane filter query active and focus on the results, the search
results stage yielded every key except the arrows, clipboard keys and
Delete straight to GTK, so the window's Undo and Redo handlers never ran
and Ctrl+Z after Move to Trash did nothing. Undo and Redo replay the
operation history rather than act on a selection, so the results no
longer claim them. Ctrl+Z with focus in the filter field stays text
editing.

Fixes lgse#2005
…ancestor

Inotify watches the open folder itself, not its path, so a rename of one
of its ancestors reached no monitor: the pane kept the old path, new
files were queried there and dropped, deletions still applied, and F5
fell back to the nearest existing ancestor of the stale path.

- After each batch of changes, the local directory monitor looks its
  folder up at its path off the main thread and reports the folder's
  removal when it is gone, which feeds the existing departure check.
- find_by_identity now takes the departed folder and searches its
  nearest existing ancestor: the folders in it when the parent remains,
  else the same path below each of them, so a folder carried along by a
  renamed ancestor is found by its identity. The browser follows the
  renamed ancestor, which rebases search indexes and open columns.
- A deeper column's own removal report, which its parent column's
  monitor otherwise covers, now also checks that the first column of the
  watched chain is still where it was, since no open monitor sees a
  rename above it.

A deleted ancestor still deletes the open folder, whose monitor reports
it as before; the lookup then finds nothing and the nearest existing
ancestor is restored.

Fixes lgse#2004
Rename the open folder's parent from outside in Columns, Icons and List,
write a file into the folder, and expect it listed without a refresh;
F5 then reloads the folder at its new path.

Refs lgse#2004
Move the mapped Back button lookup and the per-widget key press into
test_support::widgets, used by the window and chooser regressions, and
document that Menu and Shift+F10 on a focused Back button list the back
history.

Refs lgse#2001
…rename

Both paths now open or close the child column through one helper, the
cursor alone previewing a file. Adds a columns test that closing a
column to the right keeps a rename in the parent column, rates the
Tab-past-open-folder scenario, and qualifies the Tab rename docs for
filtered columns and mirroring turned off.

Refs lgse#2002
The unresponsive-GVfs probe ran after PreferenceManager::shared(), whose
folder-view watch creates a file monitor through g_file_new_for_path and
so GIO's default VFS. With a gvfsd that never answers, that call blocked
for the 25 s D-Bus activation timeout before the 2 s probe could run, and
the window appeared after about 27 s.

Run the probe right after logging starts, before anything asks GIO for
its default VFS, and assert in debug builds that GIO has not loaded its
modules when the probe runs, so every QA launch catches a regression of
this order.

Fixes lgse#2006
Esc, a failed submit and the mount paths refilled the location entry from
the active column, so in Columns with a mirrored child the entry reverted
to the parent while the breadcrumbs named the child, and the next Ctrl+L
prefilled the parent. The entry now restores from the same displayed
folder the breadcrumbs follow. Truncated columns sync through that rule
too, replacing the last caller of the active-column variant.

Fixes lgse#1999
Assert that the isolated launch ran exactly one test, explain a failed GIO check, and loosen the volume-monitor wording now that more start-up work follows the probe.

Refs lgse#2006
Review follow-up for the content check behind media stepping:

- The answer cache is trimmed only at the start of a walk, and never
  forgets the listing being walked; in-flight files are not cached at
  all. Past the cap, a walk no longer wipes its own answers and re-reads
  them forever.
- One cancellable reader per preview reads outward from the shown file
  in growing chunks (the nearest file on each side first) and refreshes
  the position after each chunk that answered. It stops when the
  preview closes, stops showing a player, or starts reading for another
  shown file.
- Reads run as background work through each folder's mount lane, so a
  stalled mount skips them instead of parking workers.
- A failed read is no answer: it is not cached as media and is asked
  again when the shown file changes. The metadata probe keeps trusting
  the name when a read fails.
- The docs no longer claim remote locations and route files are checked
  by content.

Refs lgse#2003
… folder

The right-click hierarchy menu read the active column, so in Columns with
a mirrored child it marked the parent as current and left the child out
while the bar named the child. It now uses the same displayed folder as
the bar.

Fixes lgse#1999
Second review follow-up for the content check behind media stepping:

- A background request is skipped whenever another request is on the
  same mount, not only when it has stalled. Reads now wait 100 ms and
  try again while the mount still answers, and give up only once it
  stalls, times out or fails, so a folder load or the previous reader
  no longer leaves real videos out of the count.
- Each read follows symbolic links through Progress::reach, so a dead
  link target trips only that file's path.
- Answers live in the preview that walks the listing and are trimmed to
  it on every walk, so one window can no longer forget another's
  answers. The global cache and its size cap are gone.
- Reads stop as soon as the preview drops its player, not only after
  the next chunk that answers.

Refs lgse#2003
Review follow-up for the renamed-ancestor fix.

- The look a native monitor takes at its folder's path after each batch
  now runs as background work on the mount's lane, so it is skipped
  while the lane is busy or stalled instead of parking a GLib worker on
  a server that stopped answering.
- The search for a departed folder by its identity runs as an
  interactive request on the lane and never looks into a mount point,
  which cannot be renamed and could hang or trigger an automount.
- start_watch takes the identity the folder's load recorded, so the
  monitor also reports its folder gone when the old path holds another
  folder that the mount's identity rule proves different, as after
  `mv b b2 && mkdir -p b/c`. Mounts that renumber folders prove nothing,
  so only existence counts there. No extra stat is needed.
- The monitor keeps its pending look and aborts it when it is dropped.

Refs lgse#2004
List the post-batch look and the identity search among the lane's
requests, describe them under Folder monitors, note the renumbering-mount
limitation, and re-wrap the keyboard-navigation paragraph.

Refs lgse#2004
wmfeht added 18 commits November 2, 2026 01:29
…n see the rename

Round-three review follow-up for the renamed-ancestor fix.

- The gated live test now holds the first look after its stat, so that
  look finds the folder still in place and only the follow-up look the
  later batches ask for can report the departure.
- Pass a monitor's folder and its departure-look inputs through
  WatchedFolder and DepartureChecks rather than five positional values.
- Say that a renamed ancestor is usually noticed at the next change,
  since a look is skipped while another request holds the lane.

Refs lgse#2004
start_watch had grown to five positional values with the folder identity
added for lgse#2004. The folder it watches (location, include_hidden and
began_on) now travels as a WatchRequest beside DirectoryRequest and
MetadataRequest, which the local adapter also hands its monitor in place
of its own WatchedFolder. No behaviour change.

Refs lgse#2004
# Conflicts:
#	docs/filesystem-compatibility.md
…monitor

connect_monitor had grown to 108 lines, with the departure look nested in
its flush timer. The state a watch's batches share now lives in
MonitorBatches, which ConnectedMonitor holds, and schedule_flush and
pending_key take the flush timer and the pending key out of the change
handler, leaving connect_monitor at 64 lines. No behaviour change.

Refs lgse#2004
Move the focus, press-through and history-menu checks both
context_menu_keys_on_back_list_the_back_history regressions repeated
into test_support::widgets::BackHistoryKey, which takes the window's key
handler as a closure. The chooser case now also checks that no other
menu opens with the history.

Refs lgse#2001
Code-health follow-up, no behaviour change:

- The per-run state (cancellable, limits, given-up folders, busy wait)
  is now a ReadRun whose methods read chunks and folders, so no function
  takes more than four values. The busy-wait rule is a named predicate,
  and the lane job, the per-file read and the folder grouping are small
  functions.
- family_listing hands the content filtering and the read start to a
  new media_sequence.
- The text-named-as-video test uses the shared video_drawer fixture and
  a position_of helper.

Refs lgse#2003
@alexpomsft

Copy link
Copy Markdown

Independent installed-release reproduction for #2006 on ARM64:

  • Strata v1.1.1, official aarch64 release archive, verified against the signed update manifest.
  • Arch Linux ARM, Hyprland/Wayland, GTK 4.24.1, xdg-desktop-portal 1.22.1.
  • Private D-Bus session with only a mock org.gtk.vfs.Daemon activation service (Exec=/usr/bin/sleep 35), disposable XDG configuration/cache/data/runtime, Cairo renderer, accessibility disabled.
  • Wall time measured externally from process launch until Hyprland reports the Strata window; polling adds approximately 50 ms resolution. These are individual engineering samples, not statistical benchmarks.
v1.1.1 launch Window mapped First directory batch observed
Unresponsive mock GVFS daemon 27.320 s 27.376 s
Same setup, GIO_USE_VFS=local GIO_USE_VOLUME_MONITOR=unix diagnostic control 0.173 s 0.230 s

The failing run reports the 25-second GVFS activation timeout before the startup probe can protect it, consistent with preferences initializing GIO too early. The startup-order change in this PR addresses that path. I have not built or timed this PR's binary, so these results verify the released regression, not the fix.

Separately, cold FileManager1.ShowItems activation of the installed v1.1.1 binary on the desktop returned in 0.442 s and mapped its window in 0.466 s. The activated process had GDK_DEBUG=no-portals, confirming the earlier #1811 mitigation is active. This should not be conflated with #2006 or the separate FileChooser cold-activation fix in #2024.

No global VFS/portal overrides were retained, and all mock processes were stopped.

@l0gicgate

Copy link
Copy Markdown
Contributor

Review of this PR in a fresh worktree, merged with the latest main (twice: first 0ca2db7ee, then 87974f7bd, which carries the cargo-deny advisory fix that had turned the "Dependency and spelling policy" job red on main and here). Both merges were clean; the only overlapping file was docs/preview-sandbox.md.

What I checked

  • The fix: resolve the P2 bugs from the 1.2.0 release-candidate QA sweep #2026-only diff (46 commits on top of fix: keep keyboard file commands on the item the user chose #2025) across the nine fixes: the GVfs probe reorder and its child-process guard test, the WatchRequest/post-batch departure look and its lane-bound identity search, the DeeperRemovalReport chain check in Columns, the content-based media sequence (chunked nearest-first reads, busy-mount wait, cancellation), the shared displayed_location rule, the Back-button context-menu key in the browser and the chooser, the retained-column rename on Tab, the undo/redo pass-through over filter results, and the empty Pinned heading re-hide after a rail sync.
  • The 12 touched QA scenarios locally (40 runs, all passed) and the new mutation: filter-result-dialog-focus is caught by dismissed-delete-confirmation-keeps-result-focus/columns.
  • Every test the PR adds has a distinct behavioural owner (input route, lifecycle, filesystem race, lane behaviour); nothing tautological to prune.

Changes pushed

  • 2ec12351d: dropped a handful of comments that only restated the adjacent code (WatchRequest, MonitorBatches, schedule_flush, mirror_entry, four media_content helpers) and moved MP4_BYTES below the imports in video_clips.rs. No behaviour change.
  • Two merge commits from main.

One CI note, not a blocker

The first CI run after the push failed Rust tests shard 0 on chosen_destination::a_chosen_folder_is_checked_off_the_ui_thread_while_the_chooser_stays_open ("copy to a folder that is gone": the chooser never showed Choose an existing folder. within 10 s). The rerun on the final head passed all four shards, and the test passed 10/10 locally plus 6/6 pinned to two CPUs. I could not reproduce it. One mechanism worth keeping in mind: the lane stall rule refuses an Interactive request with TimedOut whenever any other ticket on the same mount has been quiet for 2 s, and this PR adds Background tickets after every monitor batch (report_if_departed) and per preview (media_content). A background ticket that waits in GIO's blocking pool before its closure starts counts as quiet from admission, so under CI load it could mark the mount stalled and change the chooser's error message. If this test flakes again, that is where I would look first.

Local verification

  • cargo fmt --all --check, cargo clippy --all-targets --all-features -- -D warnings: clean on the final tree.
  • Full headless Rust suite before the main merges: 3767 passed, 0 failed, 11 ignored. After the merges: scoped reruns of the merged areas (71 tests) plus the chooser test above.
  • CI on f4fcf90ff: all required jobs green (QA scenarios job is dispatch-only and skipped as usual).

Still stacked on #2025, which this diff includes until it merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment