Skip to content

feat: tester release — e2e suite, WCAG AA, beat highlighting, bug fixes#153

Open
bwyard wants to merge 8 commits intodevfrom
feat/e2e-playwright-suite
Open

feat: tester release — e2e suite, WCAG AA, beat highlighting, bug fixes#153
bwyard wants to merge 8 commits intodevfrom
feat/e2e-playwright-suite

Conversation

@bwyard
Copy link
Copy Markdown
Owner

@bwyard bwyard commented Apr 6, 2026

Summary

This PR consolidates the tester release work (was PR #152) plus the full Playwright e2e suite and additional fixes discovered during testing.

E2e / Testing

  • 106 Playwright e2e tests across splash, transport, keyboard, instrument picker, bug report, mixer, live-code, accessibility, and code-sync
  • Shared Electron fixture (one launch per worker, page.reload() between tests) — cuts runtime from ~11 min to ~9.4 min
  • All 5 axe/WCAG accessibility tests passing
  • CI: xvfb-run step added for Ubuntu runner support
  • window.__scoreEditor exposed in CodeEditorPanel for code-sync test reads

Bug fixes

  • Beat highlighting: TRACK_LINE_RE now covers all instruments (Cowbell808, HihatOpen808, Clap909, KickHardstyle/Hardcore, SuperSaw, WobbleBass, etc.) — HihatOpen808 case mismatch caused track-to-line mapping cascade
  • SubSynth: instrumentType was 'sub-synth', registry key is 'subsynth' — fixed
  • Bug report: code + engineState now wired into TransportBar; debug/report.json path off-by-one fixed (5 levels → 4); no longer opens Explorer on save
  • Panic stop: hard-cuts audio immediately (kills reverb/delay tails); masterVolume restored on next play
  • Test audio: belt-and-suspenders SCORE_TEST=1 mute in transport:play + hot-swap handlers

DSL additions

  • .tone(hz) chain method — bandpass filter frequency for Snare/Snare909 (20–20000 Hz)
  • validateTone added to validators; _tone field in PartDescriptor; maps to props.tone in engine hydration

WCAG AA contrast fixes

  • All muted text raised to #7a7a8a+ on dark backgrounds (was #3a3a46 etc.)
  • BarCounter: removed opacity-based dimming, explicit computed colors per playing state
  • DraggablePanel: added aria-valuenow/min/max to resize handle

Instrument picker

  • InstrumentPicker modal wired into LiveCode (was using inline dropdown with only 10 instruments)

CodeHighlight tests

  • 68 new instrument recognition tests covering all 34 instruments in both Track() and const-assignment styles

Test plan

  • pnpm test:e2e — 106 tests, ~9.4 min
  • pnpm test — unit tests passing
  • Run app: pnpm dev — beat highlighting works for all instruments including HihatOpen808, Cowbell808, Clap909
  • Submit bug report — code and engine state captured, no Explorer popup
  • Stop transport — reverb/delay tails cut immediately

🤖 Generated with Claude Code

bwyard and others added 8 commits April 5, 2026 21:29
…ds, opens folder

BugReportModal 'Save Report' path was a silent no-op — main had the type but
no handler. Now saves score-bug-report-<timestamp>.json to Downloads and
opens the folder so testers know where to find it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Engine:
- Add _solo to InstrumentDescriptor — applied at startup via channel.setSolo()
- Add stutter to stepSequencer — repeats step N times evenly within step window
- Wire _stutter through partToInstrumentDescriptor + seqPatternExtras
- Add solo to PatchProps.tracks, handled in engine.patch()

GUI (MixerStrip):
- Add solo button (S, blue when active), pan slider to every strip
- StripState gains soloed + pan fields
- onMixerSolo: toggles solo on clicked track, clears others, patches code + engine
- onMixerPan: patches code + debounced re-eval

GUI (InstrumentPanel):
- UNIVERSAL_CONTROLS row on every instrument: pan, swing, humanize, degrade, stutter, octave
- Add entries for: kickHardstyle, kickHardcore, clap909, supersaw, wobble
- Add: rhodes, theremin, sax, arp, hihat-open808 entries
- Expand bass303 with envDepth and delay controls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cowbell808: TR-808 two-oscillator (562+839 Hz square) metallic bell.
Full stack: component → instruments registry → DSL factory → GUI controls.
Wired: InstrumentPanel (volume, decay, tone, ring), ReferencePanel snippet.

Starter song rewritten for DJs: kick, snare, clap, hihat, open hat,
cowbell, and a proper 303 bassline with swing. Shows the full instrument
palette immediately on launch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e scaffold, zoom fix

- Extract all globalShortcut registrations to src/main/shortcuts.ts (SHORTCUT_MAP pattern)
  — adding a shortcut is now one entry, no index.ts changes needed
- Fix Ctrl+= zoom in (was broken — Ctrl++ requires Shift on most keyboards, = does not)
  — also adds Ctrl+0 reset; cleanup registered on app will-quit
- Rebuild InstrumentPicker from scratch: all 24 instruments across Drums/Bass/Synths/Other
  — types now match INSTRUMENT_REGISTRY keys exactly (bass-303, hihatopen808, kickHardstyle etc)
  — removed non-existent crash/ride, added supersaw/wobble/rhodes/theremin/sax/arp/cowbell808
- Fix starter song: remove .envDepth(3500) — not a chain method, caused crash on launch
- Enhance bug report: writes to score/debug/report.json (fixed path) + timestamped Downloads archive
- Add @playwright/test + playwright.config.ts + tests/e2e/app.e2e.ts smoke tests
  — launch, transport bar, zoom shortcuts, instrument picker
- Update InstrumentPicker tests to match new labels and correct type strings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents electron binary install from being blocked when running
pnpm add in any workspace package. Applies to all environments
(CI, new clones, other machines) — no more manual approve-builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…de-sync, axe

- Playwright e2e: 106 tests across splash, transport, keyboard, instrument picker,
  bug report, mixer, live-code, accessibility, and code-sync
- Fixed strict-mode violations (exact:true on all role/button lookups)
- Wired InstrumentPicker modal into LiveCode (was using inline dropdown)
- WCAG AA contrast: raised all muted text to #7a7a8a+ on dark backgrounds
- BarCounter: removed opacity-based dimming, now uses explicit computed colors
- DraggablePanel: added aria-valuenow/min/max to resize handle (WCAG)
- axe-core: injected directly via page.evaluate() (Electron-compatible)
- Code-sync: exposed window.__scoreEditor in CodeEditorPanel for test reads
- Bug report path: fixed off-by-one (5 levels up to 4) for debug/report.json
- Audio muting: belt-and-suspenders SCORE_TEST=1 mute in transport:play handler
- Tab navigation: .toPass() polling for headless Electron focus reliability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rt wiring

- CodeHighlight: fix TRACK_LINE_RE to include all instruments (Cowbell808,
  HihatOpen808, Clap909, KickHardstyle/Hardcore, SuperSaw, WobbleBass, etc.)
  HihatOpen808 had lowercase 'open' causing track-to-line mapping cascade bug
- DSL: add .tone(hz) chain method (20-20000 Hz, maps to Snare bandpass filter)
- DSL: fix SubSynth instrumentType 'sub-synth' → 'subsynth' to match registry
- Engine: map _tone → props.tone in partToInstrumentDescriptor
- LiveCode: wire getCurrentCode + bugEngineState into TransportBar for reports
- Bug report: remove shell.openPath (no longer opens Explorer on save)
- Main: hard-cut audio on panic stop (kills reverb tails), restore 0.72 on play
- Main: belt-and-suspenders SCORE_TEST mute in transport:play handler
- ReferencePanel: remove .tone() from Snare docs (was not previously implemented)
- CodeHighlight tests: 68 new instrument recognition tests (Track + const styles)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant