Repository navigation
fix(browser): preserve replaced rows and rename navigation - #1890
Conversation
Preserve an upsert followed by a same-path departure so the existing metadata lookup resolves the final state. An exchange can report both events while the replacement remains on disk; genuine deletions still produce a removal. Cover the real exchange monitor sequence and the no-Trash copy/Replace UI flow without adding operation-specific refresh logic. Refs #1858
Seed GTK's native cursor through the existing collection focus helper while a renamed row is being rebound. Reject deferred cursor restores after a newer logical cursor or source position supersedes them, instead of moving focus back after the next arrow key. Reuse borrowed column entries for rename reveal lookup rather than cloning every scanned entry on each frame. Extend the existing QA owner to verify continued navigation and stable focus. Refs #1858
A loaded renderer can finish playback before QA observes its transient playing state. Accept either active playback or verified progress to the endpoint, and do not require one particular intermediate distance sample. Resume near-end playback from 90% and wait for both plots to show that position, so a no-op command cannot satisfy the completion check. Keep the endpoint assertions without sleeps or longer timeouts. Refs #1858
The native fixture can dispatch Tab before GTK has painted the new empty-directory page, so its native Tab traversal skips the focus surface. Wait on the frame clock's after-paint signal rather than adding a delay or a geometry assertion. Refs #1858
Implementation and validation handoffThe owner expanded #1858 to include the pre-existing rename/navigation failure, related concrete edge cases, reuse/no-duplication, performance, and before/after captures. All work stays on this branch/PR. Architecture and implementation: the replacement fix stays in the shared monitor coalescer and reuses the existing asynchronous entry lookup; no per-operation reload or view-specific replacement implementation was added. The rename repair reuses collection scrolling and listing focus-ownership checks. The existing deferred-focus helper now rejects a request if its captured depth/source/location is no longer the current cursor. The reveal lookup uses the existing borrowed-column accessor rather than cloning every scanned entry. Regression quality: the real monitor test exchanges a file through a hidden directory and covers a subsequent genuine deletion. The new no-Trash QA case asserts both disk contents/source preservation and row visibility. The existing committed-rename scenario now also verifies stable focus after the first arrow and continued movement on the second. Existing playback checks verify progress/endpoint completion rather than requiring a transient frame to be observed. The native empty-pane fixture waits for its first after-paint signal, not a sleep or geometry assertion. Final scoped Rust validation: each command below ran a nonzero selection on private Xvfb/private D-Bus via The isolated Final pinned rootless-Podman QA selection: ./scripts/qa.sh committed-rename-stays-visible replace-without-trash-keeps-row route-preview-shows-offline-track-and-elevation refresh-reconciles-external-changes control-click-sets-shift-anchor rename-and-undo-restores rename-commits-on-enter window-accelerators-leave-rename empty-directory-focus-and-tab-orderResult: 22 passed, 0 failed, covering Columns/List/Icons input, live changes/reloads, rename/undo, editor focus, empty-pane tab order, and playback. The three core scenarios also passed three consecutive scoped runs before the final caller selection. The replacement and stale-focus assertions were observed failing before their respective fixes. Pre-push checks: Preserved earlier full runs / intentional scope: the full pinned Performance evidence: in the pinned unoptimized QA build, a 12,000-file rename probe measured missing-target reveal lookups at 8,161–8,175 µs with per-entry clones versus 2,448–4,883 µs with the borrowed-entry lookup. This is a localized sample, not an overall application or release benchmark. The temporary large fixture and instrumentation were removed. Visual-capture override: the owner's explicit request to take before/after images overrides the normal no-PR-capture default for this task. Four screenshots were captured/reviewed locally under Optional QA-quality grading: self-review retained the existing rename scenario rating 3/4/4/3 = 45. An independent Haiku CLI grading attempt timed out during tool startup; no independent grading is claimed as passed. |
Description
Keep files visible after Replace on a filesystem without Trash by reconciling same-path arrival/departure events through the existing entry lookup.
Also fix the requested rename/navigation edge case: seed GTK's cursor while a row rebinds and ignore deferred focus requests superseded by newer input. Reuse borrowed entries for the reveal lookup instead of cloning each entry. Extend the existing regressions and make playback/frame-readiness checks tolerate completed work between observations.
Visual evidence
Before:
rename-before.mp4
replace-before.mp4
After:
rename-after.mp4
replace-after.mp4
How to test
/dev/shm; confirmgio info -a access::can-trashreportsFALSE). Choose Replace without refreshing.Expected result: The replacement contents are correct and its row stays visible without F5. After renaming, each Down advances selection and focus to the next file; a delayed callback does not move focus back.
Related issue
Closes #1858