Skip to content

Comments

fix: show spinner on mobile while auto-reconnecting to saved server#176

Open
jfversluis wants to merge 1 commit intomainfrom
fix/mobile-loading-spinner-on-reconnect
Open

fix: show spinner on mobile while auto-reconnecting to saved server#176
jfversluis wants to merge 1 commit intomainfrom
fix/mobile-loading-spinner-on-reconnect

Conversation

@jfversluis
Copy link
Collaborator

Problem

On mobile, when the app opens with an existing saved remote connection, the connect form (QR scan + URL input) flashes briefly before the app reconnects. This is confusing — it looks like the connection was lost.

Fix

Added a mobileAutoConnecting flag that:

  1. Is set to true in OnInitializedAsync when saved remote settings exist
  2. Shows a "Connecting to server…" spinner (reuses existing restoring-indicator CSS) instead of the connect form
  3. Is cleared in a finally block after InitializeAsync completes (success or failure)
  4. Once cleared, either the app is connected (form hidden) or the connect form appears for manual entry

Changes

  • Dashboard.razor — 1 file, 19 lines added (no CSS changes needed, reuses existing spinner styles)

When the app opens on mobile with saved remote connection settings,
it now shows a 'Connecting to server…' spinner instead of flashing
the connect form. The connect form only appears if auto-reconnect
fails or no saved connection exists.

Adds mobileAutoConnecting flag set before InitializeAsync and cleared
in a finally block. Reuses existing restoring-indicator/spinner CSS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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