Commit Graph
300 Commits
Author SHA1 Message Date
Mathieu Moran 81c7ee25fd test: align suite with shipped behavior (WiFi swap, BUG-10 guard, odometer_baseline)
- test_app_trip + test_trip_sql: mock was_car_ever_connected() so trip
  building runs (BUG-10 guard suppresses trips until car ECU reached)
- test_app_settings: include odometer_baseline in valid payload + assert save
- test_yaris_uplink: Hotspot -> Hotspot-local; restore_fallback no longer
  activates AP (reports no_connection); wait timeout writes fallback_restored
- test_app_network: local_hotspot mode removed by WiFi swap -> wifi/no-internet
2026-08-12 19:14:07 -04:00
Mathieu Moran 2e8e42a165 android: byte-level upload progress + debug logging; document 28.3
- UploadWorker: ProgressRequestBody (okio ForwardingSink) tracks real bytes
  sent including already-received chunks, instead of chunk count
- Robust chunk reads (loop skip/read) + Log.d/Log.e debug logging
- DashcamViewModel: upload state/progress debug logging
- android/plan.md + PLAN.md: 28.3 marked in progress with built items
2026-08-12 19:00:00 -04:00
Mathieu Moran 6398baaa6b feat: in-app test file generator for upload testing
adb-pushed files are invisible to the app due to scoped storage, so add a
'Create 120 MB test file' button in the Downloads tab that writes the file
through the app's own uid (visible in its contribution set).
2026-08-12 18:23:37 -04:00
Mathieu Moran 6f112ab622 fix: upload progress stuck at 0%
setProgressAsync (fire-and-forget) was dropping/coalescing updates before
they were persisted. Switch to awaited suspend setProgress() in both
UploadWorker and DownloadWorker so each progress write lands and the
LiveData observer actually sees pct advance.
2026-08-12 18:15:42 -04:00
Mathieu Moran 30b919bc03 feat: block re-upload of files already on server + visible upload progress
- Hide upload button when file is in uploadedNames (already on server)
- UploadWorker still guards via /status already_uploaded check
- Indeterminate progress bar during Hashing/Checking phases
- Upload label always shows percentage
2026-08-12 18:08:26 -04:00
Mathieu Moran 2012370cef ui: stack odometer under speed in replay timeline + GitHub footer link (Pi + server) 2026-08-12 17:24:34 -04:00
Mathieu Moran e8746e5d69 docs: FEAT-03 extended — simulated odometer in trip replay + trip list 2026-08-12 17:12:45 -04:00
Mathieu Moran 0d5aea5947 feat: simulated odometer in trip replay + trip list (continuous across trips)
- Pi route_points: emit per-point odometer (raw OBD value or baseline+prior+within-trip distance)
- Pi get_trip_route: SELECT ODOMETER, compute prior-trips distance + baseline
- Pi list_trips: fallback now starts from baseline (was 0)
- Server get_trip_route: per-point odometer (raw or simulated) with haversine accumulation
- Server list_trips: odo_start/end from baseline + cumulative (was hardcoded None)
- history.js: Odometer line in replay scrubber below speed
- Both history templates: trip-replay-odometer element
2026-08-12 16:59:00 -04:00
Mathieu Moran cfd9d03e81 ui: rework Pi settings page — grouped sections, icons, clearer labels
- Four logical sections: Car & identity, Connectivity, Server & uploads, Alerts
- FontAwesome icons on every card header for visual scanning
- Reordered cards (identity → in-car AP → phone hotspot → server → uploads → alerts)
- settings-section + settings-card styles added via block styles
- Improved helper text (device name, odometer, hotspot password)
- All element IDs preserved — JS behavior unchanged
2026-08-12 16:43:04 -04:00
Mathieu Moran 2cfbe67a86 ui: move Test connection + Sync now buttons to header, left of Save settings
- Header now has Test connection, Sync now, Save settings in a row
- remote-config-message alert moved below header for inline feedback
- Removed buttons from Remote server credentials card
2026-08-12 16:35:09 -04:00
Mathieu Moran 14981c066b docs: WiFi role swap + hotspot settings feature (FEAT-11)
- PLAN.md: Hardware section + Architecture #2/#5 updated for wlan1=AP(5GHz), wlan0=uplink
- FEATURES.md: FEAT-11 SHIPPED (hotspot SSID/password UI + 5GHz role swap)
- readme.md: hardware table + hotspot feature line updated
- deploy/readme.md: profile names/bands updated (home-wifi on wlan0, Hotspot-local 5GHz on wlan1)
2026-08-12 16:25:16 -04:00
Mathieu Moran e222dbdba7 net: AP on wlan1 uses 5GHz band for faster in-car access 2026-08-12 16:18:15 -04:00
Mathieu Moran b4b3643201 net: app_network.py reflects WiFi swap — uplink on wlan0, AP on wlan1 2026-08-12 16:17:21 -04:00
Mathieu Moran 4827b73e68 net: swap WiFi roles — fast T3U (wlan1) hosts AP, onboard (wlan0) carries uplink
- yaris_uplink.py: PRIMARY_INTERFACE=wlan0, AP_INTERFACE=wlan1, AP_CONNECTION=Hotspot-local
- install_netwatch.sh: WLAN=wlan0, WLAN_FB=wlan1, AP on wlan1
- _ap_client_count() reads the AP interface instead of hardcoded wlan0
2026-08-12 15:55:23 -04:00
Mathieu Moran 03358587ca fix: upload progress no longer stuck at 0%
UploadWorker now promotes to foreground + reports phase immediately:
- 'Hashing…' while computing SHA256
- 'Checking server…' during resume status check
- 'Uploading…' with per-chunk percentage
Downloads tab renders the phase label for uploads
2026-08-12 15:44:53 -04:00
Mathieu Moran 5b3c04b83d feat: server-presence indicator on Downloads tab
- CredentialStore tracks uploaded filenames in prefs
- UploadWorker success marks file as uploaded
- Downloads tab shows green CloudDone icon next to files already on server
- Upload button skipped for files already on server (dedup)
2026-08-12 15:42:51 -04:00
Mathieu Moran 0c81f1835d fix: FGS type for upload worker + cloud icon for server status
- DownloadWorker.createForegroundNotification now passes FOREGROUND_SERVICE_TYPE_DATA_SYNC
  (was defaulting to 'none' → InvalidForegroundServiceTypeException crash on upload)
