Skip to content

Add terrain-aware virtual shifting and reliable device reconnection#6

Merged
lookfirst merged 5 commits into
mainfrom
feat/intelligent-virtual-shifting
Jul 20, 2026
Merged

Add terrain-aware virtual shifting and reliable device reconnection#6
lookfirst merged 5 commits into
mainfrom
feat/intelligent-virtual-shifting

Conversation

@lookfirst

Copy link
Copy Markdown
Collaborator

Summary

  • add terrain-aware Zwift Click virtual shifting with a proportional 1–24 gear curve, immediate gear changes, and recorded gear history
  • centralize remembered Bluetooth device discovery, bounded GATT attempts, notification setup, retry scheduling, and page cleanup
  • reconnect the trainer, heart-rate monitor, and Click controllers independently and in parallel while deduplicating work for each physical device
  • use advertisement wake detection for compatible devices and direct retries for heart-rate monitors that do not reliably expose advertisements through Chrome
  • clarify device connection status with animated Connecting... labels, stronger activity indicators, and delayed recovery guidance only when automatic reconnect is configured and a remembered device remains disconnected
  • harden Tailwind diagnostics with readiness checks, a conflict canary, and explicit detection for scoped border/divider color conflicts
  • correct the footer repository link

Why

The Bluetooth adapters previously loaded remembered devices and scheduled reconnects independently. That allowed overlapping browser and GATT work, made a slow or sleeping sensor affect connection timing, and left the heart-rate monitor dependent on an advertisement signal it may never expose through Chrome. The shared catalog and coordinator make the process smaller, parallel, bounded, and easier to debug.

The Tailwind language-server check could also finish before diagnostics were trustworthy, allowing editor-visible class conflicts to escape CI.

Impact

Remembered devices begin reconnecting together after reload, one failed sensor no longer blocks another, and the tray presents one stable connection state. Virtual shifting now scales terrain resistance without losing workout grade behavior.

Validation

  • bun run ci
  • 192 tests passing
  • Tailwind diagnostics passing for 103 source files
  • TypeScript check passing
  • production Vite build passing

@lookfirst
lookfirst merged commit 99cc54e into main Jul 20, 2026
1 check passed
@lookfirst
lookfirst deleted the feat/intelligent-virtual-shifting branch July 20, 2026 21:27
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