From 4ee768174c62415fd5a1151da4a35165b1ca477d Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Thu, 13 Aug 2026 15:03:00 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20FEAT-13=20=E2=80=94=20flush=20uploaded?= =?UTF-8?q?=20tracking=20rows=20from=20local=20DB=20(idea)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FEATURES.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/FEATURES.md b/FEATURES.md index c2d4271..6a6dd1b 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -32,6 +32,7 @@ dedicated PLAN.md phase (or fold it into the relevant existing work) and mark it | FEAT-10 | `IDEA` | Home Assistant integration | unassigned | | FEAT-11 | `SHIPPED` | Hotspot SSID/password settings + 5GHz WiFi role swap | Phase 27 | | FEAT-12 | `SHIPPED` | Log OBD speed before GPS fix (rolling-start capture) | Phase 27 | +| FEAT-13 | `IDEA` | Flush uploaded tracking rows from local DB | unassigned | --- @@ -237,3 +238,21 @@ dedicated PLAN.md phase (or fold it into the relevant existing work) and mark it recomputed trips don't yet include the speed-only leading motion (follow-up if needed). +### FEAT-13 — Flush uploaded tracking rows from local DB +- **Status**: `IDEA` +- **Area**: `modules/app_sql.py` (`tracking` table), `modules/app_upload.py` +- **Phase**: unassigned +- **What**: The local SQLite `tracking` table keeps every raw row forever — rows are only + marked `UPLOADED=1`, never deleted. Once rows are confirmed uploaded to the server, provide + a way to flush them locally (e.g. a settings toggle + retention window) so the local DB stays + bounded over years of driving. +- **Considerations**: + - Trip summaries (`trips` table) are derived and can be kept independently; but the local + route-replay polyline is built from raw `tracking` rows, so purging rows removes local route + detail. The server keeps full `tracking_points`, so replay stays available on the portal. + - Must be opt-in and only delete rows that are `UPLOADED=1` (and older than a grace window) + so a failed upload or re-send never loses data. + - Tracking data is small (~90 B/row, ~a few MB/month) so this is long-term hygiene, not + urgent — imported dashcam videos are the real disk consumer. + +