Commit Graph
247 Commits
Author SHA1 Message Date
NeilClack 85402b42f3 Update actions targets 2026-08-08 00:27:47 -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 2e700212b9 Merge dev: AudioTrack table, download sync, audio fallback 2026-07-29 16:19:24 -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 2a93600f14 Update email address for build notifications 2026-07-28 06:29:35 -05:00
NeilClack 26f549faa1 Add --impure flag to nix build command 2026-07-28 06:05:22 -05:00
NeilClack f0d1b18dfb Set ALLOW_UNFREE true 2026-07-27 16:58:04 -05:00
NeilClack ef0c4d663f Add nix inside of the container 2026-07-27 16:47:53 -05:00
NeilClack 51a5e00462 Update main build to on push 2026-07-27 15:28:28 -05:00
NeilClack 7daf7f0cdc Update runner tag 2026-07-27 15:08:24 -05:00
NeilClack 72f20d74a5 Migrate actions to Gitea 2026-07-27 15:07:36 -05:00
NeilClack b1a5a670ab Add audio list 2026-07-27 13:14:37 -05:00
NeilClack 5854c57f6f changelog: update fixed issues list, remove known issues 2026-07-12 18:17:22 -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 59dab955af Move un-implemented items to Unreleased section
- 'system default' conversion in SwitchDevice still exists (partially fixed)
- wpctl interface abstraction not implemented
2026-07-11 17:14:32 -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 2cc5071731 ci: trigger dev build on push 2026-07-11 11:42:17 -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 fca6354829 Create Docker build pipeline for MacOS 2026-07-10 17:12:48 -05:00
NeilClack 313db8ccd1 fix: rewrite cmd_diagnose to use script upload instead of nested SSH quoting 2026-07-10 16:02:02 -05:00
NeilClack b88caa291d feat: test VM build/run script with SSH diagnostics
- nixos/vm.nix: enable PasswordAuthentication for kiosk user (SSH test access)
- scripts/test-vm.sh: one-command build → start → diagnose workflow
  - macOS: builds and runs on remote Linux server, SSH through server
  - Linux: builds and runs locally
  - Commands: --build, --start, --stop, --diagnose, --shell
  - Diagnostics: NetworkManager, PipeWire, wpctl, ALSA, pactl, processes, logs
- AGENTS.md: compact agent guide for the repo
2026-07-10 15:37:32 -05:00
NeilClack 779bc77c5b fix: use recursiveUpdate instead of // to preserve packages.default
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.
2026-07-10 14:18:47 -05:00
NeilClack 3e3c174032 feat: expose test-vm as a package output for remote building 2026-07-10 14:15:46 -05:00
NeilClack 68b3680e32 fix: make wayland/X11 buildInputs Linux-only for macOS dev shell
wayland, wayland-protocols, libxkbcommon, libdecor, libx11, libxext
are Linux-only and prevent nix develop from working on macOS.
2026-07-10 14:00:48 -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 6ad6516a74 Remove backup file 2026-07-02 20:46:19 -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 3a916c28d5 Merge branch 'dev' 2026-06-28 02:25:12 -05:00
NeilClack e80e37f7e5 Merge remote-tracking branch 'origin/main' into dev 2026-06-28 02:23:54 -05:00
NeilClack fd10201f75 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 09:07:10 +02:00