Parent
What to build
Favorites pin their telemetry ranges (ADR 0029). Telemetry deletion — delete ride/range and clear history — carves out favorited ranges instead of deleting them, on both platforms. The carve-out is pure range-subtraction logic extracted per ADR 0010 and unit-tested. Deleting a ride around a Favorite leaves the favorited samples as a telemetry island, which history grouping surfaces as a short standalone ride. History rows whose span intersects a Favorite show a marker that the ride cannot be fully deleted. Removing a Favorite only unpins: its telemetry stays and becomes normally deletable.
Likely files
modules/vescape-core/ios/telemetry/TelemetryRepository.swift - iOS delete paths to carve
modules/vescape-core/ios/telemetry/TelemetryDao.swift - range delete queries
modules/vescape-core/android/src/main/java/expo/modules/vescapecore/telemetry/TelemetryRepository.kt - Android peer delete paths
modules/vescape-core/android/src/main/java/expo/modules/vescapecore/telemetry/TelemetryDao.kt - Android peer DAO
src/modules/history/lib/sessions.ts - derive "contains favorite" for history rows
src/modules/history/components/HistorySessionSheet.tsx - delete action + protection marker UI
Implementation hints
- Extract range subtraction as a pure function (given delete range + favorited ranges, return sub-ranges to actually delete) and test it in isolation on both platforms; edge cases: full overlap, partial overlap at each edge, favorite spanning multiple delete ranges, adjacent-but-disjoint.
- Clear-all history is just the full range through the same carve-out.
- Minute buckets covering a carved boundary need consistent handling with existing partial-range deletes — inspect how
deleteTelemetryRange treats buckets today before choosing.
- "Contains favorite" derivation belongs with session grouping (JS) from the favorites list already loaded by slice 1's store — no new bridge call needed.
Acceptance criteria
Blocked by
Related
Parent
What to build
Favorites pin their telemetry ranges (ADR 0029). Telemetry deletion — delete ride/range and clear history — carves out favorited ranges instead of deleting them, on both platforms. The carve-out is pure range-subtraction logic extracted per ADR 0010 and unit-tested. Deleting a ride around a Favorite leaves the favorited samples as a telemetry island, which history grouping surfaces as a short standalone ride. History rows whose span intersects a Favorite show a marker that the ride cannot be fully deleted. Removing a Favorite only unpins: its telemetry stays and becomes normally deletable.
Likely files
modules/vescape-core/ios/telemetry/TelemetryRepository.swift- iOS delete paths to carvemodules/vescape-core/ios/telemetry/TelemetryDao.swift- range delete queriesmodules/vescape-core/android/src/main/java/expo/modules/vescapecore/telemetry/TelemetryRepository.kt- Android peer delete pathsmodules/vescape-core/android/src/main/java/expo/modules/vescapecore/telemetry/TelemetryDao.kt- Android peer DAOsrc/modules/history/lib/sessions.ts- derive "contains favorite" for history rowssrc/modules/history/components/HistorySessionSheet.tsx- delete action + protection marker UIImplementation hints
deleteTelemetryRangetreats buckets today before choosing.Acceptance criteria
@parity)Blocked by
Related