fix: synchronize remote connection status across dialog and sidebar - #2843
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.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.pnpm run check:web(type checking, Appearance and theme governance) andpnpm run i18n:audit(0 warnings).pnpm run fmt:rsandgit diff --checkfor the native status changes.Reviewer Notes
The existing room status fields retain their meaning.
account_control_connectedandaccount_control_relay_urlare 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