Skip to content

Keep remembered devices reconnecting - #36

Merged
ridecontrol merged 1 commit into
mainfrom
fix/persistent-remembered-device-reconnect
Aug 2, 2026
Merged

Keep remembered devices reconnecting#36
ridecontrol merged 1 commit into
mainfrom
fix/persistent-remembered-device-reconnect

Conversation

@ridecontrol

Copy link
Copy Markdown
Collaborator

What changed

  • keep remembered Bluetooth devices retrying through long offline periods
  • shorten stale background heart-rate GATT probes from 30 seconds to 5 seconds
  • re-arm remembered offline trainer, heart-rate, and Click devices when a new session starts
  • preserve cancellation after manual disconnect, stopped connection attempts, and page teardown
  • document the reconnect lifecycle and add focused regression coverage

Why

An asleep heart-rate monitor could leave Chrome waiting on one stale GATT connection probe for up to 30 seconds. Although retry scheduling had no fixed attempt limit, that long blocked probe made reconnection appear to have timed out and made unpairing and pairing seem faster. Session creation also did not explicitly restart devices whose automatic reconnect had previously been stopped.

Impact

Remembered devices continue reconnecting without a retry ceiling while the page remains open. Heart-rate monitors receive fresh connection probes promptly after waking, and every new session restarts only remembered devices that are offline—not devices that are already connected or currently connecting.

Validation

  • bun run ci
  • 377 tests passed
  • Biome and Tailwind diagnostics passed
  • TypeScript check passed
  • production build passed

@ridecontrol
ridecontrol merged commit 35fd503 into main Aug 2, 2026
2 checks passed
@ridecontrol
ridecontrol deleted the fix/persistent-remembered-device-reconnect branch August 2, 2026 01:47
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