Commit Graph
466 Commits
Author SHA1 Message Date
stopflock 8148ad55c2 node tags sheet no longer behaves poorly when viewing a node during submission 2026-07-26 02:58:35 -05:00
stopflock dfcc64e96e offline options globally toggleable 2026-07-25 20:40:15 -05:00
stopflock 78f1ef58de selectable/copyable node tags, pending submission status on details sheet, "view on osm" button styling 2026-07-25 19:27:11 -05:00
stopflock 3e2c9c5b9e add option to hide zoom controls and indicator 2026-07-25 18:04:54 -05:00
stopflock 096fb5868b require delete reason, give options 2026-07-25 17:43:41 -05:00
stopflock 974204bd91 prevent deletes without being logged in 2026-07-25 17:11:39 -05:00
stopflock af2a08bf3d better limits for min/max zoom validations, separate lat+lon validation, less verbose comments 2026-07-25 16:42:38 -05:00
stopflock 1cfca663a6 catch and correct possible bad values for lat/lon, add tests 2026-07-25 16:32:08 -05:00
Ryan Brown 36675508e8 Sanitize tags. 2026-07-16 19:23:42 -04:00
stopflock b9d82d6de7 change mock node color to green 2026-07-15 21:29:54 -05:00
stopflock 38eee8d125 Bring back profile subsumption elimination for overpass queries 2026-07-15 21:20:44 -05:00
stopflock f8632b6a06 remove extraneous unreferenced file 2026-07-15 19:39:06 -05:00
stopflock be2fe84db5 first pass 2026-07-15 18:01:29 -05:00
stopflock 2cddcbef7d forgot a file - maybe why suspected locations not updating 2026-07-15 16:29:55 -05:00
stopflockandGitHub ee8ead6695 fuck me 2026-07-14 14:32:27 -05:00
stopflockandGitHub 25c1611fd3 out skel -> out ids 2026-07-14 14:21:39 -05:00
Ryan Brown c844cff67b Update flutter_local_notifications to min v19.0.0. Update app to use Swift Package Manager build process for all packages. 2026-06-24 03:59:20 +00:00
stopflock 12ffe92df8 suspected locations background refresh 2026-06-14 21:40:22 -05:00
stopflock 0b812bdaea long press to add node 2026-06-14 21:20:17 -05:00
stopflock d87a112c0a silence useless deeplink exception 2026-06-14 19:36:08 -05:00
stopflock 41479e7ee4 2.10.2 fixes reorderlist deprecation 2026-06-14 19:02:54 -05:00
191b5ccae0 refactor: use UserAgentClient for OSM API fetch, remove redundant comments
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 17:39:30 -06:00
480f99b360 feat: wire HomeScreen to handle node deep links
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 17:39:30 -06:00
74d8214dda feat: add node deep link handling to DeepLinkService
Adds `deflockapp://node?id=<nodeId>` deep link support: parses the node
ID, fetches the OSM node via the public API, and delivers it via an
`onNodeDeepLink` callback for HomeScreen to register. Includes URL
parsing unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 17:39:30 -06:00
Ryan Brown f438c21166 Add translations. Translated by Google Translate. 2026-05-09 23:35:19 +00:00
Ryan Brown e0b2a6a19c Update and confirm english localizations. 2026-05-09 22:34:04 +00:00
Ryan Brown 329974a8f0 Feature: Keep screen on while using app. Initial working. 2026-05-09 22:02:36 +00:00
reb1995andGitHub 2ba0667a76 Update gps_controller.dart
Remove extra import that isn't required. Now passes flutter analyze.
2026-04-12 21:07:26 -04:00
reb1995andGitHub d7be022a11 Update gps_controller to not require location accuracy in android.
Adds basic target matching. If Android Do... Else use old code.
2026-04-06 13:09:41 -04:00
stopflock bd71f88452 operator profiles - import, reorderable 2026-03-23 12:58:50 -05:00
stopflock 6e2fa3a04c typo 2026-03-23 11:45:13 -05:00
stopflock 843d377b87 Nuclear reset button now appears when kEnableDevelopmentModes is true as well 2026-03-15 14:31:39 -05:00
stopflock 3857023d43 Fix deprecation warning 2026-03-14 18:11:43 -05:00
stopflock ddf7f543ff Button to trigger nuke reset in dev mode 2026-03-14 18:04:57 -05:00
stopflock 9f72ec9a76 Fix lint warnings, clean up debug logging 2026-03-14 17:31:01 -05:00
stopflock 16e34b614f Rework profile FOVs - 360 checkbox 2026-03-14 17:18:33 -05:00
stopflock f85db3ca11 add "report osm map issue" link to info/about page 2026-03-12 22:19:21 -05:00
stopflock 447f358727 Limit max files open to prevent OS error for too many files open related to tile storage 2026-03-12 19:58:07 -05:00
stopflock 08b395214b Move "about osm" to about page, add option to clear tile caches, option to add reason when deleting, min zoom 16 for edits/submissions, 300km nav distance warning 2026-03-12 18:59:48 -05:00
Doug BorgandClaude Opus 4.6 2833906c68 Add centralized retry/fallback policy with hard-coded endpoints
Extract duplicated retry logic from OverpassService and RoutingService
into a shared resilience framework in service_policy.dart:

