Commit Graph

407 Commits

Author SHA1 Message Date
stopflock
59afd75887 Merge pull request #42 from dougborg/fix/routing-empty-tags
Fix route calculation HTTP 400 caused by empty profile tag values
2026-02-09 18:26:12 -06:00
Doug Borg
5abcc58a78 Address PR review: truncate error response logs and close http client
- Gate full error response body logging behind kDebugMode; truncate to
  500 chars in release builds to avoid log noise and data exposure
- Add RoutingService.close() and call from NavigationState.dispose()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:32:34 -07:00
Doug Borg
71776ee8f0 Fix route calculation HTTP 400 by filtering empty profile tags
Built-in profiles (Flock, Motorola, etc.) include placeholder empty
values like camera:mount: '' for user refinement. When these get
serialized into the routing request body, the alprwatch API rejects
them with HTTP 400.

Fix: strip empty-valued tags from enabled_profiles before sending
the routing request. Also refactor RoutingService to accept an
injectable http.Client for testability, and log error response
bodies for easier debugging of future API issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:32:34 -07:00
Doug Borg
ef4205f4bd Make suggestion limit configurable and remove redundant .take(10) from widget
Move hardcoded suggestion limit to kNSIMaxSuggestions in dev_config, and remove
the redundant .take(10) from optionsBuilder since the fetch stage already caps
results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:32:18 -07:00
Doug Borg
ef6fc1c9c8 Materialize options iterable to list in optionsViewBuilder
Avoids repeated iteration of the lazy .where().take() iterable on each
call to .length and .elementAt() in ListView.builder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:31:37 -07:00
Doug Borg
26c85df7e8 Fix dropdown dismiss by replacing manual overlay with RawAutocomplete
NSITagValueField used raw OverlayEntry + CompositedTransformFollower
with no tap-outside dismiss mechanism, causing suggestion dropdowns to
stay visible when tapping elsewhere. Replace with Flutter's
RawAutocomplete which handles dismiss, keyboard navigation, and
accessibility out of the box.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:31:37 -07:00
Doug Borg
d124cee9b3 Fix null-safety issue with mapBounds in getNearbyNodes
Change mapBounds from LatLngBounds? to final LatLngBounds so the
compiler can prove it's non-null after the inner try-catch. Addresses
review comment on PR #45.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:47:15 -07:00
Doug Borg
037165653c Fix lint warnings and cleanup unused code after RadioGroup migration
Remove unused imports, fields, variables, and dead code introduced
during the RadioGroup widget migration and prior changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:36:18 -07:00
Doug Borg
e4b36719d7 Migrate Radio groupValue/onChanged to RadioGroup widget 2026-02-08 14:23:37 -07:00
Doug Borg
3570104800 Add mounted guards for BuildContext use across async gaps 2026-02-08 14:23:07 -07:00
Doug Borg
4fddd8e807 Replace print() with debugPrint() across codebase
Fixes avoid_print lint warnings by using debugPrint which respects
release mode and avoids console overflow on mobile platforms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 14:23:07 -07:00
Doug Borg
3dada20ec2 Replace deprecated withOpacity and surfaceVariant APIs
Migrate all withOpacity() calls to withValues(alpha:) and
surfaceVariant to surfaceContainerHighest across the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 14:23:07 -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
Doug Borg
61a2a99bbc Replace deprecated localization APIs and add test coverage
Use AssetManifest.loadFromAssetBundle instead of manually parsing the
deprecated AssetManifest.json. Fix a broken localization key reference
(queue.cameraWithIndex → queue.itemWithIndex).

