Skip to content

Commit a8f37cd

Browse files
committed
Harden MIDI Studio V2 finish-line persistence SSoT UI song builder timeline instruments export manifest readiness and final reports - PR_26146_133-140-midi-studio-v2-finish-line-hardening-lane
1 parent 178b201 commit a8f37cd

13 files changed

Lines changed: 606 additions & 0 deletions
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# PR_26146_133-140 Bundle Validation
2+
3+
Status: WARN
4+
5+
Scope:
6+
- Hardened MIDI Studio V2 tool-only JSON import/export persistence.
7+
- Hardened Workspace Manager payload handoff persistence.
8+
- Preserved canonical song model, generated ID behavior, canvas-backed Octave Timeline, Song Sheet sequence builder, instrument ownership, export ownership, and launch split.
9+
10+
Changed files:
11+
- `tools/midi-studio-v2/js/services/MidiStudioStateSerializer.js`
12+
- `tools/midi-studio-v2/js/controls/StatusLogControl.js`
13+
- `tools/midi-studio-v2/js/MidiStudioV2App.js`
14+
- `tests/playwright/tools/MidiStudioV2.spec.mjs`
15+
16+
Validation:
17+
- PASS changed-file syntax checks:
18+
- `node --check tools/midi-studio-v2/js/services/MidiStudioStateSerializer.js`
19+
- `node --check tools/midi-studio-v2/js/controls/StatusLogControl.js`
20+
- `node --check tools/midi-studio-v2/js/MidiStudioV2App.js`
21+
- `node --check tests/playwright/tools/MidiStudioV2.spec.mjs`
22+
- PASS targeted MIDI Studio Playwright validation:
23+
- `npx playwright test tests/playwright/tools/MidiStudioV2.spec.mjs --grep "PR133-140" --reporter=line`
24+
- Result: 2 passed.
25+
- WARN `npm run test:workspace-v2`
26+
- Result: timed out after 604057 ms with no final pass/fail result.
27+
- Cleanup: leftover Playwright/Node processes from the timed-out run were stopped.
28+
- PASS `git diff --check`
29+
- Exit code 0.
30+
- Note: Git emitted a CRLF working-copy warning for `tests/playwright/tools/MidiStudioV2.spec.mjs`; no whitespace errors were reported.
31+
32+
Playwright coverage:
33+
- Tool-only JSON workflow round-trips exported `html-js-gaming.tool-state` payloads without relying on hidden localStorage/sessionStorage.
34+
- Workspace launch updates both `workspace.tools.midi-studio-v2` and the host context payload.
35+
- Song Sheet populated-section rules, missing-section rejection, sequence duplicate/remove, parse, generation targets, and canonical JSON updates are covered.
36+
- Canvas timeline section headers, drag paint, drag erase, manual note persistence, keyboard audition, and playback completion/loop are covered.
37+
- Instrument selected ID synchronization, settings persistence, duplicate, move, delete safety, and future unwired controls are covered.
38+
- Export/Manifest readiness honesty and red/unwired rendered output controls are covered.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_26146_133-140 Export and Manifest Audit
2+
3+
Status: PASS
4+
5+
Export ownership:
6+
- Export tab owns rendered target path fields and visible Save WAV/MP3/OGG actions.
7+
- Rendered output Save actions remain visible and red/unwired because real audio rendering is incomplete.
8+
- SoundFont/rendering controls remain red/unwired.
9+
- JSON export remains separate from rendered audio save actions.
10+
11+
Persistence:
12+
- PASS Export JSON writes a wrapped `html-js-gaming.tool-state` preview into JSON Details.
13+
- PASS Import JSON now accepts that wrapped exported tool-state payload.
14+
- PASS PASS/WARN/FAIL style status is visible:
15+
- import success emits PASS
16+
- JSON export success emits PASS
17+
- Save Project serialization emits PASS
18+
- missing rendered targets emit FAIL
19+
- unimplemented rendering emits WARN when a selected target exists
20+
21+
Manifest readiness:
22+
- Export readiness continues to summarize selected song, classification, generated ID, sequence, sections, instruments, notes, target output formats, and game usage assignment readiness.
23+
- Missing assignments remain WARN-level readiness content, not UAT-blocking FAIL.
24+
25+
Honesty checks:
26+
- PASS targeted Playwright verifies rendered Save does not claim file creation.
27+
- PASS status surfaces report missing rendered targets honestly.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# PR_26146_133-140 Final Readiness Report
2+
3+
Status: WARN
4+
5+
PASS workflows:
6+
- Tool-only Import JSON Manifest.
7+
- Tool-only Export JSON tool-state preview.
8+
- Tool-state JSON round-trip import.
9+
- Workspace Manager launch split and Return to Workspace.
10+
- Workspace payload handoff for classification, generated ID, Song Sheet sequence, instrument settings, and manual notes.
11+
- Generated ID remains `camelCase(Name) + "-" + Classification`.
12+
- Song Sheet populated-section builder and sequence workflow.
13+
- Parse Guided Song Sheet visible updates.
14+
- Canvas-backed Octave Timeline edit, drag paint, drag erase, section selection, keyboard audition, and playback highlighting.
15+
- Instrument selected ID sync, duplicate, move, delete safety, settings persistence, and audition.
16+
- Export readiness/status honesty.
17+
- Red/unwired incomplete controls remain visible.
18+
- No duplicate editable ownership found by targeted visible-control audit.
19+
20+
WARN workflows:
21+
- `npm run test:workspace-v2` timed out after 604057 ms and did not produce a final pass/fail result.
22+
- Broad all-suite accordion and frozen-scroll coverage were not rerun to completion in this lane because of that timeout.
23+
24+
FAIL workflows:
25+
- No new targeted MIDI Studio runtime failures remain after fixes.
26+
27+
Red/unwired future controls:
28+
- Rendered Save WAV/MP3/OGG real file generation.
29+
- SoundFont/render settings.
30+
- Song Sequence drag/drop.
31+
- Future history/autosave controls.
32+
- Future game usage runtime sync.
33+
- Future MIDI input and advanced MIDI conversion.
34+
- Future instrument effects/advanced controls.
35+
36+
Playback audit:
37+
- PASS Play starts audible preview.
38+
- PASS natural completion clears playing state and re-enables Play.
39+
- PASS Loop playback advances playhead.
40+
- PASS Stop clears looping state and re-enables Play.
41+
42+
Persistence audit:
43+
- PASS canonical payload persists songs, sections, sequence, instruments, and note edits through JSON export/import.
44+
- PASS Workspace handoff writes both tool session data and host context tool data.
45+
- PASS no hidden localStorage/sessionStorage dependency is required for tool-only correctness.
46+
47+
Export/manifest audit:
48+
- PASS JSON export/import is distinct from rendered audio saving.
49+
- PASS rendered output controls do not falsely claim file creation.
50+
- PASS manifest/export readiness summaries remain visible and honest.
51+
52+
Recommended next PRs:
53+
- Revisit the broad `npm run test:workspace-v2` timeout/performance separately if the full workspace gate is still required for every MIDI Studio lane.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# PR_26146_133-140 Instrument Audit
2+
3+
Status: PASS
4+
5+
Validated workflows:
6+
- selectedInstrumentId synchronization across:
7+
- Instruments tab
8+
- Octave Timeline quick instrument rows
9+
- Audition keyboard
10+
- Instrument setting persistence for:
11+
- volume
12+
- pan
13+
- transpose
14+
- preview lane settings in exported/reimported tool-state JSON
15+
- Instrument lifecycle:
16+
- duplicate selected instrument
17+
- move selected instrument up
18+
- move selected instrument down
19+
- delete safety confirmation
20+
- remove duplicated instrument
21+
- Audition workflow:
22+
- selected instrument keyboard audition emits visible status
23+
- timeline keyboard audition remains responsive
24+
25+
SSoT result:
26+
- PASS instrument detail editing remains owned by the Instruments tab.
27+
- PASS Octave Timeline quick rows are action/sync surfaces, not duplicate full editable owners.
28+
- PASS future effects and advanced controls remain red/unwired.
29+
30+
Residual risk:
31+
- WARN broad workspace-v2 run timed out, but targeted MIDI Studio validation covers the finish-line instrument lifecycle path.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PR_26146_133-140 Persistence Audit
2+
3+
Status: PASS
4+
5+
Implemented:
6+
- Import now accepts wrapped `html-js-gaming.tool-state` JSON exported by MIDI Studio V2.
7+
- Import now accepts normalized Workspace Manager tool-state objects shaped as `workspace/data/dirty`.
8+
- `previewLaneSettings` are preserved through canonical song normalization instead of falling back to `previewInstruments` only.
9+
- Import, Export JSON, and Save Project emit visible PASS status lines while preserving existing OK/WARN/FAIL log behavior.
10+
11+
Tool-only Import/Export JSON:
12+
- PASS exported `toolState.payload.songs[]` retained:
13+
- song name
14+
- classification
15+
- generated ID
16+
- Song Sheet sections
17+
- Song Sequence
18+
- generated/manual lane content
19+
- instrument volume/pan/transpose settings
20+
- rendered target metadata
21+
- PASS reimport of the exported tool-state restored the canonical payload from JSON alone.
22+
- PASS targeted Playwright verified no `workspace.tools.midi-studio-v2` sessionStorage dependency in tool mode.
23+
24+
Workspace handoff:
25+
- PASS launch from Workspace Manager hides tool-only import/save controls and shows Return to Workspace.
26+
- PASS edits to classification, generated ID, Song Sheet sequence, instrument settings, and manual notes update:
27+
- `sessionStorage["workspace.tools.midi-studio-v2"].data`
28+
- `sessionStorage[hostContextId].tools["midi-studio-v2"]`
29+
- PASS dirty metadata records changed keys and final edit reason.
30+
31+
Residual risk:
32+
- WARN broad `npm run test:workspace-v2` timed out, so only the targeted MIDI Studio handoff slice is confirmed in this lane.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PR_26146_133-140 Song Builder Audit
2+
3+
Status: PASS
4+
5+
Validated workflows:
6+
- Intro, Verse, Chorus, Bridge, Outro editors remain first-class.
7+
- Custom sections remain supported.
8+
- Empty Bridge section is excluded from Available Sections.
9+
- Populated Available Sections show section labels and chord/bar counts.
10+
- Song Sequence supports Add, Duplicate, Remove in the targeted test and Move Up/Move Down in existing coverage.
11+
- Missing/unpopulated section references are rejected with a visible FAIL status.
12+
- Parse Guided Song Sheet updates:
13+
- canonical song model
14+
- Song Sheet summary
15+
- Octave Timeline section map
16+
- diagnostics / JSON Details
17+
- status log
18+
- Apply Song Sheet To selections drive generation target summary and lane mapping.
19+
20+
Regression coverage:
21+
- Targeted PR133-140 Playwright verifies missing-section rejection, populated-section-only availability, duplicate/remove sequence behavior, parse updates, target lane summary, and JSON persistence.
22+
- Existing PR117-124 and PR125-132 tests continue to cover section library, regeneration warning, and broader sequence workflows.
23+
24+
Residual risk:
25+
- WARN broad workspace-v2 run timed out, so this lane relies on targeted MIDI Studio validation for finish-line song builder coverage.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PR_26146_133-140 SSoT Ownership Matrix
2+
3+
Status: PASS
4+
5+
Canonical value | Editable owner | Derived/read-only surfaces | Result
6+
--- | --- | --- | ---
7+
Song name | Song Setup / Song Details | Song list, action nav, export source, diagnostics | PASS
8+
Classification | Song Setup / Song Details | generated ID preview, export source, diagnostics, classification guide | PASS
9+
Generated ID | derived from Name + Classification | Song Details read-only ID, export source, diagnostics | PASS
10+
Tempo | Song Setup | playback tempo and diagnostics | PASS
11+
Key | Song Setup | diagnostics and generation context | PASS
12+
Style | Song Setup | diagnostics and generation context | PASS
13+
Song Sheet sections | Song Setup first-class section editors and custom section editor | Available Sections, sequence labels, timeline sections, diagnostics | PASS
14+
Song Sequence | Song Setup sequence builder | Octave Timeline section labels and playback/build order | PASS
15+
Apply Song Sheet To | Song Setup | generation summary and lane mapping | PASS
16+
Instrument GM/type/patch/settings | Instruments tab | Octave Timeline read-only lane summaries and audition context | PASS
17+
selectedInstrumentId | Instruments and Octave Timeline selection actions | Audition keyboard dataset and selected row highlights | PASS
18+
Generated/manual notes | Octave Timeline and Auto-Create Parts canonical arrangement | counts, diagnostics, export readiness | PASS
19+
Rendered target paths | Export tab target fields | status, diagnostics, manifest readiness | PASS
20+
Rendered Save WAV/MP3/OGG | Export tab | none | PASS as visible red/unwired future renderer
21+
Diagnostics | Diagnostics tab | read-only derived surfaces except explicit Copy JSON / Clear Status actions | PASS
22+
Workspace save ownership | Workspace Manager | MIDI Studio Workspace nav proxy | PASS
23+
24+
Duplicate editable ownership:
25+
- PASS targeted Playwright scanned visible controls across Song Setup, Octave Timeline, Instruments, Auto-Create Parts, MIDI Import, Diagnostics, and Export.
26+
- PASS no canonical editable value had more than one editable owner.
27+
28+
Notes:
29+
- Timeline quick instrument controls remain action/sync surfaces; Instruments tab owns editable instrument details.
30+
- Rendered audio save controls remain Export-owned but red/unwired because real rendering is not complete.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PR_26146_133-140 Timeline Audit
2+
3+
Status: PASS
4+
5+
Validated workflows:
6+
- Canvas-backed Octave Timeline remains the authoritative visual editor.
7+
- Timeline section labels render from Song Sequence.
8+
- Musical section colors are present in canvas section state.
9+
- Clicking a section header selects the matching Song Sequence item.
10+
- Timeline quick instrument selection synchronizes `selectedInstrumentId`.
11+
- Drag paint writes manual notes into the canonical arrangement.
12+
- Drag erase removes manual notes from the canonical arrangement.
13+
- Single-cell paint persists through exported and reimported tool-state JSON.
14+
- Piano-key audition remains functional.
15+
- Natural playback completion clears playing state and re-enables Play.
16+
- Loop playback advances playhead and Stop clears loop playback state.
17+
18+
Preserved behaviors:
19+
- Frozen Bar/Beat behavior remains in existing MIDI Studio coverage.
20+
- Canvas rendering remains intact after parse and tool-state reimport.
21+
- Manual note edits remain distinguishable from generated notes in arrangement/source count surfaces.
22+
23+
Residual risk:
24+
- WARN only targeted PR133-140 canvas interactions were run after this change; broad workspace-v2 timed out.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PR_26146_133-140 UI Completion Audit
2+
3+
Status: PASS
4+
5+
Audited UI areas:
6+
- Song Setup
7+
- Octave Timeline
8+
- Instruments
9+
- Auto-Create Parts
10+
- MIDI Import
11+
- Diagnostics
12+
- Export
13+
- Tool mode navigation
14+
- Workspace mode navigation
15+
16+
PASS implemented controls:
17+
- Import JSON Manifest in tool mode.
18+
- Export JSON tool-state preview.
19+
- Save Project serialization preview.
20+
- Song Details Name and Classification editing.
21+
- Generated ID read-only display.
22+
- Song Sheet section editors, custom sections, Available Sections, sequence actions, parse, regenerate warning flow.
23+
- Canvas-backed timeline note edit, drag paint, drag erase, section header selection, keyboard audition, Play/Stop, loop state.
24+
- Instrument duplicate, move up, move down, delete confirmation, audition, range/settings persistence.
25+
- Export readiness summaries and rendered target path fields.
26+
27+
PASS red/unwired controls:
28+
- SoundFont/render pipeline controls.
29+
- Rendered Save WAV/MP3/OGG real file generation.
30+
- Song Sequence drag/drop.
31+
- Future history/autosave controls.
32+
- Future game usage runtime sync.
33+
- Future MIDI input and advanced MIDI conversion.
34+
- Future instrument effects/advanced controls.
35+
- Workspace proxy import/copy/export controls outside a real Workspace Manager launch.
36+
37+
Accordion audit:
38+
- PASS targeted PR133-140 test verifies open/close state and icon state for Song Details.
39+
- PASS existing MIDI Studio accordion regression remains in the suite for all accordions.
40+
41+
Dead control audit:
42+
- PASS no new dead controls were added.
43+
- PASS incomplete controls remain visibly red/unwired with status/tooltip metadata.

0 commit comments

Comments
 (0)