- ResiliencePolicy: configurable retries, backoff, and HTTP timeout
- executeWithFallback: retry loop with primary→fallback endpoint chain
- ErrorDisposition enum: abort / fallback / retry classification
- ServicePolicy + ServicePolicyResolver: per-service compliance rules
  (rate limits, caching, concurrency) for OSMF and third-party services
- ServiceRateLimiter: async semaphore-based concurrency and rate control

OverpassService now hits overpass.deflock.org first, falls back to
overpass-api.de. RoutingService hits api.dontgetflocked.com first,
falls back to alprwatch.org. Both use per-service error classifiers
to determine retry vs fallback vs abort behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:13:52 -06:00
ba80b88595 Update lib/widgets/map/map_data_manager.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-11 22:06:52 -06:00
Doug BorgandClaude Opus 4.6 ebb7fd090f Address review: stable tie-breaker and accurate log message
- Add node id tie-breaker to sort comparator so equal-distance nodes
  have deterministic ordering across renders (prevents flicker)
- Log validNodesCount instead of allNodes.length so the message
  reflects the actual post-filter count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:38:58 -06:00
Doug BorgandClaude Opus 4.6 fe401cc04b Prioritize closest nodes to viewport center when render limit is active
Sort nodes by squared distance from viewport center before applying the
render limit, so visible nodes always make the cut instead of arbitrary
selection causing gaps that shift as you pan.

Also: inject node provider for testability, deduplicate validity filter,
and reduce debug log spam to state transitions only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:09:37 -06:00
Doug BorgandClaude Opus 4.6 91e5177056 Detect config drift in cached tile providers and replace stale instances
When a user edits a tile type's URL template, max zoom, or API key
without changing IDs, the cached DeflockTileProvider would keep the old
frozen config. Now _getOrCreateProvider() computes a config fingerprint
and replaces the provider when drift is detected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:34:01 -07:00
Doug BorgandClaude Opus 4.6 f3f40f36ef Allow OSM offline downloads, disable button for restricted providers
Allow offline area downloads for OSM tile server. Move the "downloads
not permitted" check from inside the download dialog to the download
button itself — the button is now disabled (greyed out) when the
current tile type doesn't support offline downloads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:34:01 -07:00
Doug BorgandClaude Opus 4.6 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 BorgandClaude Opus 4.6 5728b4f70f Force simulate mode when OSM OAuth secrets are missing
Preview/PR builds don't have access to GitHub Secrets, so the OAuth
client IDs are empty. Previously this caused a runtime crash from
keys.dart throwing on empty values. Now we detect missing secrets
and force simulate mode, which already fully supports fake auth
and uploads.

Also fixes a latent bug where forceLogin() would crash with
LateInitializationError in simulate mode since _helper is never
initialized when OAuth setup is skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:25:17 -07:00
stopflock 57df8e83a7 fix tests for profile order, add correct migration 2026-03-02 13:56:07 -06:00
stopflock bc671c4efe Fix phantom FOVs, reorderable profiles 2026-03-02 12:38:49 -06:00
Doug BorgandClaude Opus 4.6 8983939b05 Delegate network tile fetching to NetworkTileProvider
Replace our custom tile pipeline (fetchRemoteTile / _SimpleSemaphore /
exponential backoff) with flutter_map's built-in NetworkTileProvider,
gaining persistent disk cache, ETag revalidation, RetryClient, and
obsolete request aborting for free.

DeflockTileProvider now extends NetworkTileProvider and overrides
getTileUrl() to route through TileType.getTileUrl() (quadkey,
subdomains, API keys). getImageWithCancelLoadingSupport() routes
between two paths at runtime: the common network path (super) when
no offline areas exist, and a DeflockOfflineTileImageProvider for
offline-first when they do.

- Delete tiles_from_remote.dart (semaphore, retry loop, spatial helpers)
- Simplify MapDataProvider._fetchRemoteTileFromCurrentProvider to plain
  http.get (only used by offline area downloader now)
- Remove dead clearTileQueue/clearTileQueueSelective from MapDataProvider
- Remove 7 tile fetch constants from dev_config.dart
- TileLayerManager now disposes provider on cache clear and uses actual
  urlTemplate for cache key generation
- 9 new tests covering URL delegation, routing, and equality

Closes #87 Phase 2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:07:56 -07:00