Skip to content

Commit fab7f97

Browse files
Tokclaude
andcommitted
docs(plan): wrap session — refactor round done, update pending-splits note
PLAN.md's "Large-file splits" item updated to reflect the 13 files pulled under the 1000-line cap this session; top file is now `src/audio/dsp/samplers.rs` (973, one self-contained AmenVoice — not easily splittable into sibling voices) plus four more files in the 890s–920s that are plausible next-round targets but not urgent. docs/features.md's "Refactoring and test coverage" section bumped to 987 unit tests (up from 479 milestone) and enumerates every split that landed — test-side (rack_tests, llm_apply_extra_tests, dsp_tests, llm_tests) and lib-side (llm/mod.rs, api/mod.rs, params.rs, voices.rs, dsp/mod.rs, planner.rs, ui/mod.rs, widgets/mod.rs). Notes the +18 planner_tests.rs coverage that closed a previously-zero-test 964-line file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 092995a commit fab7f97

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

PLAN.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,14 @@ they ship and are reflected in `features.md`.
135135
- [ ] **Glass group helpers**`glass_label(ui, text)` still to do
136136
(the inline pattern varies too much across panels for a single
137137
helper).
138-
- [ ] **Large-file splits**`src/llm/mod.rs` (982 lines),
139-
`src/ui/mod.rs` (977), `src/audio/dsp/samplers.rs` (973),
140-
`src/llm/planner.rs` (964), `src/audio/dsp/mod.rs` (963),
141-
`src/audio/dsp/voices.rs` (950), `src/tests/llm_apply_extra_tests.rs`
142-
(946), `src/api/mod.rs` (943) are all one append from tripping the
143-
1000-line pre-commit cap. Split proactively into cohesive
144-
sub-modules (see coding-guide.md). `rack_tests.rs` already split.
138+
- [ ] **Large-file splits (remaining)** — the 2026-04 round pulled
139+
13 files under the 1000-line cap; top file is now
140+
`src/audio/dsp/samplers.rs` (973 lines, all one `AmenVoice` impl —
141+
not easily splittable into sibling voices). Remaining candidates
142+
close to the 700-line proactive-split guidance:
143+
`src/ui/rack_canvas.rs` (919), `src/ui/header.rs` (913),
144+
`src/state/rack.rs` (893), `src/ui/panels/amen.rs` (892) — none
145+
are urgent but worth revisiting next round.
145146

146147
## Infrastructure
147148

docs/features.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,8 @@ Alerts cycle in the header (2 at a time, rotating each second). Multiple alerts
16781678

16791679
### Refactoring and test coverage
16801680

1681-
- **479 unit tests**; suites: `llm_apply_tests` (68), `persistence_tests` (25), `helpers_tests` (7), `music_tests` (13), `dsp_tests` (16), `fx_plan_tests` (7), `vram_tests` (9)
1681+
- **987 unit tests** across ~30 test files (up from 479 milestone)
1682+
- **2026-04 refactor round** — 13 proactive file splits when the largest sources approached the 1000-line pre-commit cap. Tests: `rack_tests` → +`rack_reach_tests`, `llm_apply_extra_tests` → +`llm_apply_seq_tests`, `dsp_tests` → +`dsp_voice_primitives_tests`, `llm_tests` → +`llm_plumbing_tests`. Library: `llm/mod.rs` → +`types.rs`, `api/mod.rs` → +`preset.rs`, `audio/dsp/params.rs` → +`params_from.rs`, `audio/dsp/voices.rs` → +`an1x.rs`, `audio/dsp/mod.rs` → +`fx_step.rs`, `llm/planner.rs` → +`planner_heuristic.rs`, `ui/mod.rs` → +`app_update.rs`, `ui/widgets/mod.rs` → +`knob.rs`. Top-file count dropped 982 → 973; only one file still above 950 (`audio/dsp/samplers.rs`, one self-contained `AmenVoice`). Added `planner_tests.rs` (18 tests covering `lane_from_label` / `lane_is_live_pub` / `heuristic_plan` — previously 0 coverage on a 964-line file).
16821683
- **`rack.connect_control(from_id, to_id)`** - replaces 8-line PortRef boilerplate at 6 call sites
16831684
- **`spawn_agent()` pure function** - transitions.rs; wizard.rs and SpawnAgent handler refactored to use it
16841685
- **`format_llm_display()` pure function** - extracted from drain_llm_outputs into transitions.rs

0 commit comments

Comments
 (0)