fix(banks): enforce unique bank display names in-model + B3 review minors
This commit is contained in:
+10
-2
@@ -547,7 +547,13 @@ arrange; the only change is *which* index the entry lands in.
|
||||
display name, ordinal, BankIndex }`. **`BankIndex` is untouched** — the multi-bank
|
||||
layer wraps it, it does not modify it (additive; no `bank-id` field on `Sample`).
|
||||
Bank id is the stable key (GUID-style, minted on bank create); display name and
|
||||
ordinal are mutable (rename / reorder). The pool is the first, seeded, fixed-id
|
||||
ordinal are mutable (rename / reorder). **Display names are unique**, enforced in the
|
||||
pure model on create and rename: `createBank` / `renameBank` reject a name that
|
||||
duplicates an existing bank's (renaming a bank to its own current name is a no-op
|
||||
success). The comparison is **trimmed + case-insensitive (ASCII)**, so "Drums",
|
||||
"drums", and " Drums " cannot coexist; the pool's reserved name "Pool" is protected
|
||||
by the same check. Uniqueness makes by-name resolution in the action shell
|
||||
unambiguous by construction. The pool is the first, seeded, fixed-id
|
||||
member. `bank_book` is the mirror of `bank_model` and `view_mode_model`: pure, no
|
||||
REAPER types, unit-tested outside the DAW, JSON round-trip.
|
||||
- **Active bank lives in the model, routes through the capture path.** `bank_book`
|
||||
@@ -637,7 +643,9 @@ Pure (no REAPER types, unit-tested — the mirror of `bank_model` / `view_mode_m
|
||||
- `bank_book` — ordered bank registry (`{ bank id, display name, ordinal,
|
||||
BankIndex }`); pool seeded with fixed id + name; create / rename / reorder /
|
||||
delete named banks (pool-privilege rules enforced here: reject delete/rename of
|
||||
pool; delete drops member index entries); **evacuate** a bank (move every member to
|
||||
pool; delete drops member index entries; **display names unique** — create/rename
|
||||
reject a name that duplicates another bank's, trimmed + case-insensitive, "Pool"
|
||||
protected); **evacuate** a bank (move every member to
|
||||
the pool, index-only, destination-collapse observed; pool cannot be evacuated);
|
||||
active-bank id (get/set, defaults to pool); **move** and **copy** a sample between
|
||||
banks (index-only, destination-collapse observed); query a bank's index; JSON
|
||||
|
||||
Reference in New Issue
Block a user