feat(client): show + change the configured server URL from the login screen #235

Closed
opened 2026-06-23 12:04:10 +00:00 by james · 0 comments
Owner

Context

On native (Android, Linux Flatpak) the first-launch flow captures the server URL via the /server-setup screen and stashes it in expo-secure-store. Once stored, the login screen prompts for credentials with no indication of which instance you're about to authenticate against. If you mistyped the URL during setup, or you've been away and forgotten which Carol instance the build is pointed at, your only recourse today is to land in the app, navigate to Account → "Change server" — but you can't reach the Account screen without successfully signing in.

Show the configured server on the login screen and give the user a way to change it without going through Account.

Source

User-reported (June 2026).

Scope

In apps/client/app/login.tsx:

  • Below the email + password form, render a small read-only row:
    • Label: "Signing in to"
    • Value: the current server URL (from getCachedServerUrl() after loadServerUrl() resolves; mirror the pattern in apps/client/app/(app)/account.tsx's ServerCard).
    • Affordance: a "Change server" link/button that calls router.replace("/server-setup").
  • The row is native + Tauri only (the off-origin gate). On the PWA the bundle is same-origin with the API and there's no URL to show; render nothing.
  • Sentence case, no emoji, Carol's voice. New i18n keys go under the existing login.* namespace, mirroring account.server.*. Suggested:
    • login.connectedTo"Signing in to {url}."
    • login.changeServer"Change server"

Visual treatment: small text, secondary-muted color, sit below the submit button so the form itself stays primary.

Out of scope

  • Adding an inline URL editor on the login screen — kick to /server-setup instead. That screen is the source of truth for URL validation + persistence.
  • Showing the server URL on the /server-setup screen itself (it already does, on its way to being replaced).
  • Web — same-origin means there's no URL to surface.
  • Showing the actual instance name / branding from /api/health or similar (Carol doesn't expose a public instance label today).

Acceptance criteria

  • On Android / Tauri shell, the login screen shows the configured server URL below the form.
  • Tapping "Change server" navigates to /server-setup and lets the user enter a new URL.
  • After changing the URL, the user returns to /login and the displayed URL reflects the new value.
  • On the PWA (true web, same-origin) the row is absent — the layout doesn't leave a gap.
  • All strings via react-i18next, no hardcoded copy. DS tokens via useTheme().

Composes with

  • #187 — Android pipeline + runtime URL plumbing (lib/serverUrl.ts, getCachedServerUrl).
  • #188 — Linux Flatpak (Tauri shell, same off-origin behaviour).

Part of

Standalone — no parent epic. Could fold into a future "native UX polish" ticket if multiple small QoL fixes accumulate.

## Context On native (Android, Linux Flatpak) the first-launch flow captures the server URL via the `/server-setup` screen and stashes it in `expo-secure-store`. Once stored, the login screen prompts for credentials with **no indication of which instance you're about to authenticate against**. If you mistyped the URL during setup, or you've been away and forgotten which Carol instance the build is pointed at, your only recourse today is to land in the app, navigate to Account → "Change server" — but you can't reach the Account screen without successfully signing in. Show the configured server on the login screen and give the user a way to change it without going through Account. ## Source User-reported (June 2026). ## Scope In `apps/client/app/login.tsx`: - Below the email + password form, render a small read-only row: - Label: `"Signing in to"` - Value: the current server URL (from `getCachedServerUrl()` after `loadServerUrl()` resolves; mirror the pattern in `apps/client/app/(app)/account.tsx`'s ServerCard). - Affordance: a "Change server" link/button that calls `router.replace("/server-setup")`. - The row is **native + Tauri only** (the off-origin gate). On the PWA the bundle is same-origin with the API and there's no URL to show; render nothing. - Sentence case, no emoji, Carol's voice. New i18n keys go under the existing `login.*` namespace, mirroring `account.server.*`. Suggested: - `login.connectedTo` → `"Signing in to {url}."` - `login.changeServer` → `"Change server"` Visual treatment: small text, secondary-muted color, sit below the submit button so the form itself stays primary. ## Out of scope - Adding an inline URL editor on the login screen — kick to `/server-setup` instead. That screen is the source of truth for URL validation + persistence. - Showing the server URL on the `/server-setup` screen itself (it already does, on its way to being replaced). - Web — same-origin means there's no URL to surface. - Showing the actual instance name / branding from `/api/health` or similar (Carol doesn't expose a public instance label today). ## Acceptance criteria - [ ] On Android / Tauri shell, the login screen shows the configured server URL below the form. - [ ] Tapping "Change server" navigates to `/server-setup` and lets the user enter a new URL. - [ ] After changing the URL, the user returns to `/login` and the displayed URL reflects the new value. - [ ] On the PWA (true web, same-origin) the row is absent — the layout doesn't leave a gap. - [ ] All strings via `react-i18next`, no hardcoded copy. DS tokens via `useTheme()`. ## Composes with - [#187](https://forge.wynning.tech/james/carol/issues/187) — Android pipeline + runtime URL plumbing (`lib/serverUrl.ts`, `getCachedServerUrl`). - [#188](https://forge.wynning.tech/james/carol/issues/188) — Linux Flatpak (Tauri shell, same off-origin behaviour). ## Part of Standalone — no parent epic. Could fold into a future "native UX polish" ticket if multiple small QoL fixes accumulate.
james closed this issue 2026-06-23 12:28:17 +00:00
Sign in to join this conversation.
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
james/carol#235
No description provided.