Commit Graph

34 Commits

Author SHA1 Message Date
Doug Borg 2d92214bed Add offline-first tile system with per-provider caching and error retry
- Add ServicePolicy framework with OSM-specific rate limiting and TTL
- Add per-provider disk tile cache (ProviderTileCacheStore) with O(1)
  lookup, oldest-modified eviction, and ETag/304 revalidation
- Rewrite DeflockTileProvider with two paths: common (NetworkTileProvider)
  and offline-first (disk cache -> local tiles -> network with caching)
- Add zoom-aware offline routing so tiles outside offline area zoom ranges
  use the efficient common path instead of the overhead-heavy offline path
- Fix HTTP client lifecycle: dispose() is now a no-op for flutter_map
  widget recycling; shutdown() handles permanent teardown
- Add TileLayerManager with exponential backoff retry (2s->60s cap),
  provider switch detection, and backoff reset
- Guard null provider/tileType in download dialog with localized error
- Fix Nominatim cache key to use normalized viewbox values
- Comprehensive test coverage (1800+ lines across 6 test files)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:34:01 -07:00
Doug Borg c712aba724 Add flutter_lints and fix analyzer errors, dead code, and unused imports 2026-02-08 14:23:06 -07:00
stopflock df0377b41f Get rid of double cache, filesystem checking for every tile fetch, swap out http interception for a fluttermap tileprovider that calls map_data, fix node rendering limit 2025-11-28 21:48:17 -06:00
stopflock caa20140b4 Fix display issue when refreshing offline areas 2025-09-29 21:32:39 -05:00
stopflock 2b26bf9188 Preview tile fetching on startup, offline area refresh, more cameras->nodes 2025-09-29 21:28:40 -05:00
stopflock 71fa212d71 More camera -> node, notifications for approaching 2025-09-29 19:22:22 -05:00
stopflock 4ad33d17e0 Remove world map area 2025-09-28 19:00:07 -05:00
stopflock fa16e3c299 phase 1 2025-08-30 23:17:08 -05:00
stopflock a3edcfc2de finalize code paths for offline areas, caching, in light of multiple tile providers 2025-08-26 17:52:14 -05:00
stopflock bedfdcca6e fetch tiles from selected provider 2025-08-24 16:13:50 -05:00
stopflock f1c73a5e55 settings area metadata, offline areas support for tile types 2025-08-24 15:31:02 -05:00
stopflock 63ebc2b682 ho lee shet 2025-08-22 21:04:30 -05:00
stopflock 1f3849cd84 break up offlin areas 2025-08-21 21:50:30 -05:00
stopflock e35266c160 better offline area max calculation, and added guardrails 2025-08-21 20:22:13 -05:00
stopflock ff9a052d3f broke download dialog, cleaned up debug stuff 2025-08-21 18:52:53 -05:00
stopflock df5e26f78d breakup app_state 2025-08-21 18:39:09 -05:00
stopflock 0d84822d23 this might actually work 2025-08-11 00:08:26 -05:00
stopflock 160bc8f9f2 add dev_config to centralize hardcoded stuff into one place. 2025-08-10 23:31:17 -05:00
stopflock 312f71af4b first time loading tiles from local storage! 2025-08-10 23:07:06 -05:00
stopflock 641344271f fix appstate repeated instantiation 2025-08-10 00:53:01 -05:00
stopflock 63675bd18a tbh not sure, left for a bit. sorry. pretty sure closer than last commit.. 2025-08-09 22:44:24 -05:00
stopflock f8b4134bd3 break up offline area monopoly 2025-08-07 20:52:24 -05:00
stopflock 58ecf550a5 I literally forget. Removed some debugs. 2025-08-07 17:14:40 -05:00
stopflock 868e6cb7f7 retry logic on area downloads 2025-08-07 16:52:29 -05:00
stopflock 19edbc2b13 getting better, still world map has issus 2025-08-07 16:40:46 -05:00
stopflock f69277ffc1 fix world download fail due to out-of-bounds, probably floating point issue 2025-08-07 16:13:19 -05:00
stopflock 3796a801c2 world area now immutable, auto-downloads 2025-08-07 14:31:21 -05:00
stopflock 67c11969d5 I think fixes downloads 2025-08-07 13:54:38 -05:00
stopflock 0069f909ea remove cameras from world map area 2025-08-07 11:27:50 -05:00
stopflock b1d29e443d fix dup world area, storage estimate 2025-08-07 09:22:17 -05:00
stopflock fff1096870 better progress tile x/y 2025-08-06 23:37:38 -05:00
stopflock 82b7583a86 even closer to working - download estimate working - settings page working 2025-08-06 22:02:07 -05:00
stopflock ca64859df6 moving the right direction 2025-08-06 20:37:25 -05:00
stopflock 738807d982 UX basically working 2025-08-06 18:35:16 -05:00