Trim the Radio Next/Previous change to the HAL-722 scope

- Selections take the playback fallback as a `playFallback` option and
  set it after releasing a stale stream, instead of callers arming state
  that the release then had to save and restore.
- Move the tuner `station-unavailable` release and the Pause label while
  a stream connects out of this branch: both were wrong on main already
  and go in a separate change.
- Share the Radio layer test setup in src/testSupport/radioLayerHarness.mjs
  and fold overlapping Next/Previous tests (13 to 7).
- One-line comments and a two-line changelog entry.
This commit is contained in:
German Khokhlov committed 2026-10-30 16:37:36 +04:00
1 parent fa840ae3c3
commit a55450e2e7
10 files changed
+172 -340

No files matched your search

+1 -2
View File
@@ -328,8 +328,7 @@ export function bindRadioControls() {
const pool = this._radioTunerPool.length
? this._radioTunerPool
: this._radioTunerStations;
// Keep the step silent unless a stream is active. An active stream follows
// the selection, so the station label matches the broadcaster.
// Silent unless a stream is active; an active stream follows the selection.
const { audioState } = this.radio.getUIState();
const cycled = this.radio.cycleStation(direction, {
rotate,
+1 -3
View File
@@ -20,9 +20,7 @@ export function renderRadioState(state) {
const interactive = enabled && !transitioning && !uncertain;
const selected = state.selected || null;
const hasStations = state.filteredCount > 0;
const activePlayback = ['loading', 'buffering', 'playing'].includes(
state.audioState,
);
const activePlayback = ['playing', 'buffering'].includes(state.audioState);
document
.getElementById('title-bar')
?.classList.toggle('radio-broadcasting', state.audioState === 'playing');