Commit Graph

574 Commits

Author SHA1 Message Date
Doug Borg
c7cfdc471c Add tests demonstrating RawAutocomplete onSubmitted bug
RawAutocomplete.onFieldSubmitted auto-selects the first option when
called, which means pressing "Done" on an empty tag value field
re-populates it with the first NSI suggestion. These tests prove the
bug exists (unguarded path) and verify the fix (guarded path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:56:18 -07:00
stopflock
19b3ca236e no longer lose operator profile selection when making other changes to a node 2026-02-10 18:28:07 -06:00
stopflock
2e0dcb1b2b bump version 2026-02-09 23:59:08 -06:00
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
stopflock
83370fba7e Merge pull request #77 from dougborg/chore/roadmap-to-issues
Move README roadmap to GitHub Issues
2026-02-09 18:23:52 -06:00
stopflock
ba6c7cdbda Merge pull request #40 from dougborg/investigate/dropdown-dismiss
Fix suggestion dropdown dismiss on tap outside
2026-02-09 18:17:53 -06:00
Doug Borg
311125e1f5 Move README roadmap items to GitHub Issues
Replace the inline roadmap section with a link to GitHub Issues.
Each roadmap item has been created as a proper issue (#55-#76) for
better tracking, discussion, and prioritization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:53:45 -07: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
6607e30038 Add tests for routing service and node profile serialization
Route calculation to alprwatch API fails with HTTP 400 because
built-in profiles include empty tag values (e.g. camera:mount: '')
that get serialized into the request body and rejected by the API.

Add routing_service_test.dart with 5 tests:
- Empty tags filtered from request (reproduces the bug)
- Successful route parsing
- HTTP error handling
- Network error wrapping
- API-level error surfacing

Add node_profile_test.dart with 4 tests:
- toJson/fromJson round-trip
- getDefaults returns expected profiles
- Empty tag values exist in defaults (documents bug origin)
- Equality based on id

Tests require RoutingService to accept an injectable http.Client,
which will be added in the next commit along with the fix.

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
stopflock
20c1b9b108 Merge pull request #46 from dougborg/docs/dev-setup-guide
Rewrite dev setup docs with tested instructions
2026-02-09 15:18:58 -06:00
Doug Borg
0207f999ee Address Copilot review feedback on PR #46
- build.gradle.kts: use maxOf(flutter.minSdkVersion, 23) to preserve
  the floor required by oauth2_client/flutter_web_auth_2
- DEVELOPER.md: replace hardcoded /opt/homebrew paths with
  $(brew --prefix) for Intel Mac compatibility, use $HOME instead
  of /Users/$USER for --sdk_root
- README.md: label quick-start as macOS-specific, add cross-platform
  pointer to DEVELOPER.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:59:11 -07:00
Doug Borg
4a342aee9d Bump Dart SDK constraint to >=3.8.0 and document Flutter 3.35+ requirement
The RadioGroup widget (merged via PR #35) requires Flutter 3.35+ /
Dart 3.8+. The old constraint (>=3.5.0) allowed older SDKs that don't
have RadioGroup, causing cryptic build errors instead of a clear
version mismatch from pub get.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:54:42 -07:00
Doug Borg
3827a6fa1d Rewrite dev setup docs with tested, copy-pasteable instructions
Replaces the vague "Latest stable version" prerequisites in DEVELOPER.md
with concrete commands tested on a fresh macOS machine. Adds Android SDK
setup without Android Studio, documents the gen_icons_splashes.sh
requirement, and fixes the OAuth2 config to reference build_keys.conf
instead of the removed keys.dart.example. Also includes Flutter SDK
auto-migrations (iOS 13.0 min, gradle minSdk).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:54:42 -07:00
stopflock
ed38e9467c Merge pull request #47 from dougborg/fix/map-bounds-null-safety
Fix null-safety issue with mapBounds in getNearbyNodes
2026-02-09 14:52:26 -06: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
stopflock
c13dd8e58a Merge pull request #45 from dougborg/pr/fix-upstream-lint
Fix lint warnings after RadioGroup migration
2026-02-09 14:42:25 -06: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
stopflock
98b73fe019 Merge pull request #35 from dougborg/pr/03-radiogroup
Migrate Radio to RadioGroup widget
2026-02-09 14:26:34 -06:00
stopflock
86e0d656d3 Merge pull request #34 from dougborg/pr/02-lint-cleanup
Add flutter_lints and fix all analyzer warnings
2026-02-09 11:43:48 -06:00
stopflock
a149562001 Merge pull request #38 from dougborg/pr/add-pr-validation-workflow
Add PR validation workflow
2026-02-08 20:19:13 -06: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
stopflock
498e36f69d Merge pull request #39 from dougborg/pr/localization-fixes
Replace deprecated localization APIs and add test coverage
2026-02-08 12:53:25 -06:00
Doug Borg
e2d0d1b790 Replace deleted validation script with flutter test in build scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:31:48 -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
Doug Borg
7e67859b2f Add PR validation workflow for analyze and test
No CI currently runs on pull requests — the only workflow triggers on
releases. This adds a lightweight, secrets-free workflow that runs
flutter analyze and flutter test on PRs to main and pushes to main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:57:50 -07:00
stopflock
e559b86400 Merge pull request #33 from dougborg/pr/01-test-fixes
Fix pre-existing test failures in tile provider tests
2026-02-07 13:04:51 -06:00
Doug Borg
73160c32de Add mocktail dev dependency and fix test state leak
Address PR review comments:
- Add mocktail and flutter_test to dev_dependencies in pubspec.yaml
- Add tearDown to reset AppState.instance between tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 11:35:28 -07:00
Doug Borg
d6f7e99941 Fix pre-existing test failures in tile provider tests
- tile_provider_test: Fix stale package:flock_map_app import (now
  deflockapp), correct test assertion for Mapbox requiring API key
- deflock_tile_provider_test: Fix relative imports, replace invalid
  const TileLayer with final, mock AppState.instance for getImage test
- Remove widget_test.dart (default flutter create scaffold, references
  nonexistent MyApp counter widget)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 11:27:39 -07:00
stopflock
0ffb7956c5 clear search box after selecting first nav point v2.6.4-rc 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
dd1838319d roadmap 2026-02-01 16:08:36 -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
1dd0258c0b cleanup, bump version 2026-01-31 17:35:42 -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