diff --git a/CLAUDE.md b/CLAUDE.md index da7165c..c5c8515 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,7 +59,8 @@ There is no hot-reload. Copy the built binary into REAPER's `UserPlugins/` folde - `bank_panel` — docked LICE-drawn grid: thumbnails, audition, multi-select, keyboard navigation. - `persist` — project ext state (`SetProjExtState` / `GetProjExtState`, namespace `"reasampler"`) ↔ `bank_model` JSON + `ViewModeModel` JSON (`"view_state"` key); project-relative path resolution. - `view` — Design View shell: reads the folder tree via `view_tree`, snapshots flag values before parking, drives hide + CPU-park on inactive-mode leaves (`B_SHOWINTCP`/`B_SHOWINMIXER`/`B_MAINSEND`/`I_FXEN` + per-FX offline) and derived visibility on parents; restores from snapshot. Never touches master or `B_MUTE`/`I_SOLO`. -- `actions` — registers the capture/placement/slot action family and routes each to the modules above. +- `track_guid` — shared `MediaTrack*` → canonical GUID-string formatter; single source of truth for membership keys used by both the view shell and the actions layer. +- `actions` — registers the capture/placement/slot action family and the Design View action family (toggle active mode, activate Arrange/Design, tag/untag selected tracks, show-both); routes each to the modules above via the `command_id`/`gaccel`/`hookcommand` contract. ## REAPER extension contract (src/main.cpp) diff --git a/COMPLETED.md b/COMPLETED.md index 83f42ff..3622dc1 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -175,3 +175,28 @@ guessed "on"). - [x] Reapply active mode on project open (rebuild tree, run the planner). - [x] Confirm survival across Save / Save As; snapshot durability across save-while-parked. + +--- + +## D4 — actions +**Goal:** Bindable action set for the mode workflow. CONTEXT.md §Design View +(actions). **Verify (in DAW):** Each action registered (bindable in Actions list); +toggle + mode-jumps MIDI-bindable; tag/untag acts on the current track selection. + +- [x] Toggle active mode (cycle; extensible to cycle-all for >2 modes). +- [x] Activate mode: Arrange / Activate mode: Design (direct jumps). +- [x] Tag selected tracks → Design / → Arrange; Untag selected (= → Arrange). +- [x] Show-both for selected tracks (toggle). +- [x] Register each (`command_id`/`gaccel`/`hookcommand`); toggle + jumps MIDI-bindable. + +**Notes/decisions:** +- New `src/actions.{h,cpp}` — the Design View action family registered via the + `command_id`/`gaccel`/`hookcommand` contract in `main.cpp`; MIDI-bindable. +- New `src/track_guid.{h,cpp}` — shared `MediaTrack*` → canonical GUID-string + formatter; used by both the view shell and the actions layer (single source of + truth for membership keys). +- Wiring: actions drive the D2 view shell and D3-persisted model; saved active mode + is reapplied on project load via a load-signal seam in `persist` (`loadFromProject` + raises it; `main.cpp`'s timer drains it) — `persist` stays model-only. +- A pure `nextModeId` free function added to `view_mode_model` (the N-mode cycle + decision behind "toggle"), unit-tested in the existing `view_mode_model_tests`. diff --git a/PLAN.md b/PLAN.md index a9140d5..cab1e2d 100644 --- a/PLAN.md +++ b/PLAN.md @@ -127,17 +127,6 @@ landed milestone. > spec: **CONTEXT.md §Design View**. Product framing: `docs/product/design-view.md`. > When a point lands, doc-keeper moves it to `COMPLETED.md`. -## D4 — actions -**Goal:** Bindable action set for the mode workflow. CONTEXT.md §Design View -(actions). **Verify (in DAW):** Each action registered (bindable in Actions list); -toggle + mode-jumps MIDI-bindable; tag/untag acts on the current track selection. - -- [ ] Toggle active mode (cycle; extensible to cycle-all for >2 modes). -- [ ] Activate mode: Arrange / Activate mode: Design (direct jumps). -- [ ] Tag selected tracks → Design / → Arrange; Untag selected (= → Arrange). -- [ ] Show-both for selected tracks (toggle). -- [ ] Register each (`command_id`/`gaccel`/`hookcommand`); toggle + jumps MIDI-bindable. - ## D5 — in-window toggle affordance (UI) **Goal:** The segmented mode switch in the ReaSampler / bank_panel window header. CONTEXT.md §Design View (UI). **Verify (in DAW):** Segmented control shows current