feedBack/tests/js
ChrisBeWithYou 6dbcc5861b
fix(player): keep play/pause button in sync when a JUCE reroute aborts autoplay's play() (#611)
On the first song after a fresh load on desktop, the audio engine is often
still starting when the song loads, so the song begins on the HTML5 <audio>
element and the engine-reroute watcher then migrates it to the JUCE backing
transport. The reroute's first step is a deliberate audio.pause(), which
rejects autoplay's in-flight togglePlay() audio.play() with an AbortError —
even though playback continues on JUCE.

togglePlay()'s catch then reset isPlaying=false and the button to "Play"
while the song kept playing: the button showed Play during playback, so it
took two clicks to actually pause (one to resync the flag, one to pause).
The reroute already guards the <audio> 'play'/'pause' DOM listeners with
window._juceRerouteInProgress; this extends the same guard to togglePlay()'s
catch and the count-in catch, so a play() rejection caused by the reroute's
own pause doesn't clobber the button. A genuine failure (outside a reroute)
still resets correctly.

Adds a regression test that drives togglePlay() through a reroute-aborted
play() and asserts the button stays Pause; it fails without the guard.


Claude-Session: https://claude.ai/code/session_01QbexxfTt8q2tAn436MqGWF

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:16:28 +02:00
..
alpha_warning_banner.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
app_tour_library.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
audio_effects_host.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_effects_test_harness.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_element_accessor.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
audio_session_compat.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_host.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_input.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_mix.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_monitoring.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_routes.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_stems_bridge.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_stems.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
audio_session_test_harness.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
autoplay_exit.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
beats_loaded.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_claims.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_diagnostics.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_lifecycle.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_manifest_runtime.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_multi_provider.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_ownership.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_test_harness.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capabilities_versioning.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
capability_inspector_nav.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
capability_inspector_render.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
diagnostics_summary.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
handshapes_pipeline.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_arp_deferral.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_3d_camera_framing.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_fret_label_render_order.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_fret_row_labels.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_fret_spacing.test.js fix(highway): apply 3D fret-spacing live instead of reloading (#561) (#562) 2026-06-22 12:08:22 +02:00
highway_3d_lean_sustain.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_lefty.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_3d_overlay_full_cover.test.js fix(highway): stop stale viz frame bleeding through after switching visualizations (#565) 2026-06-22 13:27:21 +02:00
highway_3d_panel_controls.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_3d_pool_warm.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_3d_render_order.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_resize_reframe.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_slide_target.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_smooth_clock_pause.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_3d_sustain_bloom.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_3d_sustain_rail.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_adaptive_scale.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_audio_barrier.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_bend_curve.test.js fix(bend): GP8 short-bend curve loss + 2D curve timing + 3D bnv gating (#535) 2026-06-21 00:46:36 +02:00
highway_chord_harmony.test.js feat(highway): render caged + guideTones teaching labels (§6.6) (#545) 2026-06-21 11:58:00 +02:00
highway_chord_render_cache.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_colors_facade.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_filtered_notes.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_monotonic_clock.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_note_state.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_pause_throttle.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_phrases.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
highway_renderer_swap_canvas_reset.test.js fix(highway): stop stale viz frame bleeding through after switching visualizations (#565) 2026-06-22 13:27:21 +02:00
highway_string_colors.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
highway_teaching_marks.test.js feat(highway): render teaching marks fg/ch/sd on 2D + 3D (§6.2.2) (#538) 2026-06-21 07:58:04 +02:00
highway_visibility.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
juce_engine_reroute.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
legacy_shim_hits.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
library_card_actions.test.js Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
live_guitar_tone_source.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
live_performance_hud.test.js fix(v3): reset live performance HUD on backward seek / restart (#607) 2026-06-27 00:47:43 +02:00
loop_api.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
loop_restart.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
midi_input_domain.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
note_detection_domain.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
pedal_cables.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
play_button_reroute_guard.test.js fix(player): keep play/pause button in sync when a JUCE reroute aborts autoplay's play() (#611) 2026-06-27 13:16:28 +02:00
playback_app_adapter.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
playback_compat.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
playback_diagnostics.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
playback_domain.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
playback_test_harness.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
plugin_style_injection.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
plugins_page.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
progress_calibration.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
progression_notifications.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
progression_progress_events.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
settings_autosave.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
song_close.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
song_event_payload.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
song_restart.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
song_seek.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
speed_reset.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
test_utils.js Clean release snapshot 2026-06-16 18:47:13 +02:00
tour_engine.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
tuner_auto_open.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
tuner_core.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
tuning_display.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
tuning_targets.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
v3_songs_scroll.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
v3_songs_tuning.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
venue_instrument_pov.test.js Clean release snapshot 2026-06-16 18:47:13 +02:00
venue_mood_fx.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
venue_scene_3d.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
venue_viz.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
visualization_domain.test.js rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00