Commit Graph

6 Commits

Author SHA1 Message Date
Developer dd35b216d1 fix(website): persisted-only ride creation and reconciled replay timing (PR #38 hardening)
Phase 1 — group ride creation (no phantom rides):
- Check authentication and Firestore availability BEFORE touching UI state; an unauthenticated
  user (or unavailable Firestore) now gets an actionable error and no phantom ride, instead of a
  local entry that was never saved.
- Insert the ride into UI state ONLY after batch.commit() confirms the write; on commit failure
  nothing is inserted and an error is shown.
- Prevent duplicate submissions: the create modal disables its submit button while in flight, and
  the hub guards with a ref.
- The join code remains the real Firestore document id (no fabricated ids).
- Extract commitGroupRide (pure, dependency-injected) so every path is unit-testable.

Phase 2 — replay playback timing:
- The elapsed clock and rider marker both derive from the same cursor, so they cannot drift.
- Manual seeks (scrub, restart, corner jump, arrow keys) go through seekTo(), which reconciles
  playback timing (clears carry/last-frame) so no stale budget is applied after a seek.
- Make gap compression explicit: a caption labels the timeline as recorded elapsed time and warns
  that dead time in multi-segment recordings is skipped during playback.

Tests: commitGroupRide (unauthenticated / unavailable / commit-ok / commit-failed); group-rides
hub now uses an authenticated mock with deterministic Firebase — authenticated create persists,
unauthenticated create is blocked with no phantom, a failed commit leaves no phantom, and the
create modal blocks duplicate submits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-14 13:12:49 -04:00
Developer 368858670d feat(website): add club moderation, stats, and group rides management 2026-10-02 11:07:44 -04:00
Developer f20a09addf feat(website): discrete group rides showcase and management architecture lock 2026-09-25 18:36:54 -04:00
Developer 69fefd7b56 feat(website): create separate showcase and management group rides pages 2026-09-25 16:00:47 -04:00
Developer 126f2c6c5f feat(website): add Group Rides Hub navigation links for authenticated riders 2026-09-25 15:35:55 -04:00
Developer 67c25b5c50 feat(website): build interactive group rides hub with live pack radar, filters, and modals 2026-09-25 14:35:58 -04:00