157 Commits
Author SHA1 Message Date
NeilClack 312f5e2a90 Rename rhemawave to radiantwave throughout
build-prod.yml / build (push) Failing after 2s
build-dev.yml / build (push) Failing after 2s
2026-08-08 01:20:11 -05:00
NeilClack 1b80265e80 Fix AudioOptions navigation 2026-08-08 00:59:22 -05:00
NeilClack 843170b282 Fix Output Device toggle 2026-08-08 00:54:18 -05:00
NeilClack 7cfbadf169 Enable audio output list even with only one device 2026-08-08 00:23:33 -05:00
NeilClack 2212cc9b78 Add audio device switching UI 2026-08-08 00:12:57 -05:00
NeilClack b54dbca2d5 Fix asset provisioning to strip embedded share/radiantwave root 2026-08-03 02:40:51 -05:00
NeilClack 11b25227d7 Rename app to radiantwave: embed and provision assets, drop proclamations 2026-08-03 01:54:27 -05:00
NeilClack 91711eef93 Replace AudioFile with AudioTrack, fix download+orphan+MD5 sync, always play original audio fallback
AudioTrack table replaces AudioFile (Filename, Name, AssignedFrequency,
MD5, Selected, Order) — fixes relative-path bug in scrollerPage.go that
caused "file not found" for single-track selection.

Download goroutine now:
  - Accepts *gorm.DB and updates AudioTrack.MD5 after each download.
  - Treats checksums.md5 as source of truth: removes local files and DB
    records not in the manifest (orphans).
  - Strips "./" prefix from manifest filenames (GNU md5sum format).

AudioOptions.go seeds 14 AudioTrack records matching server checksums.md5.
List background quad width matches the widest item (+ padding), centered.

scrollerPage.go switchAudioForFrequency falls back to original/selected
audio when a frequency has no matching track or file.  playOriginalAudio
is a no-op on repeat calls to avoid 5-second audio restart loop.

Fixes progress display: passes Max=0 during downloads so Home page shows
"x / X Files Downloaded" text instead of bogus "100.0%" percentage.

Downstream audio switching (DynamicAudio) verifies an AudioTrack exists
for the frequency before assigning it to a stream — frequencies without
a track (e.g. 528 Hz) gracefully use original audio instead.
2026-07-29 16:19:15 -05:00
NeilClack 3480e7594a Replace wpctl volume control with SDL_mixer VolumeMusic
Remove all PipeWire/wpctl system calls (SetDefaultSinkVolume,
listSinkIDs, listSinks, SetAllSinkVolumes, parseSinks, parseSinkLine,
Sink struct). Volume is now managed entirely through SDL_mixer's
VolumeMusic(), making audio fully system-agnostic.

Changes:
- mixer.go: delete ~170 lines of wpctl code; add SetVolume() public
  API using mix.VolumeMusic(math.Round(level * MAX_VOLUME))
