|
| 1 | +# PR_26146_037 MIDI Studio V2 Grid Performance And JSON Header Polish Validation |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +- Continued from PR_26146_036. |
| 6 | +- Moved `Copy JSON` from the top action nav into the `JSON Details` accordion header. |
| 7 | +- Kept `Copy JSON` behavior unchanged through the existing `toolCopyJsonButton` wiring. |
| 8 | +- Advanced the MIDI Studio V2 roadmap by changing only the execution-backed optional per-note velocity/duration marker from `[ ]` to `[.]`. |
| 9 | +- Reduced playback playhead visual work so playback highlights only the Bar/Beat timing header cells for the current step. |
| 10 | +- Removed playback-time note-cell and lane-cell highlighting. |
| 11 | +- Changed spreadsheet/grid cell borders to 1px. |
| 12 | +- Removed vertical spacing between the Bar and Beat sticky header rows. |
| 13 | +- Preserved alternating row color, frozen left note labels, header/body horizontal sync, compact row height, active-note textless highlight behavior, Play/Stop, chord editing, export Type + Save, and manifest import. |
| 14 | + |
| 15 | +## Files Changed |
| 16 | + |
| 17 | +- `docs/dev/roadmaps/MIDI_STUDIO_V2_ROADMAP.md` |
| 18 | +- `tools/midi-studio-v2/index.html` |
| 19 | +- `tools/midi-studio-v2/js/controls/InstrumentGridControl.js` |
| 20 | +- `tools/midi-studio-v2/styles/midiStudioV2.css` |
| 21 | +- `tests/playwright/tools/MidiStudioV2.spec.mjs` |
| 22 | + |
| 23 | +## Validation Commands |
| 24 | + |
| 25 | +```powershell |
| 26 | +node --check tools/midi-studio-v2/js/controls/InstrumentGridControl.js |
| 27 | +node --check tests/playwright/tools/MidiStudioV2.spec.mjs |
| 28 | +node -e "const fs=require('fs'); const p='tools/midi-studio-v2/index.html'; const html=fs.readFileSync(p,'utf8'); if(/<script(?![^>]*\ssrc=)[^>]*>/i.test(html)) throw new Error('Inline script block found'); if(/<style\b/i.test(html)) throw new Error('Inline style block found'); if(/\son[a-z]+\s*=/i.test(html)) throw new Error('Inline event handler found'); console.log('HTML external-only guard passed:', p);" |
| 29 | +node -e "const fs=require('fs'); const p='tools/midi-studio-v2/styles/midiStudioV2.css'; const css=fs.readFileSync(p,'utf8'); if(/\/\*[^]*$/.test(css.replace(/\/\*[^]*?\*\//g,''))) throw new Error('Unclosed CSS comment'); let depth=0; for (const ch of css.replace(/\/\*[^]*?\*\//g,'')) { if (ch==='{') depth++; if (ch==='}') depth--; if (depth<0) throw new Error('Unexpected }'); } if (depth!==0) throw new Error('Unbalanced CSS braces'); console.log('CSS syntax guard passed:', p);" |
| 30 | +npx.cmd playwright test tests/playwright/tools/MidiStudioV2.spec.mjs -g "places Copy JSON in the JSON Details header and preserves copy behavior|roadmap and implementation audit exist with actual MIDI Studio V2 status markers|octave timeline freezes compact headers and note labels while active cells stay textless|octave grid density supports icon controls and simultaneous chord editing|fast octave note editing supports drag painting keyboard shortcuts selection and timeline scroll sync|exports through Type dropdown and Save without claiming files were written|octave timeline editor is the default editable and playable Studio workflow" --config=codex_playwright_system_chrome.config.cjs --reporter=list --workers=1 --timeout=60000 |
| 31 | +git diff --check |
| 32 | +``` |
| 33 | + |
| 34 | +## Validation Result |
| 35 | + |
| 36 | +PASS |
| 37 | + |
| 38 | +## Syntax And Static Checks |
| 39 | + |
| 40 | +- PASS: `tools/midi-studio-v2/js/controls/InstrumentGridControl.js` |
| 41 | +- PASS: `tests/playwright/tools/MidiStudioV2.spec.mjs` |
| 42 | +- PASS: `tools/midi-studio-v2/index.html` external-only guard |
| 43 | +- PASS: `tools/midi-studio-v2/styles/midiStudioV2.css` brace/comment guard |
| 44 | + |
| 45 | +## Playwright Coverage |
| 46 | + |
| 47 | +Targeted MIDI Studio V2 Playwright tests passed: |
| 48 | + |
| 49 | +- PASS: `Copy JSON` is in the `JSON Details` header between the title and accordion close/control icon. |
| 50 | +- PASS: `Copy JSON` still writes the MIDI Studio V2 toolState JSON to the Clipboard API when available. |
| 51 | +- PASS: roadmap markers use only `[ ]`, `[.]`, and `[x]`, with the optional per-note velocity/duration item advanced to `[.]`. |
| 52 | +- PASS: playback highlights only Bar/Beat timing header fields. |
| 53 | +- PASS: playback no longer applies playhead highlighting to note cells per tick. |
| 54 | +- PASS: Bar/Beat vertical header gap is removed. |
| 55 | +- PASS: grid cells use a 1px CSS border. |
| 56 | +- PASS: header/body horizontal scroll sync and frozen left note labels remain correct. |
| 57 | +- PASS: active notes still render as highlights without printed note text. |
| 58 | +- PASS: chord editing, fast editing, Play/Stop, and export Type + Save remain covered. |
| 59 | + |
| 60 | +Command result: |
| 61 | + |
| 62 | +```text |
| 63 | +7 passed (1.7m) |
| 64 | +``` |
| 65 | + |
| 66 | +## Diff Check |
| 67 | + |
| 68 | +- PASS: `git diff --check` |
| 69 | +- Note: Git reported LF-to-CRLF working-copy notices for changed files only; no whitespace errors were reported. |
| 70 | + |
| 71 | +## Full Samples Smoke Test |
| 72 | + |
| 73 | +Not run, per request. |
| 74 | + |
| 75 | +## PR Status |
| 76 | + |
| 77 | +PASS. Playback no longer repaints/highlights the full note grid every tick; the active playback visual is limited to the current Bar/Beat timing header cells. |
0 commit comments