Skip to content

fix: synchronize remote connection status across dialog and sidebar - #2843

Merged
bobleer merged 4 commits into
GCWing:mainfrom
bobleer:bob/relay-connected-status-sync
Sep 6, 2026
Merged

fix: synchronize remote connection status across dialog and sidebar#2843
bobleer merged 4 commits into
GCWing:mainfrom
bobleer:bob/relay-connected-status-sync

Conversation

@bobleer

@bobleer bobleer commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

After an account-authenticated browser connected, the QR detail could show Connected while the overview and sidebar still reported no connection. Closing the dialog could also retire the temporary invitation and hide the account connection even though the controller remained online.

Track account control from successful authenticated control heartbeats independently of room invitations. Expose its relay URL alongside the optional connection flag, and share one confirmed status snapshot across the QR detail, overview, and sidebar. Leaving an unfinished invitation may cancel that invitation; it does not disconnect or hide the independent account route. Room disconnect remains a separate action.

Type and Areas

Bug fix. Desktop/Tauri account routing status and Web UI remote connection presentation/lifecycle.

Motivation / Impact

Connection, disconnection, and recovery are reflected across all three UI locations, including after navigating back, closing, and reopening the dialog. An account connection on one relay does not make an invitation for another relay appear connected. Merely logging in does not imply that a controller is connected.

Verification

  • Passed CARGO_TARGET_DIR=/tmp/openbitfun-relay-status-cargo-20260906 cargo test --locked -p openbitfun-desktop --lib api::remote_connect_api::sync_state_tests: 23 tests covering authenticated browser/phone heartbeat acceptance, rejection of capability-only Peer probes, expiry, disconnect/reconnect, account and route replacement, account status without a room invitation, and legacy payload round trips. The build used an independent target directory.
  • Passed 86 focused frontend tests across seven files, including 12 cases that mount the real dialog, sidebar, and shared status hook. They cover QR → overview → close/reopen, sidebar controller/service rows, expiry/recovery, another relay on the same host, invitation regeneration, bot coexistence, unknown status, pending-start cleanup, and late reads during disconnect or manual tab selection.
  • Frontend command: pnpm --dir src/web-ui run test:run src/infrastructure/remote-connect/remoteConnectionState.test.ts src/infrastructure/remote-connect/remoteConnectStatus.test.ts src/app/components/RemoteConnectDialog/RemoteConnectDialog.status.test.tsx src/app/components/RemoteConnectDialog/RemoteConnectDialog.contract.test.ts src/app/components/RemoteConnectDialog/RemotePairingCard.test.tsx src/app/components/NavPanel/components/DeviceStatusControl.test.tsx src/app/components/NavPanel/deviceInterconnectionOverview.test.ts.
  • Passed pnpm run check:web (type checking, Appearance and theme governance) and pnpm run i18n:audit (0 warnings).
  • Passed pnpm run fmt:rs and git diff --check for the native status changes.

Reviewer Notes

The existing room status fields retain their meaning. account_control_connected and account_control_relay_url are additive and default when absent. Fresh connection results retain the Rust enum wire shape; the frontend accepts it alongside the restored status representation.

Remote coverage: focused fixtures exercise account Remote Control and ensure Peer Device Mode capability probes do not create a false mobile/browser connection. Standard browser and phone relay pages share the existing mobile-web connection-health Ping/Pong loop. Live native UI validation against the production relay remains pending for this follow-up. Browser closure expires within the existing 75-second idle window; a host relay disconnect clears the account lease immediately. Remote workspace execution and Detached Dispatch were not exercised for this status-only change.

AI-assisted. Merge with a merge commit after all checks pass on the final PR head.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer bobleer changed the title fix: synchronize relay invitation status with account control fix: synchronize remote connection status across dialog and sidebar Sep 6, 2026
@bobleer
bobleer merged commit 71266d0 into GCWing:main Sep 6, 2026
13 checks passed
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