Skip to content

Commit ba7c040

Browse files
committed
Keep MIDI Studio V2 Tempo Key Style in Song Details and make Song Sheet structure-only - PR_26146_062-midi-studio-v2-song-sheet-structure-only
1 parent c08e5fc commit ba7c040

10 files changed

Lines changed: 400 additions & 72 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# PR_26146_062 MIDI Studio V2 Song Sheet SSoT Map
2+
3+
## Editable Owners
4+
5+
| Value | Owning tab/bucket | Editable control | Canonical path |
6+
| --- | --- | --- | --- |
7+
| Tempo/BPM | Song Setup > Song Details | `#songSheetTempoInput` | `studioArrangement.tempo` |
8+
| Key | Song Setup > Song Details | `#songSheetKeyInput` | `studioArrangement.key` |
9+
| Style | Song Setup > Song Details | `#songSheetStyleInput` | `studioArrangement.style` |
10+
| Song Sheet sections | Song Setup > Song Sheet | `#songSheetSectionsInput` | `studioArrangement.songSheet.sections` |
11+
| Song Sheet loop sections | Song Setup > Song Sheet | `#songSheetLoopSectionsInput` | `studioArrangement.songSheet.loopSections` |
12+
13+
## Derived Read-Only Values
14+
15+
| Value | Display location | Source |
16+
| --- | --- | --- |
17+
| Bars | Song Setup > Song Sheet summary | Parsed Song Sheet sections |
18+
| Chord count | Song Setup > Song Sheet summary | Parsed Song Sheet sections |
19+
| Estimated duration | Song Setup > Song Sheet summary | Parsed bars and Song Details tempo |
20+
| Warnings | Song Setup > Song Sheet summary | Song Sheet parser diagnostics |
21+
| Grid sections | Auto-Create Parts read-only mirror | `studioArrangement.sections`, refreshed from Song Sheet parse |
22+
| JSON Details | Diagnostics read-only display | Selected canonical song model |
23+
24+
## Refresh Flow
25+
26+
1. Editing Sections or Loop sections writes to `studioArrangement.songSheet`.
27+
2. The Song Sheet parser composes source text from Song Details metadata plus Song Sheet structure fields.
28+
3. Parsed sections refresh computed Bars, Chord count, Estimated duration, Loop sections, and Warnings.
29+
4. Parsed playable sections rebuild the Octave Timeline arrangement and generated lane data.
30+
5. The selected song JSON Details and diagnostics are refreshed from the canonical song model.
31+
32+
## Non-Owners
33+
34+
- Song Sheet does not own editable Tempo, Key, or Style.
35+
- Song Details does not own editable Song Sheet structure.
36+
- Auto-Create Parts does not own editable Song Sheet sections; its grid sections field is read-only.
37+
- Instruments, MIDI Import, Diagnostics, and Export do not own editable Song Sheet structure values.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# PR_26146_062 MIDI Studio V2 Song Sheet Structure Only Validation
2+
3+
Status: PASS
4+
5+
## Scope Validated
6+
7+
- Removed editable Tempo, Key, and Style from Song Setup > Song Sheet.
8+
- Preserved Song Details as the editable owner for Tempo/BPM, Key, and Style.
9+
- Changed Song Sheet to own only structure fields: Sections and Loop sections.
10+
- Kept Bars, Chord count, Estimated duration, and Warnings as computed/read-only or diagnostic summary rows.
11+
- Made the Auto-Create Parts grid sections field a read-only mirror of the canonical Song Sheet arrangement sections.
12+
- Edits to Sections and Loop sections update the selected song canonical model, refresh the Octave Timeline arrangement, refresh derived summary rows, update diagnostics, and update JSON Details.
13+
- Preserved Instruments tab SSoT, selected instrument sync, canvas note editing, Play/Stop, manifest import, multiple songs, Export ownership, and red unwired controls.
14+
15+
## Validation Commands
16+
17+
```powershell
18+
node --check tools/midi-studio-v2/js/controls/SongSheetControl.js
19+
node --check tools/midi-studio-v2/js/controls/SongDetailsControl.js
20+
node --check tools/midi-studio-v2/js/MidiStudioV2App.js
21+
node --check tools/midi-studio-v2/js/bootstrap.js
22+
node --check tools/midi-studio-v2/js/services/MidiStudioStateSerializer.js
23+
node --check tests/playwright/tools/MidiStudioV2.spec.mjs
24+
rg --pcre2 -n '<style\b|<script\b(?![^>]*\bsrc=)|\son[a-z]+\s=|style\s=' tools/midi-studio-v2/index.html; if ($LASTEXITCODE -eq 1) { exit 0 } else { exit $LASTEXITCODE }
25+
npx playwright test tests/playwright/tools/MidiStudioV2.spec.mjs --project=playwright -g 'keeps PR062'
26+
npx playwright test tests/playwright/tools/MidiStudioV2.spec.mjs --project=playwright -g 'keeps PR062|parses guided Song Sheet|shows guided Song Sheet warnings|rejects invalid guided Song Sheet|consolidates existing tab buckets|canvas note editing flow|syncs PR060|builds PR061|keeps Export tab usable'
27+
git diff --check
28+
```
29+
30+
## Results
31+
32+
- JS syntax checks: PASS.
33+
- Inline script/style/event handler guard: PASS, no matches.
34+
- PR062 focused Playwright test: PASS, 1 passed.
35+
- Targeted MIDI Studio V2 Playwright set: PASS, 9 passed.
36+
- `git diff --check`: PASS. Git reported line-ending normalization warnings only.
37+
- Full samples smoke test: not run, per PR instruction.
38+
39+
## Playwright Proof Points
40+
41+
- Tempo, Key, and Style remain editable in Song Details.
42+
- Tempo, Key, and Style are absent as editable Song Sheet fields.
43+
- Song Sheet exposes Sections and Loop sections as editable structured text fields.
44+
- Bars, Chord count, and Estimated duration are marked computed/read-only.
45+
- Warnings are marked read-only diagnostics.
46+
- Section edits update `studioArrangement.songSheet`, `studioArrangement.sections`, generated chord lane data, JSON Details, and the Octave Timeline section model.
47+
- Duplicate editable Song Sheet structure controls are absent from other tabs; the Auto-Create grid sections field is read-only.
48+
- Play and Stop still work after Song Sheet structure edits.

0 commit comments

Comments
 (0)