Make Copy to… and Cut to… the selection bar's actions
verify / gate (push) Has been cancelled
verify / release (push) Has been cancelled

The selection bar offered Copy and Move, which only filled an in-app clipboard; the
destination picker then lived behind an overflow menu, and Paste in the top bar. That
made a copy a two-step detour through another folder - the thing M16's picker exists to
avoid.

- The bar's two verbs are now Copy to… and Cut to…, both opening the destination picker.
- The clipboard state, Paste here, and the overflow's duplicate Copy to… / Move to… are
  removed. The picker's cut title and confirm are Cut to… / Cut here.
- A copy still keeps the selection for a second destination; a cut clears it. Conflicts
  still ask before overwriting, naming the picked folder.
- Five clipboard tests are removed; the mark, restart and undo tests now use the picker.
  BrowserTopBar's search and overflow sections are extracted so its two new detekt
  findings are fixed rather than baselined.

Driven on the Xiaomi phone: Copy to… copied 120 x 16 MB through Internal storage ->
AADemo -> Target and reported Copied 121 items to Target; Cut to… moved file001.bin and
offered Undo; a name in the way raised Items already exist here; the top-bar overflow
has no Paste. The foreground-service video was re-recorded against the new bar at 16.1 s.

Verified: ./tools/verify.sh green, the code map current, 426 unit tests pass, and the
video decodes as H.264 1080x2400 with no audio.
This commit is contained in:
2026-10-18 15:07:35 +02:00
parent f9305d1070
commit ddcd68b4b7
23 changed files with 322 additions and 417 deletions
+18 -1
View File
@@ -64,7 +64,7 @@ track to report back.
| Predictive back | **Correct.** `BACK` from inside a folder returns to the root and the activity stays resumed, so the `BackHandler` composed after the overlay branch works under the `OnBackInvoked` dispatcher too. |
| Permission request | **Broke, fixed.** On the shipped build Android 13+ was asked for nothing at all; see below. |
| The progress notification | **Fixed, then verified.** After the fix, a real 220 MB copy posts notification `1001` on channel `file-operations` with `ONGOING_EVENT\|NO_CLEAR\|FOREGROUND_SERVICE` and `category=progress`, then removes it and stops the service when the copy finishes. Before the fix the app's notification importance was `NONE`. |
| Copy to completion | The staged copy landed at `/sdcard/bigfile.bin`, byte-count identical, via the overflow menu's "Paste here". |
| Copy to completion | The staged copy landed at `/sdcard/bigfile.bin`, byte-count identical, via the then-current "Paste here" (the clipboard flow that has since become Copy to… / Cut to…). |
| Compress and extract from the UI | **Found a bug, fixed.** Long-pressing a folder and choosing "Compress to ZIP" produced a `tocompress.zip` that the host's `unzip` read back with the right relative paths and contents. Selecting that `.zip` then exposed the selection bar clipping its own actions — see below. |
| One archive of **every** supported format | **Found a bug, fixed.** A real `.zip`, `.7z`, `.tar`, `.tar.gz`, `.tar.bz2`, `.txt.xz`, `.txt.gz` and `.txt.bz2` were built on the host and all eight extracted through the UI. Each landed with the right entry names and byte-for-byte content — except `.tar.bz2`, which produced a bare `.tar`, recorded below. |
| Long-press from adb | `input swipe x y x y 700` on a single point *did* open the selection bar and reach Copy. The same gesture has been flaky on the MIUI phone, so it still deserves a manual pass. |
@@ -342,6 +342,23 @@ ran inside the search's own job, which is replaced on every letter) and the next
first folder, so the row read a fresh, small number every time. The walk finished on the last sample and
stamped the volume, which is what makes the *next* search cheap instead of another walk.
## The Copy to… / Cut to… session
The selection bar's clipboard was replaced by **Copy to…** and **Cut to…**, both opening the destination
picker. Driven on the Xiaomi phone (release build, Android 12), against `AADemo`:
| What | Result |
|---|---|
| The bar | **Copy to…** and **Cut to…** only — no Copy/Move labels, and no destination items in its overflow. |
| Copy to… | `Source` → picker (`Internal storage → AADemo → Target`) → **Copy here**: 120 × 16 MB copied; **Copying files** in the shade; completion **Copied 121 items to Target** with **Show**. |
| Cut to… | `file001.bin` → the same picker, titled **Cut to…** with **Cut here**: moved to `Target`; the source count fell from 120 to 119; the selection cleared and **Undo** was offered. |
| A name in the way | Cutting `Source` into a `Target` that already held one raised **Items already exist here**, with Replace / Skip / Cancel / Keep both; Cancel moved nothing. |
| Paste | The top-bar overflow lists Find duplicates, Storage usage, Trash and Refresh — no **Paste here**. |
The copy was recorded as the foreground-service video ([FGS_VIDEO](FGS_VIDEO.md)). Not repeated here:
the SAF-mode picker (the same dialog, but the granted-tree root was not driven), tablet/landscape layout,
and a cut interrupted mid-batch.
## Not verified, and why
- **Long-press multi-select via adb: it works, but not every time.** `input swipe x y x y 900`