- Init/Play/SwitchDevice set volume inline (they already hold the mutex)
- Play() now uses stored currentVolume instead of hardcoded MAX_VOLUME
- AudioOptions: SetAllSinkVolumes -> SetVolume
- mixer_test.go: add TestSetVolume (validation + error path coverage)
2026-07-29 14:58:15 -05:00
NeilClack 7a3b6a66b7 Remove wpctl parsing tests (TestParseSinkLine, TestParseSinks)
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.
2026-07-29 14:57:32 -05:00
NeilClack 6dda462884 Add audio selection 2026-07-29 14:46:11 -05:00
NeilClack b1a5a670ab Add audio list 2026-07-27 13:14:37 -05:00
NeilClack e090870b4d fix: SwitchDevice no longer passes 'system default' to SDL
- SwitchDevice: pass '' (empty string) for default device instead of 'system default'
- Fixes 'Device restore path passes invalid device name to SDL' in changelog
2026-07-12 18:16:18 -05:00
NeilClack c98b84a3a8 fix: active device highlight incorrect when using default device
- 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
2026-07-12 18:15:41 -05:00
NeilClack cbb10ecda3 Merge remote-tracking branch 'origin/main' into dev
# Conflicts:
#	internal/mixer/mixer.go
#	internal/page/home.go
2026-07-11 17:46:50 -05:00
NeilClack f29d1d1af5 Bump version to 07112026-1710; move completed items to release section 2026-07-11 17:10:59 -05:00
NeilClack 2ef826fe63 Fix double-close panic on DownloadDone: skip re-navigation between HOME-mapped states
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.
2026-07-11 16:43:16 -05:00
NeilClack a93e475899 Fix double-close panic on DownloadDone channel
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.
2026-07-11 16:36:15 -05:00
NeilClack 336f407499 Allow F2/F3 during DOWNLOADING_ASSETS state
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.
2026-07-11 15:27:01 -05:00
NeilClack 363e6f81f6 Fix CI: extract computeState() for testability; make network init non-fatal
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.
2026-07-11 14:42:49 -05:00
NeilClack 3f8144a708 Gate READY on download completion; move audio to ~/.radiantwave/audio
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.
2026-07-11 13:43:05 -05:00
NeilClack bb132ceeaf fix: resolve 4 critical audio mixer bugs (v0.5)
- 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.
2026-07-11 11:39:58 -05:00
NeilClack 72910e7006 fix: prevent Play() deadlock when device is not open
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.
2026-07-11 10:16:15 -05:00
NeilClack 141613f571 Update version string to indicate audio-bug-fixes 2026-07-11 09:01:05 -05:00
NeilClack 9bc0fd6820 fix: restore SDL volume to MAX after device switch
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
2026-07-10 14:00:33 -05:00
NeilClack 2bcb36669f fix: restore SDL volume to MAX after device switch
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
2026-07-10 13:56:06 -05:00
NeilClack c232d417ba Update version string 2026-06-28 15:18:27 -05:00
NeilClack 6ad8a19f2a Increase startup volume to 1.0 2026-06-28 15:11:35 -05:00
NeilClack ff975aaf23 Reduce log level to INFO 2026-06-28 15:06:35 -05:00
NeilClack 46a00d2ad8 Remove config print 2026-06-28 15:06:06 -05:00
NeilClack e461837d79 Move logs to the left of screen
Logs were too long, running off screen and preventing
reading the whole log. This is still a problem, but
a lot of the logs are more visible now
2026-06-28 12:40:23 -05:00
NeilClack e7041894ba Merge pull request 'Fix network connection timeouts and security detection' (#59) from wifi-fix-06-28-2026 into dev
Reviewed-on: https://codeberg.org/RhemaWave-Technologies/RhemaWave/pulls/59
2026-06-28 02:04:52 -05:00
NeilClack 193ebbcb27 Fix network connection timeouts and security detection
- 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
2026-06-28 01:56:35 -05:00
NeilClack 3bcfce2617 use logger instead of printf 2026-06-27 17:06:14 -05:00
NeilClack 8567cd5bdb add extra case to waitForConnection 2026-06-27 17:04:34 -05:00
NeilClack b0947bd594 Fix bugs in WiFi page 2026-06-27 16:51:18 -05:00
NeilClack 7e598f191f Update Network package 2026-06-27 16:01:33 -05:00
NeilClack ba39ed85a9 Remove wal and shm deletion 2026-06-27 15:09:51 -05:00
NeilClack 8ec1cbbc48 Log the app config in Debug 2026-06-27 14:50:50 -05:00
NeilClack 0b43a98298 Remove unused function in download package 2026-06-27 14:25:51 -05:00
NeilClack 2c88b7ffc5 Add creation of audio directory and remove unused function in download package 2026-06-27 14:25:25 -05:00
NeilClack f00cb9efb6 Fix download progress and prevent re-downloading existing audio. 2026-06-27 13:59:22 -05:00
NeilClack 18c57c9101 Remove calls to RefreshConfig 2026-06-27 12:57:29 -05:00
NeilClack cc7917b549 add log statement to debug crash in dev system 2026-06-27 12:30:35 -05:00
NeilClack 9fc72e0094 Move noisy logs to debug 2026-06-27 12:30:23 -05:00
NeilClack ca18000c8e Update version string for validation 2026-06-27 01:47:06 -05:00
NeilClack 01b462fc74 Add visual queue to check updates are performed 2026-06-27 01:32:24 -05:00
NeilClack 91f3afd517 Potentially fixed text input on kiosk machine 2026-06-27 01:08:55 -05:00
NeilClack 2fac3ab6a8 Replace textInputSupported flag 2026-06-27 00:37:07 -05:00
NeilClack 3ef8f3db92 Resolve empty config issue 2026-06-26 23:35:29 -05:00