feat(desktop): let the user set and persist the server URL #65

Merged
Claude-Run merged 1 commit from feat/VAPP-54-desktop-server-url-config into main 2026-06-29 22:12:45 +02:00
Member

The desktop (wry) build had no way to point the embedded server fns at a vervain-server: both base URLs came only from the VERVAIN_SERVER_INTERNAL_URL / VERVAIN_SERVER_PUBLIC_URL env vars, which a desktop user has no container to set, so every server fn returned "server URL not configured" and login was impossible.

Add a desktop-only persisted "Server URL". internal_base_url() and public_base_url() now fall back to it when their env var is unset (env var still wins, so the web/container deployment is unchanged), gated on #[cfg(feature = "desktop")]. One stored value feeds both roles since the desktop user dials the public origin directly. The value persists to the OS config dir (directories) as JSON.

UI: the Settings Connection card becomes an editable "Server URL" field on desktop (the web build keeps the read-only, env-var-driven display and the admin-only internal row). A first-run prompt above the sign-in form lets a fresh install set the URL and log in without restarting, since a logged-out user cannot reach Settings. Entries are validated to http(s)://host[:port] server-side, with the rejection reason surfaced inline.

#VAPP-54

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

The desktop (wry) build had no way to point the embedded server fns at a vervain-server: both base URLs came only from the VERVAIN_SERVER_INTERNAL_URL / VERVAIN_SERVER_PUBLIC_URL env vars, which a desktop user has no container to set, so every server fn returned "server URL not configured" and login was impossible. Add a desktop-only persisted "Server URL". `internal_base_url()` and `public_base_url()` now fall back to it when their env var is unset (env var still wins, so the web/container deployment is unchanged), gated on `#[cfg(feature = "desktop")]`. One stored value feeds both roles since the desktop user dials the public origin directly. The value persists to the OS config dir (`directories`) as JSON. UI: the Settings Connection card becomes an editable "Server URL" field on desktop (the web build keeps the read-only, env-var-driven display and the admin-only internal row). A first-run prompt above the sign-in form lets a fresh install set the URL and log in without restarting, since a logged-out user cannot reach Settings. Entries are validated to `http(s)://host[:port]` server-side, with the rejection reason surfaced inline. #VAPP-54 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(desktop): let the user set and persist the server URL
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 52s
Create release / Create release from merged PR (pull_request) Has been skipped
5d5d28e1b1
The desktop (wry) build had no way to point the embedded server fns at a vervain-server: both base URLs came only from the VERVAIN_SERVER_INTERNAL_URL / VERVAIN_SERVER_PUBLIC_URL env vars, which a desktop user has no container to set, so every server fn returned "server URL not configured" and login was impossible.

Add a desktop-only persisted "Server URL". `internal_base_url()` and `public_base_url()` now fall back to it when their env var is unset (env var still wins, so the web/container deployment is unchanged), gated on `#[cfg(feature = "desktop")]`. One stored value feeds both roles since the desktop user dials the public origin directly. The value persists to the OS config dir (`directories`) as JSON.

UI: the Settings Connection card becomes an editable "Server URL" field on desktop (the web build keeps the read-only, env-var-driven display and the admin-only internal row). A first-run prompt above the sign-in form lets a fresh install set the URL and log in without restarting, since a logged-out user cannot reach Settings. Entries are validated to `http(s)://host[:port]` server-side, with the rejection reason surfaced inline.

#VAPP-54

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-apps!65
No description provided.