These tests cover parseSinkLine and parseSinks, which parse the output of
wpctl status. Both functions will be removed in the next commit as part of
migrating away from PipeWire/wpctl to pure SDL_mixer volume control.
- mixer.Init: convert database 'default' to '' for SDL default device
- AudioOptions.Init: fallback to first SDL device when current device is default
and config stores 'default'
Fixes known issue from changelog.txt
Primary fix: checkState() now detects when both old and new states map
to the HOME page (DOWNLOADING_ASSETS and READY) and skips re-navigation.
This prevents destroying and recreating the Home page, which would
close the already-closed DownloadDone channel.
Defense-in-depth: Home.downloadDone flag prevents close if a new Home
page somehow reaches the close path.
12 application tests, 4 page tests, 18 mixer tests (34 total).
Tests cover: prerequisite priority ordering, state blocking on
downloads, non-blocking channel read, double-close guard, download
failure path, and repeated computeState calls.
When transitioning from DOWNLOADING_ASSETS to READY, checkState()
re-navigates to HOME. The new Home page sees the already-closed
MessageChannel and tries to close DownloadDone again, causing a
panic that restarts the process.
Guard the close with a downloadDone bool field on Home.
F2 (scroller) and F3 (settings) now work while audio downloads are in
progress. Only blocked during early prerequisites: no wifi, no email,
no license key.
network.init() no longer panics when D-Bus is unavailable (logs warning
instead). This allows go test to run in the nix build sandbox.
checkState() now calls computeState() which returns the target state
without triggering page navigation (which requires OpenGL). Tests call
computeState() directly, avoiding the SIGSEGV from gl.GenVertexArrays.
7 regression tests for state machine, all passing.
State machine now uses DOWNLOADING_ASSETS before READY. Downloads closing
the DownloadDone channel signals checkState() to proceed. Download failure
sets downloadFailed flag which prevents READY. Audio files moved from
~/.local/share/rhemawave/audio to ~/.radiantwave/audio/.
Regression tests in application_test.go (linux build-tagged due to
network package D-Bus init). Version 0.6.
- SwitchDevice volume silently zeroed: Init uses cfg.SavedVolume,
SwitchDevice restores saved volume after reopening device
- SwitchDevice not persisted to database: caller saves SelectedAudioDevice
- Device restore passes invalid 'system default' to SDL: now passes ''
- Stop() no-op when audio toggled off: removed AudioEnabled guard
Regression tests added for all 4 bugs. CI now runs go test before build.
Play() held mu then called SwitchDevice() which also tried to acquire mu,
causing a deadlock. Replace with direct call to openDeviceLocked() which
does not lock.
Add regression test that verifies Play() returns an error (not deadlock)
when called on an uninitialized mixer.
The // operator does shallow merge, so packages.x86_64-linux.test-vm
overwrote the entire packages.x86_64-linux attrset, losing the default
package. nixpkgs.lib.recursiveUpdate properly merges nested attrsets.
Remove dead 'currentVolume' variable that was never written to, causing
SwitchDevice to always restore volume to 0 after switching audio devices.
- Remove currentVolume from package state
- SwitchDevice now sets mix.MAX_VOLUME after reopening device
- GetVolume128 now queries SDL directly instead of reading stale variable
- Fix parseSinkLine not stripping trailing ']' from [vol: X.XX] (caused
volume to silently parse as 0 for sinks without MUTED tag)
- Fix flake.nix: make wayland/X11 buildInputs Linux-only for macOS compat
- Add unit tests for parseSinks, parseSinkLine, and ConvertVolume
- Add changelog.txt tracking all audio bug fixes
Remove dead 'currentVolume' variable that was never written to, causing
SwitchDevice to always restore volume to 0 after switching audio devices.
- Remove currentVolume from package state
- SwitchDevice now sets mix.MAX_VOLUME after reopening device
- GetVolume128 now queries SDL directly instead of reading stale variable
- Add unit tests for parseSinks, parseSinkLine, and ConvertVolume
- Add changelog.txt tracking all audio bug fixes
- Fixed detectSecurity() where WPA2 (0x100/PSK) and WPA3 (0x400/SAE)
flags were swapped, causing NM to reject connections silently
- Added missing AP path to AddAndActivateConnection call
- Added critical connection settings: UUID, interface-name,
autoconnect, permissions
- Changed init() to fail fast with logger.Fatal instead of
silent failure on NM connection error
- Added auth-alg and psk-flags to WPA/WPA2 security settings