Route Discovery from rownative.icu
-Search the mirrored rownative.icu course catalogue, import a route with one click, and keep the imported course alongside the Willowbrook demo in your route library.
- -From b441d1bf5f914b75ce2441ce628661c7bed58752 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Jul 2026 11:44:05 +0000 Subject: [PATCH] Revert "Simplify VirtualRow to Willowbrook demo + rownative route import (#170)" This reverts commit c0183328df05b07c429371590f4aa5406bfc0370. --- DEVELOPMENT.md | 17 +- README.md | 18 +-- docs/index.html | 30 +--- src/App.tsx | 203 +++++++++++++++++++----- src/__tests__/app.test.tsx | 10 +- src/__tests__/routeService.test.ts | 11 +- src/components/RownativeRouteImport.tsx | 45 ++++-- src/data/seedRouteCoordinates.ts | 8 +- src/services/routeService.ts | 8 +- 9 files changed, 234 insertions(+), 116 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index eef1176..1d0de46 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -18,7 +18,7 @@ Service Layer (Business Logic) heartRateBluetoothService (HR Monitor) routeService (Route Management) workoutService (Workout Tracking) - rownativeService (Route Discovery / Import) + workoutGeneratorService (Structured Workouts) External APIs & Hardware Web Bluetooth API (PM5/HR Devices) @@ -47,8 +47,10 @@ src/ BluetoothDevice.tsx # PM5 connection UI HeartRateMonitor.tsx # HR monitor connection HeartRateChart.tsx # HR visualization + HeartRateZonesChart.tsx # HR zones display PM5Simulator.tsx # PM5 hardware simulator - RownativeRouteImport.tsx # rownative.icu search/import UI + WorkoutGenerator.tsx # Structured workout UI + WorkoutProgressDisplay.tsx MiniMetrics.tsx # Compact metrics overlay PerformanceChart.tsx # Performance graphs Canvas3DErrorBoundary.tsx @@ -60,9 +62,9 @@ src/ bluetoothService.ts # PM5 Bluetooth communication heartRateBluetoothService.ts # HR monitor service pm5SimulatorService.ts # PM5 simulation - routeService.ts # Demo route data + imported routes - rownativeService.ts # rownative.icu course catalogue + routeService.ts # Route data management workoutService.ts # Workout session tracking + workoutGeneratorService.ts # Structured workouts utils/ geoUtils.ts # Geographic calculations gpuUtils.ts # WebGL/GPU detection @@ -86,11 +88,11 @@ playwright/ `App.tsx` owns all application state. There is no global state library; all data flows via props and callbacks: -- `currentView`: `'routes' | 'workout'` +- `currentView`: `'routes' | 'workouts' | 'workout' | 'history'` - `sessionState`: `'idle' | 'active' | 'paused'` -- `selectedRoute`, `currentSession` — active session data +- `selectedRoute`, `selectedWorkout`, `currentSession` — active session data - `pm5Data`, `heartRateSamples` — live device streams -- `workoutHistory` — persisted sessions used for local personal-best tracking +- `workoutHistory`, `workoutProgress` — persistence + workout tracking A session auto-ends when `pm5Data.distance ≥ 99.5% of route.distance`. This auto-end is suppressed under the `window.__PLAYWRIGHT_TESTING` flag used by E2E tests. @@ -112,6 +114,7 @@ The main 3D visualization component (~2000 lines) using React Three Fiber: Fullscreen HUD rendered on top of the 3D canvas during an active workout: - Live metrics: pace (s/500m), power (W), distance (m), elapsed time, cadence (SPM), heart rate +- Workout progress when a structured workout is active (segment type, time remaining, compliance) - Pause/Resume control ### Services diff --git a/README.md b/README.md index f5b41fb..80bfd39 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -# VirtualRow — Willowbrook Demo + rownative.icu Routes +# VirtualRow — Row Anywhere on Real Water Routes [](https://github.com/MaximumTrainer/virtualrow/actions/workflows/pages.yml) [](https://github.com/MaximumTrainer/virtualrow/actions/workflows/playwright-e2e-clean.yml) **[🌐 Website](https://maximumtrainer.github.io/virtualrow/) · [📦 GitHub](https://github.com/MaximumTrainer/virtualrow)** -VirtualRow is a web-based fitness application that lets you row on a bundled Willowbrook River demo route or imported rownative.icu courses while connected to your Concept2 PM5 indoor rower via Bluetooth. Experience immersive 3D rowing visualization from your home. +VirtualRow is a web-based fitness application that lets you row on virtual water routes while connected to your Concept2 PM5 indoor rower via Bluetooth. Experience immersive 3D rowing visualization from your home. ## Features ### Water Routes -One built-in demo route ships with the app, and additional routes are imported from rownative.icu: +VirtualRow now ships with one bundled demo route: | Route | Location | Distance | Difficulty | |---|---|---|---| | Willowbrook River | Willowbrook Valley | 5.0 km | Easy | -Use Willowbrook as the demo/example route, then search and import additional courses from rownative.icu directly in the app. +To row real-world courses, search and import them directly from **rownative.icu** in the route selector. ### Immersive 3D Visualization @@ -34,7 +34,7 @@ Use Willowbrook as the demo/example route, then search and import additional cou - Connect directly to your Concept2 PM5 monitor via Web Bluetooth API (Concept2 CSAFE BLE profile) - Real-time performance metrics: pace, distance, time, power, stroke rate, calories -- Connection persists across route selection and activity views +- Connection persists across route changes and UI navigation - Built-in PM5 Simulator for testing and demo without physical hardware ### Heart Rate Monitoring @@ -72,7 +72,6 @@ src/ BluetoothDevice.tsx # PM5 connection UI HeartRateMonitor.tsx # HR monitor connection PM5Simulator.tsx # PM5 hardware simulator - RownativeRouteImport.tsx # rownative.icu route search + import UI MiniMetrics.tsx # Compact metrics overlay PerformanceChart.tsx # Post-session performance graphs HeartRateChart.tsx # Live HR chart @@ -85,9 +84,8 @@ src/ bluetoothService.ts # PM5 BLE communication heartRateBluetoothService.ts # HR monitor BLE service pm5SimulatorService.ts # PM5 simulation - routeService.ts # Demo route data + rownative route import - workoutService.ts # Session tracking + localStorage persistence - rownativeService.ts # rownative.icu catalogue + import + routeService.ts # Route data + rownative route import + workoutService.ts # Session tracking utils/ geoUtils.ts # Geographic calculations gpuUtils.ts # WebGL/GPU detection @@ -112,7 +110,7 @@ docs/ ```bash # Run unit tests (Vitest) -npm run test -- --run +npm test # Run unit tests in watch mode npm test -- --watch diff --git a/docs/index.html b/docs/index.html index 2581d25..55a5eff 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,8 +3,8 @@
- -VirtualRow connects your Concept2 PM5 to immersive 3D river environments @@ -611,7 +611,7 @@
From real Bluetooth hardware integration to rownative.icu route imports, - VirtualRow delivers training-grade rowing sessions directly in your browser. + VirtualRow focuses on route selection and live on-water activity.
Start on the Willowbrook River demo (~5 km), then search and import additional courses from rownative.icu. Progress syncs with your PM5 distance in real-time.
+Row the bundled Willowbrook River (~5 km) or search rownative.icu and import real-world routes instantly.
- -Search the mirrored rownative.icu course catalogue, import a route with one click, and keep the imported course alongside the Willowbrook demo in your route library.
- -