- Dashcam file rows show CloudDone (green, on server) / CloudQueue (grey, not uploaded)
2026-08-12 15:33:32 -04:00
Mathieu Moran 8101663dd0 fix: plain SharedPreferences for credentials (EncryptedSharedPreferences crashed on Pixel)
- CredentialStore now uses getSharedPreferences instead of EncryptedSharedPreferences
- Still sandboxed by Android app isolation (other apps can't read it)
2026-08-12 15:23:53 -04:00
Mathieu Moran f4b93006e3 docs: finalize UI branding section — sidebar, logo, mobile dark theme 2026-08-12 05:39:30 -04:00
Mathieu Moran db971ab0e3 style: red underline on mobile topbar logo 2026-08-12 05:37:26 -04:00
Mathieu Moran 4a919b55a1 style: dark mobile UI — bottom nav + topbar match sidebar
- Mobile bottom nav: white → dark (#1c1c1e) bg, white icons/text
- Mobile topbar: white → dark bg on small screens, white text/controls
- Mobile logo color: dark → white for dark bg readability
- Desktop topbar remains white (contrasts with dark sidebar)
2026-08-12 05:34:24 -04:00
Mathieu Moran 6ac750f53b fix: hotspot save now restarts AP immediately (down + 1s wait + up) 2026-08-12 05:28:28 -04:00
Mathieu Moran a7ea97259d fix: remove trailing comma in hotspot POST — was returning (Response, None) tuple 2026-08-12 05:24:02 -04:00
Mathieu Moran 336815b49c feat: Pi hotspot SSID/password configurable from Settings page
- Settings page: SSID + password fields in In-car access card
- GET /api/hotspot reads current SSID (password never returned)
- POST /api/hotspot updates via nmcli (Hotspot-local profile on wlan0)
- deploy/yaris-hotspot.sudoers for privileged nmcli access
- Password is write-only with placeholder hint
2026-08-12 05:15:55 -04:00
Mathieu Moran c0aed4a997 fix: dashcam auto-loads + compact card style for both sections
- LaunchedEffect auto-refreshes on tab open (no more manual refresh needed)
- Imported Videos card matches USB Dashcam compact style
- Removed bulky Refresh button from imported videos
2026-08-12 05:10:55 -04:00
Mathieu Moran bc1516257a feat: USB dashcam file browser on Dashcam tab
- PiApi extended: listDashcamFiles, deleteDashcamFile, importDashcamFiles
- DTO: DashcamFilesResponse, DashcamDevice, DashcamFile
- DashcamScreen: USB Dashcam card with status, file count, Import All + Refresh
- ViewModel: loadDashcamFiles, deleteDashcamFile, importDashcamFiles
2026-08-12 05:06:39 -04:00
Mathieu Moran ffa84073ea fix: Settings header height matches other tabs + 48dp red underline
- Settings Column padding removed from around header
- Cards use horizontal padding individually
- YarisHeader underline: full-width → 48dp
2026-08-12 04:43:38 -04:00
Mathieu Moran e9309f4cdf style: YARIS logo with red underline + #1c1c1e dark theme
- Shared YarisHeader composable: bold YARIS + red accent bar + subtitle
- Dark theme: #1c1c1e background, #2a2a2c surface (matching web UI sidebar)
- Red accent #e63946 matches web logo underline
- Applied to Dashcam, Downloads, Settings screens
2026-08-12 04:36:55 -04:00
Mathieu Moran b69ae3a229 docs: UI branding — dark sidebar + YARIS-OBD Racing Sans One logo 2026-08-12 04:33:46 -04:00
Mathieu Moran 2989f60f9c style: minimalist Material icon buttons (download, upload, delete)
- DashcamScreen: Download + Delete as IconButton with Icons.Filled
- DownloadsScreen: CloudUpload + Delete as IconButton
- No text labels, just clean Material icons
2026-08-12 04:27:51 -04:00
Mathieu Moran 6b47dafdb8 style: yaris-obd lowercase logo 2026-08-12 04:23:42 -04:00
Mathieu Moran bb4ac8c490 feat: Material icons in nav bar + yaris-obd header on all screens
- Tab icons: Icons.Filled.Videocam / FileDownload / Settings
- Branding header (yaris-obd + Phase 28 subtitle) on Dashcam, Downloads, Settings
2026-08-12 04:20:27 -04:00
Mathieu Moran eab91956c9 fix: ASCII-safe tab icons + yaris-obd branding on Settings
- Tab icons: Cam / DL / Set (Unicode emoji kept corrupting in the source file)
- Settings top: yaris-obd title + Phase 28 subtitle restored
2026-08-12 04:18:11 -04:00
Mathieu Moran d613252155 style: dark sidebar + Racing Sans One YARIS wordmark logo
- Sidebar bg: navy (#1a1a2e) → dark gray (#1c1c1e)
- Logo: replaced fa-car icon + text with styled YARIS wordmark
  using Racing Sans One (free Google Font, OFL licensed)
- Red accent underline (#e63946) on logo
- Applied to both server (server/templates/base.html) and
  Pi (templates/base.html) + mobile topbar
2026-08-12 04:15:51 -04:00
Mathieu Moran 67dc9b897e refactor: merge Test tab into Settings, 3 tabs total
- Settings tab now has credential fields + network test (Test Pi, Test Server)
- Removed standalone Test tab
- Bottom nav: Dashcam, Downloads, Settings
2026-08-12 04:04:21 -04:00
Mathieu Moran 19942dc114 feat: Phase 28.3 — cellular upload relay + Settings tab
- UploadWorker: 40MB chunked upload to yaris.ceaf.dev (SHA256 check,
  /status resume, WorkManager foreground notification, progress)
- ServerApi extended: uploadStatus + uploadChunk endpoints
- CredentialStore: EncryptedSharedPreferences for server URL/device name/API key
- Settings tab: credential entry (server URL, device name, API key)
- Downloads tab: ↑ Upload button per file, upload progress with cancel
- Upload only shown when credentials configured
2026-08-12 04:00:45 -04:00
Mathieu Moran c8e26dde26 feat: Downloads tab UI polish — deleting spinner, progress redesign
- Deleting files show CircularProgressIndicator instead of delete button
- Active download card redesigned: spinner + filename + %, rounded progress bar
- AnimatedVisibility for progress section
- Empty state with icon
- Track _deletingNames in ViewModel for reactive UI
2026-08-12 03:46:33 -04:00
Mathieu Moran b523d77e16 feat: cancel button on active downloads
- ActiveDownload now carries workerId (UUID string) for cancellation
- cancelDownload() calls WorkManager.cancelWorkById()
- Downloads tab shows ✕ button on in-progress download cards
2026-08-12 03:35:03 -04:00
Mathieu Moran 78cd05c4cb docs: add BUG-14 (Nominatim slowness), update PLAN.md Phase 26 (14 bugs)
- BUG-14: Nominatim replaced with offline reverse_geocoder — instant, no network
- PLAN.md Phase 26: 13 → 14 bugs resolved, updated result summary
2026-08-12 03:31:50 -04:00
Mathieu Moran 0ddfe39901 refactor: ditch Nominatim, use reverse_geocoder exclusively for geocoding
Nominatim was slow (rate-limited, 1 req/sec, ~4s timeouts) and unreliable
from Docker/Cloudflare (blocked or throttled). It was the root cause of
location labels failing to appear during trip scrubbing.

- server/app.py: _geocode_cached now uses reverse_geocoder exclusively
  (offline, instant, city/province level). Removed Nominatim HTTP calls,
  ThreadPoolExecutor, concurrent.futures import.
- app.py (Pi): same — reverse_geocoder imported at module level,
  Nominatim + urllib.request removed.
- Batch endpoint simplified to sequential loop with lru_cache + dedup.
  No network dependency at all — geocoding is instant and always works.

reverse_geocoder provides city/province labels (e.g. 'Montreal, Quebec')
which is the right granularity for trip scrubbing.
2026-08-12 03:27:00 -04:00
Mathieu Moran e60b7d7d36 perf: geocode pipeline — batch POST + parallel server, 200→1 roundtrip
JS preload(): replaced N individual GET /api/geocode (concurrency 2) with
a single POST /api/geocode/batch — one HTTP roundtrip instead of up to
N/2 sequential ones. schedLoc debounce reduced 600→200ms.

Server geocode_batch(): ThreadPoolExecutor(max_workers=4) parallelises
Nominatim/reverse_geocoder calls instead of sequential loop. Deduplicates
coords before submitting futures. lru_cache absorbs duplicates within batch.

Pi geocode_batch_route(): deduplicate coords, removed stale 'if label:'
guard (label always non-empty after BUG-13 fix).
2026-08-12 03:15:30 -04:00
Mathieu Moran ad10a873b4 docs: close BUG-13, update PLAN.md Phase 26 (13 bugs resolved)
- BUG-13 moved from Open to Resolved with fix summary
- PLAN.md Phase 26: 12 → 13 bugs, added BUG-13 entry
- deploy memory: Unraid SSH deploy key + updated rebuild command
2026-08-12 03:08:57 -04:00
Mathieu Moran 830981934f fix: BUG-13 — server geocode returns raw coords instead of location names
Root cause: server _geocode_cached() returned None → /api/geocode
returned HTTP 204 with no body. JS frontend treated 204 as success,
r.json() on empty body threw → showed raw-coordinate fallback.

Server fixes:
- _geocode_cached() now always returns a non-empty string (coordinate
  fallback when both Nominatim and reverse_geocoder fail)
- /api/geocode always returns HTTP 200 with {label: '...'} (never 204)
- /api/geocode/batch always includes every coord key in result dict
- Nominatim call: jsonv2 + accept-language=en (aligned with Pi)
- reverse_geocoder: mode=1 (aligned with Pi)

Pi alignment:
- _geocode_cached() now checks for empty reverse_geocoder label before
  returning, falling through to coordinate string (same guard as server)
2026-08-12 02:53:44 -04:00
Mathieu Moran 81a0bfebd5 docs: add BUG-13 — server web UI shows raw coords instead of geocoded location
- Trips 18517, 18516 show (x,y) instead of address/street name
- Likely regression in geocoding pipeline or cache lookup
- Plan: rework server-side geocoding, backport to Pi if simple
2026-08-12 02:49:04 -04:00
Mathieu Moran b670fc5480 folder: delete github agent temp folder 2026-08-12 02:35:44 -04:00
Mathieu Moran 555af3694e docs: reformat FEATURES.md — summary table with dates, numerical order
- All 10 FEATs now in strict numerical order under single Feature ideas section
- Added summary table (ID, Status, Created, Title, Phase) for quick scanning
- Created dates sourced from git history (ef3a951 through bc29a01)
- Removed orphan Ideas that landed section (FEAT-06/07 merged into main flow)
2026-08-12 02:34:36 -04:00
Mathieu Moran 7a6c1750c9 docs: update Phase 28.1/28.2 status in PLAN.md + android/plan.md
- PLAN.md: Phase 28 header now shows 28.1 ✅, 28.2 ✅, 28.3–28.7 pending
- PLAN.md: added 28.1 gate-pass + 28.2 dashcam browser/download summaries
- android/plan.md: 28.2 rewritten from NOT STARTED to DONE with real
  implementation details (PiApi, DashcamScreen, DashcamViewModel,
  WorkManager DownloadWorker, Coil thumbnails, bottom nav)
2026-08-12 02:29:22 -04:00
Mathieu Moran e19511fc67 fix: downloads use WorkManager foreground service + inline progress
- DownloadWorker: foreground service with notification + setProgressAsync
- ActiveDownload state tracked via WorkManager LiveData observation
- Downloads tab shows progress bar + % for in-flight downloads
- Survives screen lock / background
- Fixed FGS type for Android 14+ (FOREGROUND_SERVICE_TYPE_DATA_SYNC)
2026-08-12 02:27:33 -04:00
Mathieu Moran bc29a01337 docs: FEAT-05 DTC sync shipped — multi-device selector, portal DTC page, Pi snapshot upload 2026-08-12 02:20:48 -04:00
Mathieu Moran ed2b3aacfc feat: downloads tab + public Movies/yaris-obd/ folder
- Downloads now go to Movies/yaris-obd/ (visible in file managers)
- New Downloads tab: list downloaded files, tap to play (system player),
  delete button
- FileProvider added for video playback intent
- Downloaded files auto-refresh after each download
2026-08-12 01:56:18 -04:00