diff --git a/CLAUDE.md b/CLAUDE.md index c5c8515..821032c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,7 @@ Vendors two submodules (see `.gitmodules`): cmake --build build ctest --test-dir build -Six targets: +Seven targets: | Target | Kind | Purpose | |---|---|---| @@ -31,6 +31,7 @@ Six targets: | `capture_paths_tests` | executable | Pure unit tests for `capture_paths` — no REAPER, no DAW. | | `view_mode_model_tests` | executable | Pure unit tests for `view_mode_model` — no REAPER, no DAW. | | `view_tree_tests` | executable | Pure unit tests for `view_tree` — no REAPER, no DAW. | +| `mode_switch_tests` | executable | Pure unit tests for `mode_switch` — no REAPER, no DAW. | | `reaper_reasampler` | loadable module | The actual extension binary (`.dll` / `.dylib` / `.so`). | ### macOS / Linux: SWELL dialog resources @@ -52,6 +53,7 @@ There is no hot-reload. Copy the built binary into REAPER's `UserPlugins/` folde - `peaks` — waveform min/max bin computation from raw PCM. Fed a known signal, asserts envelope. Does not depend on REAPER's peak API. - `view_mode_model` — Design View mode system: mode registry, GUID-keyed membership, folder-tree-aware visibility derivation, snapshot-based park/restore planner, JSON round-trip. Mirror of `bank_model` for the Design View phase. - `view_tree` — pure `I_FOLDERDEPTH`→FolderTree helper for the Design View shell; no REAPER types at the boundary. +- `mode_switch` — REAPER-free segment layout + hit-test math for the bank_panel's Design View mode switch; divides a header rectangle into N equal segments and hit-tests a point to a segment. Mirror of `bank_grid`. **REAPER-facing shells:** - `capture` — `ICaptureBackend` interface; `OfflineRenderBackend` (deterministic default) and `RealtimeRecordBackend`. Input: `CaptureRequest`. Output: finished file + populated `Sample` handed to `bank_model`. diff --git a/COMPLETED.md b/COMPLETED.md index db0f4c4..e796d2f 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -239,6 +239,28 @@ toggle + mode-jumps MIDI-bindable; tag/untag acts on the current track selection --- +## 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 +mode (lit segment), one click flips modes via the D4 toggle action, per-mode +membership count visible, offlined-FX caveat surfaced as a tooltip. + +- [x] Segmented mode switch `[ Arrange | Design ]` in the window header; active lit. +- [x] Wire the switch to the toggle/activate actions from D4. +- [x] Per-mode membership count display. +- [x] Offlined-FX re-init caveat as a tooltip on the switch. + +**Notes/decisions:** +- New PURE module `src/mode_switch.{h,cpp}` — REAPER-free layout math for the + Design View mode switch: divides a header rectangle into N equal segments (one per + registered mode) and hit-tests a point to a segment. Unit-tested via a new + `mode_switch_tests` CTest target. Mirror of `bank_grid`. +- `src/bank_panel.cpp` — segmented `[ Arrange | Design ]` control drawn in the panel + header (one lit segment per registered mode, click activates that mode via + `view::applyMode`), with the grid offset below the header. + +--- + ## Milestone 7 — capture action family **Goal:** Bindable capture actions for master / selected tracks / selected items / razor area, each with wet-dry + tail options. CONTEXT.md §actions, Build order 7. diff --git a/PLAN.md b/PLAN.md index b9b49e3..5d6561d 100644 --- a/PLAN.md +++ b/PLAN.md @@ -79,35 +79,3 @@ landed milestone. in int64 but exceed `INT_MAX` are implementation-defined. Hardening candidate — add bounds check before the cast when integer-field validation is in scope. ---- - -# Phase D — Design View (parallel to the M0–M11 capture roadmap) - -> **Separate phase namespace.** The M-numbers belong to the capture pillar -> (M0–M11, M4 in flight). Design View is an orthogonal feature on its own track, -> so it uses a **lettered** namespace (D1, D2, …) rather than extending the M-line. -> This keeps the two roadmaps from colliding on numbering and reads correctly: -> Phase D is not "the twelfth capture step," it's a different pillar. Authoritative -> spec: **CONTEXT.md §Design View**. Product framing: `docs/product/design-view.md`. -> When a point lands, doc-keeper moves it to `COMPLETED.md`. - -## 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 -mode (lit segment), one click flips modes via the D4 toggle action, per-mode -membership count visible, offlined-FX caveat surfaced as a tooltip. - -- [ ] Segmented mode switch `[ Arrange | Design ]` in the window header; active lit. -- [ ] Wire the switch to the toggle/activate actions from D4. -- [ ] Per-mode membership count display. -- [ ] Offlined-FX re-init caveat as a tooltip on the switch. - -## Phase D open questions -- **Snapshot durability across save-while-parked** — persisted here by decision; - lean alternative is force-restore-to-Arrange on save (product notes item 4). - (touches D3) -- **Reconcile on delete/restructure** — tagged leaf deleted or folder restructured - while parked leaves a stale GUID; ignore-and-prune on next toggle/open. - (touches D1/D2) -- **Screenset coexistence** — Design View drives the same flags a screenset recall - would; confirm last-writer-wins is not surprising. (touches D2)