Summary#
- Replace compile-time
RELAY_CLIENTglobal static with runtime-configurablerelay_client: OnceLock<RelayClient>onAppState; all four Tauri commands migrated to state-based access - Add
get_relay_url/save_relay_urlIPC commands with URL validation (normalize_relay_url), live health-check against/xrpc/_health, and Keychain persistence (store_relay_url/load_relay_url) - Add
RelayConfigScreen.svelteonboarding step — pre-fillshttps://relay.ezpds.com, validates format, shows loading spinner and inline errors; returning users skip the screen on launch - Startup restore:
run()reads relay URL from Keychain and initializesAppStatebefore any command runs
Test plan#
-
cargo test— 6 new tests pass (normalize_relay_url_*,get_relay_url_returns_none_before_save,relay_url_round_trips_through_keychain); 2 pre-existingdevice_keysandbox failures unrelated to this change -
cargo clippy -- -D warnings— clean -
cargo fmt --all --check— clean -
pnpm checkandpnpm build— 0 errors - iOS Simulator smoke test — see
docs/test-plans/2026-03-27-relay-url-config.md