Replace the standalone scripts/validate_localizations.dart with proper
flutter tests (11 tests across two groups): file integrity checks
(directory exists, en.json present, valid JSON structure, language code
file names, deep key-completeness across all locales) and t() lookup
tests (nested resolution, missing-key fallback, parameter substitution,
partial-path fallback).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:31:48 -07:00
stopflock
0ffb7956c5 clear search box after selecting first nav point 2026-02-06 21:08:01 -06:00
stopflock
2620c8758e dev mode, imperial units incl. custom scalebar 2026-02-06 20:28:08 -06:00
stopflock
8804fdadf4 Remove special "existing tags" profile case; existing tags profile now empty. 2026-02-06 09:56:08 -06:00
stopflock
c50d43e00c Pass through all extraneous tags on an existing node, always. Strip out special case for "existing tags" profile, replace with an empty temp profile so all can be treated the same. 2026-02-05 13:21:54 -06:00
stopflock
5df16f376d Move upload queue pause toggle from offline to queue page in settings 2026-02-03 17:00:02 -06:00
stopflock
38245bfb5b Ask for location permission first, notifications later. Roadmap. 2026-02-03 16:22:46 -06:00
stopflock
aba919f8d4 Fix submissions using existing tags profile by stripping non-xml-safe chars. Allow customizing changeset comment. 2026-02-01 22:22:31 -06:00
stopflock
659cf5c0f0 Fix fetching and loading indicator in sandbox 2026-02-01 18:38:31 -06:00
stopflock
ff5821b184 Prevent no-change edit submissions 2026-02-01 16:51:35 -06:00
stopflock
f76268f241 get rid of old versions of edited nodes when submitting in sim mode 2026-02-01 16:02:49 -06:00
stopflock
ba3b844c1e "existing tags" temp profile when editing, "existing operator" profile when such tags exist, full editing of existing nodes via refine tags 2026-02-01 14:50:47 -06:00
stopflock
83d7814fb6 Network status indicator should only respect the latest / current request. Others finish in background. Replace stupid bools with an enum to track state. Be smarter about split requests. 2026-01-31 17:21:31 -06:00
stopflock
9a17d7e666 Network status indicator should only respect the latest / current request. Others finish in background. 2026-01-31 14:22:33 -06:00
stopflock
6707efebbe Fix color of "get more" link text in profile dropdown 2026-01-30 21:49:27 -06:00
stopflock
79d2fe711d Monolithic reimplementation of node fetching from overpass/offline areas. Prevent submissions in areas without cache coverage. Also fixes offline node loading. 2026-01-30 21:34:55 -06:00
stopflock
4a36c52982 Node fetch rework 2026-01-30 19:11:00 -06:00
stopflock
f478a3eb2d Clean up FOV cone debug logging 2026-01-30 18:55:29 -06:00
stopflock
9621e5f35a "Get more" link in profile dropdown, suggest identify page when creating profile 2026-01-30 12:56:50 -06:00
Heath Dutton🕴️
33ae6473bb pass viewbox to nominatim search for location-biased results 2026-01-29 10:42:56 -05:00
stopflock
3fc3a72cde Fixes for 360-deg FOVs 2026-01-28 20:21:25 -06:00
stopflock
1d65d5ecca v2.4.1, adds profile import via deeplink, moves profile save button, fixes FOV clearing, disable direction slider while submitting with 360-fov profile 2026-01-28 18:13:49 -06:00
stopflock
1873d6e768 profile import from deeplinks 2026-01-28 15:20:25 -06:00
stopflock
ae354c43a4 drop approx location support, restore follow me mode on sheet close 2025-12-24 15:29:32 -06:00
stopflock
607ecbafaf Concurrent submissions 2025-12-23 17:56:16 -06:00
stopflock
8b44b3abf5 Better loading indicator 2025-12-23 16:17:06 -06:00
stopflock
ae795a7607 configurable overpass query timeout; increased to 45s 2025-12-23 12:03:53 -06:00
stopflock
a05e03567e shorten nav timeout to reasonable number 2025-12-23 11:39:25 -06:00
stopflock
89fb0d9bbd Trying again to fix GPS. 2025-12-22 16:35:02 -06:00
stopflock
9db7c11a49 Fix approximate location after second GPS refactor 2025-12-17 18:13:39 -06:00
stopflock
c3752fd17e log in button, submission guide cancel, filter nsi by popularity and entered text 2025-12-17 17:36:59 -06:00
stopflock
aab4f6d445 Add new tags to top of list when editing profiles 2025-12-17 16:49:43 -06:00
stopflock
f8643da8e2 Refactor GPS again, fix losing GPS lock 2025-12-17 14:49:13 -06:00
stopflock
5312456a15 Better location / gps maybe 2025-12-12 16:26:50 -06:00
stopflock
8493679526 Nodes stay dimmed while one is selected 2025-12-11 20:30:14 -06:00
stopflock
2047645e89 clean up debug logging 2025-12-11 16:46:43 -06:00
stopflock
656dbc8ce8 positioning tutorial 2025-12-11 16:01:45 -06:00