A copy into a picked folder says where it went, and Show takes you there

The last acceptance criterion M16 had left open. After Copy to..., the snackbar reads 'Copied to AADst' with a Show button; after a move to a picked folder it keeps the undoable message instead, because the sources are gone and Show would lead nowhere.

Two things needed care rather than a string. The action button was hard-wired to undo() - the label was a parameter beside it, which let the two disagree - so UiMessage now carries a MessageAction, and the label follows from it: Undo for an undo, Show for a jump. And a message cannot name a folder from the path alone: a volume root has no name of its own, and internal storage's is 0. The message carries the picked PickerFolder, and the screen resolves its label the way breadcrumbs do - so copying into the root reads 'Copied to Internal storage', which is the case a plain path.name would have got wrong.

Four tests: the message names the destination and offers Show; Show opens it; a paste into the folder on screen still names nothing and offers nothing (its destination is the screen); a move to a picked folder offers Undo. All four driven through the view model, and both snackbar variants checked on the phone, including the volume-root one.

detekt's SpreadOperator baseline entries moved with the expression, so the message building is now a small helper with a deliberate suppression and a reason, and the baseline was regenerated: three obsolete entries removed, none added.
This commit is contained in:
2026-10-17 23:17:03 +02:00
parent 747a6f7784
commit 17078bf613
10 changed files with 219 additions and 26 deletions
+8 -4
View File
@@ -64,8 +64,10 @@ would no longer have.
## The queue after 1.0
Ordered by what it protects, not by what is fun. Nothing here is scheduled; the first two are what a
release should not go out without.
Ordered by what it protects, not by what is fun. **Four of the five items are done** — thumbnails, the
scaling numbers (which turned into progressive listing), Copy to… / Move to…, and the CI benchmark. What is
left is the baseline profile's *measurement*, which needs a physical API 33+ device and cannot be finished
on this machine; everything else in the list says what it produced.
1. **Baseline profile** — **generated and committed**: `app/src/main/baseline-prof.txt` is bundled in the
release APK, written by the `:baselineprofile` module. What remains is its *measurement*: collection
@@ -90,8 +92,10 @@ release should not go out without.
two taps; a move clears it. Conflicts ask the same question as a paste, naming the picked folder. Seven
tests cover the verbs, the picker's walk, folders-only listing, the conflict target, cancellation, and
the selection rule. Driven on the phone for both verbs (see `EDGE_CASE_TESTING.md`), which is what caught
the picker naming internal storage by its raw name `0`. **Not done**: the "copied to X — Show" message
with a jump to the destination; the copy reports itself the way a paste does.
the picker naming internal storage by its raw name `0`. A copy into a picked folder says **"Copied to
<folder>"** and offers **Show**, which opens that folder — the destination's label resolved the way
breadcrumbs are, so a volume root reads *Internal storage* rather than `0`. A move keeps the undoable
message instead, because its sources are gone.
5. **A CI run of the benchmarks on an emulator** — **done**: `.github/workflows/benchmark.yml` runs the four
benchmarks on API 35 (`reactivecircus/android-emulator-runner`, `google_apis`, x86_64, SwiftShader) on
demand and every Monday, installs the app and resets its compilation before instrumenting it, pulls the