Skip to content

feat: added option to start on a chosen device config - #45

Merged
ZortexSenpai merged 2 commits into
mainfrom
feat/startup-device-config
Dec 4, 2026
Merged

ZortexSenpai merged 2 commits into
mainfrom
feat/startup-device-config

Conversation

@ZortexSenpai

@ZortexSenpai ZortexSenpai commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Launches can be set to begin on one Device config, or on the system default, whichever was active when Reverb closed. Switching during a session is unchanged; only the next launch goes back.

 launch
   load settings.json
   reset direct scrobbling (if asked)
+  startup choice → active config (persisted, if it differs)
+    a config          → that config
+    System default    → none
+    Last used / a deleted config → unchanged
   start the engine on the active config
 Settings → Audio
   Device configs
     System default
     Config A
     Config B
+  Config at startup   [Last used ▾ | System default | Config A | Config B]   (shown once a config exists)
   Device sample rate

The choice is stored in startupDeviceConfig: a config id, the reserved "system-default" (config ids are nanoids or UUIDs, so none can be that), or null for Last used. Deleting the startup config resets the picker to Last used.

Evidence

  • Before: quit on Config B with Config A preferred → next launch plays on Config B.
    After: new test a_launch_switches_to_the_startup_config:
    active B,    startup A               → starts on A
    active none, startup A               → starts on A
    active B,    startup system-default  → starts on the system default
    active B,    startup none / deleted  → stays on B
    startupDeviceConfig round-trips under its name
    
  • deviceConfigs.test.ts: saving keeps the startup choice; deleting the startup config clears it, and deleting another one leaves it alone; the picker value resolves to a config id, system-default, or Last used.
  • cargo test -p reverb (93) and npm test (211) pass; tsc --noEmit and clippy are clean.

Tested by hand in the running app.

Merge Danger

Door: two-way

The new startupDeviceConfig field defaults to null, so existing settings files load unchanged, and older versions ignore the unknown field.

Blast Radius: startup

Runs on every launch, but changes nothing unless a startup choice is set. With one set, the engine opens that output at launch. If the choice is a locked config whose device is unplugged, Reverb pauses and waits, as a locked config already does.

🤖 Generated with Claude Code

ZortexSenpai and others added 2 commits December 4, 2026 23:52
A device config can be set as the startup config: every launch begins on
it, whichever config was active when Reverb closed. Switching configs
during a session works as before; only the next launch goes back. "Last
used" (the default) keeps today's behaviour.

- Backend: Preferences.startupDeviceConfig. At launch, before the engine
  is built from the preferences, the startup config becomes the active
  one, so the engine opens that output first. A startup config that no
  longer exists is ignored.
- App: "Config at startup" picker under the device config list (shown
  once there is a config). Deleting the startup config resets it to
  "Last used".
- Strings in all four languages; GLOSSARY.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Launches can now be set to start on the system default too, whichever
config was active when Reverb closed. Stored as the reserved value
"system-default" in startupDeviceConfig; config ids are nanoids or UUIDs,
so none can collide with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZortexSenpai
ZortexSenpai merged commit 0447046 into main Dec 4, 2026
10 checks passed
@ZortexSenpai
ZortexSenpai deleted the feat/startup-device-config branch December 4, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant