Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces a one-way persistence migration and reworks server-startup logic affecting every existing install, and the author noted real Tauri/backend end-to-end runs were not performed, so human verification is warranted.
1 open finding
What changed in this PR
This PR fixes issue #1185, where a user's custom "Server URL" was discarded on startup/refresh. The root cause was that desktop (and web) startup unconditionally wrote the bundled/discovered server address into the store via setServerUrl, clobbering any saved custom value. The fix introduces a serverUrlSource ('auto' | 'custom') flag and a dedicated setDiscoveredServerUrl action that only applies an auto-discovered URL when the current source isn't 'custom', so user selections persist across restarts and even survive a save that happens while async startup is still pending.
Changes:
- Added
serverUrlSourcestate plussetDiscoveredServerUrl, and apersistversion bump (v1) with a conservativemigratethat only treats exact known defaults as'auto'and preserves everything else as'custom'. - Updated
App.tsxstartup paths (web and Tauri) to callsetDiscoveredServerUrlinstead ofsetServerUrl, removing the now-unusedisLoopbackVoiceboxServerUrlhelper. - Added a new Bun test suite covering persistence, migration, startup races, and cache invalidation.
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


Fixes #1185.
The server URL was already persisted, but desktop startup replaced it with the bundled server address. This change distinguishes user-selected URLs from automatically discovered ones, so startup preserves saved choices, including changes made while startup is pending.
Existing settings are migrated conservatively: only exact known defaults remain automatic. Other URLs, including custom loopback addresses, are preserved. Web same-origin defaults continue to work.
Validation:
The tests cover persistence, migration, startup races, and cache invalidation using in-memory storage. A real Tauri startup and backend end-to-end test were not run.