3fd93cf8a60cea80c6726f1a5055c3c04ad93b36
All lifecycle transitions inside Drift transactions, each idempotent: start (adopting an active trip rather than duplicating it), pause, resume, complete, discard, rename, delete, merge, and the authoritative aggregate recomputation. Room.withTransaction maps onto Drift's transaction() almost exactly, so this was the most mechanical port so far. 26 tests, green first run. Merge keeps its hard-won properties: segments are never joined, so the boundary between two merged rides stays a segment boundary like a pause, and aggregates are recomputed rather than summed because distance is not additive across the gap. The regression test puts the two rides a degree of latitude apart and asserts the ~111km gap never reaches distanceM. Dropped a mergeTableUpdates helper before committing -- Drift's update() already notifies dependent streams, so it was scaffolding that earned nothing. TripRepositoryTest, MergeTest and SchemaTest were 666 lines of instrumented tests needing a booted emulator. All three now run as unit tests in ~2 seconds. Phase 2 done: 121 tests passing, analyze clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
rippr
GPS ride recorder for motorcycles
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Description
Languages
Dart
98.6%
Kotlin
0.7%
Shell
0.4%
Ruby
0.2%
Swift
0.1%