From d33e25751ce51742667a93b95a0389d574836c16 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sun, 26 Jul 2026 21:10:20 -0400 Subject: [PATCH] docs: archive Phase L L2 to COMPLETED; reconcile CLAUDE.md + PLAN.md --- CLAUDE.md | 6 ++++-- COMPLETED.md | 26 ++++++++++++++++++++++++ PLAN.md | 57 +++++++++------------------------------------------- 3 files changed, 40 insertions(+), 49 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9c6c67a..d94831b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Repo identity and current state -The CMake project and binary are now named `reaper_reasampler`. This is **ReaSampler** — a per-project audio sample-bank capture tool. The MPE modules (`mpe_model`, `mpe_view`) have been removed. M0–M8 are complete (bank_model, peaks, capture offline+realtime, persist, bank_panel, insert, capture action family, RealtimeRecordBackend, tail T1+T2+T1-followons). Phase B multi-bank (B1–B5, B-cap), Phase D1/D2 Design View (D1–D5, D2-W1–W3-B), Phase V versioning/beta-channel (V1/V3, V4), M10 provenance + re-capture from source, Phase R Reclaim (R1–R3: prune-reconcile core, dry-run shell, guarded deletion + action + panel button), M11 in full (batch capture, action-button strip + keybinding labels, conform-on-insert verified-extant, native OS drag-out), and Phase L wave 1 L1 (shared LICE drawing kit: `theme`/palette module, `component_geometry` geometry helpers, `draw_kit` shell, GDI DrawText retired in `bank_panel`) have all landed. M9 slots deferred indefinitely. The *discipline* — pure REAPER-free testable core split from REAPER-facing shells — is **preserved** throughout. +The CMake project and binary are now named `reaper_reasampler`. This is **ReaSampler** — a per-project audio sample-bank capture tool. The MPE modules (`mpe_model`, `mpe_view`) have been removed. M0–M8 are complete (bank_model, peaks, capture offline+realtime, persist, bank_panel, insert, capture action family, RealtimeRecordBackend, tail T1+T2+T1-followons). Phase B multi-bank (B1–B5, B-cap), Phase D1/D2 Design View (D1–D5, D2-W1–W3-B), Phase V versioning/beta-channel (V1/V3, V4), M10 provenance + re-capture from source, Phase R Reclaim (R1–R3: prune-reconcile core, dry-run shell, guarded deletion + action + panel button), M11 in full (batch capture, action-button strip + keybinding labels, conform-on-insert verified-extant, native OS drag-out), Phase L wave 1 L1 (shared LICE drawing kit: `theme`/palette module, `component_geometry` geometry helpers, `draw_kit` shell, GDI DrawText retired in `bank_panel`), and Phase L wave 2 L2 (dock-panel layout redesign: `action_bar` pure task-grouped layout module, full M11-aware button inventory placed by task cluster, `bank_panel` redesigned through the L1 kit) have all landed. M9 slots deferred indefinitely. The *discipline* — pure REAPER-free testable core split from REAPER-facing shells — is **preserved** throughout. CONTEXT.md is the authoritative spec and build roadmap. Read it first for any non-trivial task. Every REAPER API name cited there is correct-by-intent; verify argument order, types, and flag values against `vendor/reaper-sdk/sdk/reaper_plugin_functions.h` before use. @@ -44,6 +44,7 @@ Key targets (see CMakeLists.txt for the full list): | `drag_out_tests` | executable | Pure unit tests for `drag_out` — no REAPER, no DAW. | | `theme_tests` | executable | Pure unit tests for `theme` — no REAPER, no DAW. | | `component_geometry_tests` | executable | Pure unit tests for `component_geometry` — no REAPER, no DAW. | +| `action_bar_tests` | executable | Pure unit tests for `action_bar` — no REAPER, no DAW. | | `reaper_reasampler` | loadable module | The actual extension binary (`.dll` / `.dylib` / `.so`). | ### Beta channel build (Phase V, V4) @@ -87,11 +88,12 @@ There is no hot-reload. Copy the built binary into REAPER's `UserPlugins/` folde - `drag_out` — M11 pure OS drag-out module: gesture-boundary decision (internal drag becomes OS-bound when the pointer leaves the panel client rect), path-list assembly with dedupe and missing-file skip. No REAPER types at the boundary. - `theme` — Phase L pure palette module (L1): role→color mapping via one constants block (Direction B Neon Console + Direction C spectral, DS-2); WCAG contrast-floor helpers; interaction-state color model; spectral ramp. No LICE or REAPER types. - `component_geometry` — Phase L pure component geometry/hit-test helpers (L1): button/slider/list-row geometry + hover hit-test. No LICE or REAPER types. Mirror of `mode_switch`/`bank_grid`. +- `action_bar` — Phase L pure task-grouped action-bar layout/hit-test (L2): clusters (Capture / Placement / Maintenance), per-button label + keybinding micro sub-rects, whole-trailing-button overflow, point→index hit-test. No LICE or REAPER types. Mirror of `mode_switch`/`bank_grid`/`action_buttons`. **REAPER-facing shells:** - `capture` — `ICaptureBackend` interface; `OfflineRenderBackend` (deterministic default) and `RealtimeRecordBackend`. Input: `CaptureRequest`. Output: finished file + populated `Sample` handed to `bank_model`. - `insert` — placement via `InsertMedia`; conform-to-project-tempo is an explicit opt-in flag, never silent stretching. -- `bank_panel` — docked LICE-drawn grid: thumbnails, audition, multi-select, keyboard navigation; a 28px action-button strip (M11) between the split body and tail footer that fires capture/insert/re-capture actions via `NamedCommandLookup` + `Main_OnCommand` and shows live keybinding labels via `kbd_getTextFromCmd`; OS drag-out hook (M11) initiating an OS-level copy drag when the pointer leaves the panel client rect, via `drag_out` + `drag_out_win`. +- `bank_panel` — docked LICE-drawn grid: thumbnails, audition, multi-select, keyboard navigation; a task-grouped action bar (L2) placing the full M11-aware button inventory by cluster (Capture / Placement / Maintenance) via the `action_bar` pure module, firing each action via `NamedCommandLookup` + `Main_OnCommand` and showing live keybinding labels via `kbd_getTextFromCmd`; prune button footer-set-apart; entire panel draws through the L1 kit by palette role with hover on interactive elements, single `KitColor→LICE_pixel` boundary via `draw_kit`; OS drag-out hook (M11) initiating an OS-level copy drag when the pointer leaves the panel client rect, via `drag_out` + `drag_out_win`. - `persist` — project ext state (`SetProjExtState` / `GetProjExtState`, namespace `"reasampler"`) ↔ `BankBook` JSON (`"banks"` key) + `ViewModeModel` JSON (`"view_state"` key) + `TailSetting` JSON (`"tail_setting"` key) + `OwnedManifest` JSON (`"owned_files"` key) + writing-version stamp (`"version"` key, written via `stampVersion()` on every `saveToActiveProject()`); project-relative path resolution. A `projectconfig` hook (`BeginLoadProjectState(isUndo)`) triggers a deferred session reload on undo/redo so Ctrl-Z/redo visibly restores book/view/tail/manifest in-session. Hosts `ReaSamplerSession::pruneDryRun()` (read-only orphan enumeration via M4 project-relative resolution) and `pruneOrphanSet()` (full-set query for the R3 delete path); supplies `referencedPaths()` + `owned().paths()` to the `prune_reconcile` pure core. - `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`. - `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. diff --git a/COMPLETED.md b/COMPLETED.md index 4758e3b..4787c10 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -1273,3 +1273,29 @@ cached-font `text()` — GDI `DrawText` path retired. Double-buffer discipline p - [x] **GDI `DrawText` retirement in `bank_panel`**: all panel text now routes through the kit's cached-font `text()`; raw GDI `DrawText` path retired (the single biggest "temple os → modern" lever). + +--- + +## L2 — dock-panel layout redesign +**Goal:** Full layout redesign of the `bank_panel` dock window — task-grouped action bar, +full M11-aware button inventory placed by cluster, entire panel drawn through the L1 kit. +CONTEXT.md §Phase L (L2 scope). DS-3 (thorough layout redesign, not a light re-skin) is the +governing settled decision; sequenced after M11 merged. +**Verify:** CTest green (`action_bar_tests`). The panel renders in the settled B+spectral +language through the L1 kit — chrome, buttons, tabs, grid cells, dividers all by palette +role with hover on interactive elements; remaining GDI text retired; single +`KitColor→LICE_pixel` boundary via the kit's `toLice` (exposed in `draw_kit.h`). Prune +button remains footer-set-apart + `warn`-colored; grid stays the centerpiece. + +- [x] **`action_bar` pure module** (`src/action_bar.{h,cpp}`, `tests/test_action_bar.cpp`, + CTest target `action_bar_tests`): task-grouped action-bar layout — clusters (Capture / + Placement / Maintenance), per-button label + keybinding micro sub-rects, whole-trailing- + button overflow, point→index hit-test. Pure; no LICE or REAPER types. Mirror of + `mode_switch`/`bank_grid`/`action_buttons`. +- [x] **`bank_panel` redesigned**: full M11-aware button inventory placed and grouped by + task cluster (Capture: capture item/track, batch items, batch razor, realtime; Placement: + insert + insert-conform; Maintenance: re-capture, cancel-realtime); prune remains footer- + set-apart + `warn`-colored; grid stays the centerpiece. Entire panel draws through the L1 + kit (chrome, buttons, tabs, grid cells, dividers) by palette role with hover on + interactive elements; remaining GDI text retired; single `KitColor→LICE_pixel` boundary + via the kit's `toLice` (now exposed in `draw_kit.h`). diff --git a/PLAN.md b/PLAN.md index 9cb83bd..2146289 100644 --- a/PLAN.md +++ b/PLAN.md @@ -284,9 +284,11 @@ build:** the `IReaperUIEmbedInterface` contract + embed message/lifecycle agains > directions: `docs/product/visual-design-language.md`. When a point lands, doc-keeper > moves it to `COMPLETED.md`. > -> **L1 (shared LICE drawing kit — the foundation) has landed** — `theme`/palette module, -> `component_geometry` geometry/hit-test helpers, `draw_kit` shell, and GDI `DrawText` -> retirement in `bank_panel`. See `COMPLETED.md`. **L2 and L3 remain.** +> **L1 (shared LICE drawing kit — the foundation) and L2 (dock-panel layout redesign) +> have landed** — `theme`/palette module, `component_geometry` geometry/hit-test helpers, +> `draw_kit` shell, GDI `DrawText` retirement in `bank_panel` (L1); `action_bar` pure +> task-grouped layout module, full M11-aware button inventory placed by task cluster, +> `bank_panel` redesigned through the L1 kit (L2). See `COMPLETED.md`. **L3 remains.** > > **This section is self-contained for a team without Phase S context.** Where a point > touches a Phase S surface (the VST editor, the embed strip, the keyboard strip), the @@ -308,44 +310,6 @@ build:** the `IReaperUIEmbedInterface` contract + embed message/lifecycle agains > out the full button inventory (including M11's action-button additions) intuitively, > uncluttered, and useful — then applies the kit. Sequenced after M11 merges. -## L2 — dock-panel layout redesign (extension-side; DS-3: thorough, not a re-skin) -**Goal:** Redesign the docked `bank_panel` **layout** to house the *full* button/affordance -inventory — including the buttons **M11 adds** — intuitively, uncluttered, and useful, then -draw it all through the L1 kit. This is **not** a light re-skin (DS-3 settled): M11's -action-trigger buttons + keybinding-help labels, on top of the existing capture/organize/ -prune/view affordances, are a real button inventory that a straight skin-pass would leave -crowded. L2 groups the inventory by *task* (capture, organize, reclaim, view), gives every -button a home that does not squeeze the grid, and only then applies the kit's draws. All -new layout math goes in a **pure geometry module** (mirror of `mode_switch`/`bank_grid`); -`bank_grid`/`tab_strip`/`mode_switch` stay the pure source of truth for what they own. -CONTEXT.md §Phase L (dock-panel layout contract — the full M11-aware inventory). -**Verify (in DAW):** the full button inventory (existing + M11) is laid out cleanly — the -grid stays the centerpiece, frequent capture actions are one reach away with their keybinding -labels legible, destructive prune is set apart and `warn`-marked, hover lights every -interactive element; nothing is crammed or cut off at panel resize; the panel's GDI text is -gone (kit cached-font throughout); all hit-testing is CTest-green pure geometry. -**Depends on:** L1 (the kit). **Sequence AFTER M11 merges to dev** — L2 must inventory M11's -*actual landed* buttons, not a forecast; starting before M11 designs against a moving target. - -- [ ] **Layout design + pure geometry:** design the panel layout that groups the inventory - by task — a compact action bar/toolbar for the frequent capture actions (icon+label, - keybinding as a `micro` sub-label), an overflow/menu for rare ones, header space for the - Design View mode switch + active-bank indicator, the bank tab strip + move/copy/remove - organize cluster, and prune set apart and `warn`-colored. Add a new **pure** action-bar - layout module (mirror of `mode_switch`/`bank_grid`); keep all hit-test math pure/CTest. -- [ ] **Inventory the full M11-aware button set and place every one** (see CONTEXT.md - §Phase L for the enumerated inventory): existing — bank grid, mode switch + membership - count, named-banks tab strip (overflow/scroll), active-bank indicator, pool/banks - full-height toggles, create/rename/delete/activate bank, move/copy/remove sample, prune - (R-E); M11 — action-trigger buttons (capture item/track, re-capture, resample-and-mute, - batch capture, conform-on-insert, insert-at-cursor, drag-out, null-test verify) and - per-action keybinding-help labels. Density is a design decision: 8px grid, elevation - layers over hairlines, `warn` for destructive verbs. -- [ ] **Apply the L1 kit** to draw the redesigned panel: cached-font text (retire GDI), - kit `drawButton`/segment/tab draws, palette roles, micro-gradient surfaces, hover on - every interactive element. Structure of the vertical-split / grid / tab bones is - preserved; the *layout of the inventory around them* is the design work (DS-3). - ## L3 — VST editor + embed-strip restyle (GATED on Phase S landing on dev) **Goal:** Bring the ReaSampler 9000 VST editor (`IPlugView` LICE surface) and the S6 embed strip up to the settled B+spectral look via the L1 kit: cached-font text, kit component @@ -382,13 +346,13 @@ work. ## Phase L — sequencing ``` -L1 (shared kit) ──► L2 (dock-panel layout redesign; AFTER M11 merges to dev) +L1 (shared kit) ──► L2 (dock-panel layout redesign) [LANDED] └─────────► L3 (VST editor + embed-strip restyle; GATED on Phase S landing on dev) Phase S (separate team, ungated): S-work builds with current drawing, adopts L1 when it lands. ``` -L1 is the foundation both L2 and L3 consume. L2 is extension-side, lands after M11. L3 waits -for Phase S to reach dev. Phase S feature work runs in parallel, ungated by Phase L. +L1 and L2 have landed. L3 waits for Phase S to reach dev. Phase S feature work runs in +parallel, ungated by Phase L. ## Phase L — must-verify-before-build - **LICE design-kit surfaces (L1)** — `LICE_GradRect`, `LICE_RoundRect`, AA @@ -403,9 +367,8 @@ for Phase S to reach dev. Phase S feature work runs in parallel, ungated by Phas drawing reference, `virtwnd-listbox.cpp` as a candidate scroll listbox, `virtwnd-controls.h` for `WDL_STYLE_*` gradient hooks, `virtwnd-skin.h` for image-skin helpers. Reuse where useful; keep hit-test geometry pure regardless. -- **M11 button inventory (L2)** — L2's layout depends on the *actual* set of buttons M11 - lands (action-trigger buttons + keybinding-help labels). Re-inventory against dev after - M11 merges before finalizing the layout. +- **M11 button inventory (L2)** — resolved at L2 build: inventory taken against dev after + M11 merged; all buttons placed by task cluster in the landed `action_bar` module. ---