ux: drop last-reference confirm from sample remove; silent remove via undo (R-B)
This commit is contained in:
@@ -95,14 +95,13 @@ the bytes survive on disk until an explicit prune. So the recovery story is: an
|
||||
accidental remove loses the *index entry*, not the audio. But there are two
|
||||
sharpnesses to guard:
|
||||
|
||||
- **Last-reference remove is the orphan-maker.** Removing a sample that exists in
|
||||
only one bank orphans its file (until prune). This is the same footgun as
|
||||
non-empty delete-bank, and it deserves the same treatment: **confirm when the
|
||||
remove drops the last index reference** ("Remove 'kick_03'? It is in no other
|
||||
bank — its file will remain on disk until pruned."). A remove of a sample that
|
||||
still lives in another bank is cheap and reversible-in-spirit (re-copy it back)
|
||||
and need not confirm. This makes the confirmation *earned* by actual risk rather
|
||||
than fired on every remove.
|
||||
- **Removes are silent — no confirm dialog.** Recoverability is provided by the
|
||||
batched REAPER undo (R-B): one Ctrl-Z restores the index entry. A last-reference
|
||||
remove does orphan the file (no other bank holds it), but the file stays on disk
|
||||
until an explicit prune — remove never deletes bytes. The undo path makes the
|
||||
confirm unnecessary; the file-safety guarantee (orphaned-until-prune) remains
|
||||
unchanged. `hashReferencedElsewhere` is a tested model API retained for Phase R
|
||||
prune; it has no shell caller in the remove path.
|
||||
- **Undo.** REAPER's own undo stack does not natively cover ext-state index
|
||||
mutations, so this is a Phase-B-wide decision (fork R-B, **settled**): bank/index
|
||||
mutations integrate into REAPER's undo system as **batched undo points**
|
||||
@@ -361,4 +360,4 @@ settled spec (explicitly out of scope). A periodic/background sweep remains reje
|
||||
| Deletes bytes? | no | no | **yes (only op that does)** |
|
||||
| Produces orphans? | yes (last-ref) | yes (non-empty) | — (it *reclaims* them) |
|
||||
| Reversible? | Ctrl-Z (batched undo, R-B) / re-capture | Ctrl-Z (batched undo, R-B) / re-create | **no in-app** (recoverable via OS trash, R-C) |
|
||||
| Guardrail | confirm on last-ref | confirm on non-empty | dry-run + manifest confirm |
|
||||
| Guardrail | silent (Ctrl-Z restores; files never deleted by remove) | confirm on non-empty | dry-run + manifest confirm |
|
||||
|
||||
Reference in New Issue
Block a user