Skip to content

Auto-connect to the portal on launch (no Connect button) #32

Description

@burkben

Part of #28.

Vision

The app should "just work" — on launch it should try to connect to the portal automatically, with no button press.

Change

On app start (BLE-capable device, not demo mode), automatically scan for HWiD and connect, surfacing progress via the status pill. No user action required in the happy path.

Acceptance criteria

  • On launch with BLE available and permissions granted, the app auto-scans and connects without a tap.
  • Demo mode (and web / iOS Simulator) does not auto-scan; it stays in simulated mode.
  • Missing/denied BLE permission is handled with a clear prompt/state — no crash, no infinite spinner.
  • Sensible retry/backoff when the portal isn't found or drops; no tight scan loop draining battery.
  • Respects the persisted "start in demo mode" preference (mockModeDefault).
  • Manual disconnect is still possible (see Epic: Navigation & home-screen redesign — bottom tab bar (Prop A) #28's pill-control story).

Technical notes

  • Today Live BLE never auto-starts: scanning is an explicit "Connect portal" action (apps/mobile/src/app/index.tsx transport effect, apps/mobile/src/ble/blePortal.ts). This story flips the default to auto-start on a real device.
  • Coordinate with the status-pill control story so connect/disconnect/retry stay coherent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions