Skip to content

feat(remote): pairing UX, auto-connect setting, connection indicator, and bug fixes - #55

Merged
tallcode merged 2 commits into
mainfrom
dev
Jul 27, 2026
Merged

tallcode merged 2 commits into
mainfrom
dev

Conversation

@tallcode

Copy link
Copy Markdown
Collaborator

Summary

  • Pairing UX overhaul: merged status row with inline connect/disconnect/unpair buttons, second-step unpair confirmation dialog, QR-only waiting state with cancel, clean pairId display (no pair_ prefix, uppercase).
  • New Remote settings page (Settings → Desktop → Remote, dev-only): single toggle "auto-connect remote device on launch", wired end-to-end through app_settings (KV table, no migration needed). Backend autostart respects this setting + persisted credentials.
  • Sidebar remote connection indicator: shared app-level 3s poll feeds both the ActivityRail dot (blue=connected, amber=error, hidden=disconnected) and the RemoteView page — same source, their dots never drift. Poll is identity-stable to avoid full-tree re-render on no-op ticks.
  • Backend fix: status() None arm now surfaces the persisted pair_id so the frontend can correctly derive "paired" even when the bridge is stopped, eliminating a lastPairIdRef hack and fixing three states (restart with pairing, unpair cleanup, cancel-during-pairing phantom).
  • Detailed error logging in response_error (HTTP status, server error code, full body) for server-side failure diagnosis.

Test plan

  • Pairing flow: fresh pair → QR appears, no raw code, cancel returns to unpaired, scan completes → paired row shows with connect/disconnect/unpair
  • Already-paired state: restart → Settings → Remote → toggle auto-connect → restart → bridge auto-connects → sidebar blue dot
  • Connection indicator: sidebar blue/yellow/hidden mirrors Remote page status dot
  • Settings → Remote page visible in dev builds, hidden in release
  • Manual disconnect returns to "Paired" row, connect reconnects
  • Unpair via confirmation dialog clears pairing, row disappears

… and bug fixes

- Restructure RemoteView paired-state UI: inline connect/disconnect/unpair
  buttons in the status row, merged status display, uncurated pairId format
  (drop `pair_` prefix, uppercase), web client link moved below the note,
  unpair confirmation dialog with a second-step danger button.
- Hide the raw pairing code during QR waiting; keep only QR + copy + cancel.
  Cancel returns to the unpaired state cleanly (bridge stop, no phantom state).
- Add Remote settings page (Settings → Desktop → Remote, dev-only) with a
  single toggle: auto-connect remote device on launch. Wired end-to-end
  through app_settings (KV table, no migration).
- Backend: on startup, auto-connect to the single paired device when the
  user has opted in and credentials exist (dev-only, off by default).
- Backend: `status()` None arm now surfaces the persisted pair_id so the
  frontend's "paired" indicator correctly reflects stored credentials after
  a manual disconnect or an app restart, without a ref hack or a second poll.
- Sidebar: app-level shared remote status poll (3s, identity-stable to avoid
  full-tree re-render on no-op ticks). Sidebar indicator dot: blue (connected),
  amber (error), hidden otherwise. Both indicator and RemoteView read the
  same status source — their dots cannot drift apart.
- Add detailed error-logging to `response_error` so server-side failures
  (HTTP status, error code, full body) are visible in stderr.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@tallcode
tallcode enabled auto-merge (squash) July 27, 2026 14:06
@tallcode
tallcode merged commit 387d278 into main Jul 27, 2026
16 checks passed
@tallcode
tallcode deleted the dev branch July 27, 2026 14:14
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