Commit Graph

6308 Commits

Author SHA1 Message Date
James Rich
5ad55fcbce refactor(map): architectural improvements — DRY, UDF, dead code, test coverage
- Extract COORDINATE_SCALE to shared MapConstants.kt, removing 6 duplicate
  private const declarations across MapScreen, GeoJsonConverters, InlineMap,
  NodeTrackMap, TracerouteLayers, and TracerouteMap
- Move node filtering from MapScreen composition into BaseMapViewModel as
  filteredNodes StateFlow (testable, avoids composition-time computation)
- Move waypoint construction from MapScreen's inline onSend callback into
  MapViewModel.createAndSendWaypoint() for testability and separation
- Remove unused compassBearing property from MapViewModel (bearing is read
  directly from cameraState.position.bearing in MapScreen)
- Add nodes parameter to TracerouteMap for short name resolution on hop
  markers (was hardcoded to emptyMap, falling back to hex node nums)
- Add GeoJsonConvertersTest with 25 tests covering nodesToFeatureCollection,
  waypointsToFeatureCollection, positionsToLineString, positionsToPointFeatures,
  precisionBitsToMeters, intToHexColor, and convertIntToEmoji
- Expand BaseMapViewModelTest from 5 to 21 tests covering filter toggles,
  preference persistence, mapFilterState composition, filteredNodes with
  favorites/last-heard/any filters, and getNodeOrFallback
- Expand MapViewModelTest from 9 to 12 tests covering createAndSendWaypoint
  with new/edit/locked/no-position scenarios
2026-04-13 13:04:02 -05:00
James Rich
e3ab495b92 fix(map): fix formatCoord to produce fixed decimal places instead of scientific notation 2026-04-13 12:30:44 -05:00
James Rich
dcaed8d866 fix(map): address review round 2 — precision circles, traceroute, i18n
- Fix precision circle radius: use zoom-based exponential interpolation
  to convert meters to pixels instead of treating meters as dp values
- Fix InlineMap precision circle: compute pixel radius from meters at
  the fixed zoom-15 display level
- Fix TracerouteLayers: wrap callback in LaunchedEffect to avoid state
  updates during composition; add nodes to remember keys for fresh hop
  labels; use relatedNodeNums.size for accurate total count
- Fix compass bearing: use epsilon comparison (±0.5°) instead of
  exact float equality to prevent flickering near north
- Localize EditWaypointDialog: replace hardcoded English strings with
  stringResource() using existing waypoint_edit/waypoint_new resources
- Format coordinates to 6 decimal places in waypoint position display
2026-04-13 12:28:11 -05:00
James Rich
c38a2a8da5 fix(map): address code review findings — precision, naming, icons, i18n
- Fix Int.toFloat() precision loss in track point filter by storing
  time as string in GeoJSON and using string-based equality comparison
- Rename MapStyle enum values to match actual tile styles: Satellite→Light
  (Positron), Hybrid→RoadMap (Americana), with updated string resources
- Reset bearingUpdate to IGNORE when gesture cancels location tracking
- Use LocationOn icon for ALWAYS_NORTH tracking mode instead of
  misleading LocationDisabled
- Remove dead isOfflineManagerAvailable() expect/actual declarations
- Replace hardcoded English strings in offline map UI with
  stringResource() calls backed by core:resources entries
2026-04-13 12:14:17 -05:00
James Rich
07114f7c6e fix(map): delete leftover fdroid OSMDroid cluster Java files breaking lint
The MarkerClusterer, RadiusMarkerClusterer, and StaticCluster Java files
under app/src/fdroid/java/ were missed during the MapLibre migration and
still referenced the removed osmdroid dependency, causing lintFdroidDebug
to fail on CI.
2026-04-13 11:40:48 -05:00
James Rich
fc1deee409 feat(map): add maplibre-compose API enhancements — scale bar, bearing tracking, gestures, hillshade, offline tiles, map styles
Leverage underused maplibre-compose 0.12.1 APIs to improve UX parity:

- OrnamentOptions: enable built-in scale bar on all map screens
- GestureOptions: per-screen gesture control (Standard, PositionLocked,
  RotationLocked, ZoomOnly) based on tracking state
- BearingUpdate 3-state cycling: Off → Track+Bearing → Track+North → Off
  with CameraMoveReason.GESTURE auto-cancel
- Offline tile downloads: expect/actual OfflineManagerFactory with
  Android/iOS actuals using rememberOfflineManager + OfflinePackListItem
- HillshadeLayer + RasterDemSource: terrain visualization with free AWS
  Terrarium tiles when Terrain style is selected
- Map loading callbacks: onMapLoadFinished/onMapLoadFailed propagated
- Map styles: all 5 styles now use distinct URIs (Liberty, Positron,
  Bright, Americana, Fiord)
- NodeTrackLayers: fix selected highlight filter expression
- LocationProviderFactory: check permissions before calling
  rememberDefaultLocationProvider to prevent PermissionException
2026-04-13 11:40:48 -05:00
James Rich
d71a8a3ea9 chore: ignore Eclipse/Buildship IDE metadata files 2026-04-13 11:40:48 -05:00
James Rich
e9d6e2b013 feat(map): add feature parity — filters, style selector, waypoint dialog, cluster zoom, bounds fitting, location tracking
Wire remaining map feature gaps identified in the parity audit:

- MapFilterDropdown: favorites, waypoints, precision circle toggles and
  last-heard slider matching the old Google/OSMDroid filter UIs
- MapStyleSelector: dropdown with 5 predefined MapStyle entries
- EditWaypointDialog: create, edit, delete waypoints via long-press or
  marker tap, with icon picker and lock toggle
- Cluster zoom-to-expand: tap a cluster circle to zoom +2 levels
  centered on the cluster position
- Bounds fitting: NodeTrackMap and TracerouteMap compute a BoundingBox
  from all positions and animate the camera to fit on first load
- Location tracking: expect/actual rememberLocationProviderOrNull()
  bridges platform GPS into maplibre-compose LocationPuck with
  LocationTrackingEffect for auto-pan and bearing follow
- Per-node marker colors via data-driven convertToColor() expressions
- Waypoint camera animation on deep-link selection
- Compass click resets bearing to north
2026-04-13 11:40:48 -05:00
James Rich
2cf4e8f80e feat(map): replace Google Maps + OSMDroid with unified MapLibre Compose Multiplatform
Replace the dual flavor-specific map implementations (Google Maps for google,
OSMDroid for fdroid) with a single MapLibre Compose Multiplatform implementation
in feature:map/commonMain, eliminating ~8,500 lines of duplicated code.

Key changes:
- Add maplibre-compose v0.12.1 dependency (KMP: Android, Desktop, iOS)
- Create unified MapViewModel with camera persistence via MapCameraPrefs
- Create MapScreen, MaplibreMapContent, NodeTrackLayers, TracerouteLayers,
  InlineMap, NodeTrackMap, TracerouteMap, NodeMapScreen in commonMain
- Create MapStyle enum with predefined OpenFreeMap tile styles
- Create GeoJsonConverters for Node/Waypoint/Position to GeoJSON
- Move TracerouteMapScreen from feature:node/androidMain to commonMain
- Wire navigation to use direct imports instead of CompositionLocal providers
- Delete 61 flavor-specific map files (google + fdroid source sets)
- Remove 8 CompositionLocal map providers from core:ui
- Remove SharedMapViewModel (replaced by new MapViewModel)
- Remove dead google-maps and osmdroid entries from version catalog
- Add MapViewModelTest with 10 test cases in commonTest

Baseline verified: spotlessCheck, detekt, assembleGoogleDebug, allTests all pass.
2026-04-13 11:40:48 -05:00
James Rich
048c74db13 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5105)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
v2.7.14-internal.52
2026-04-13 12:37:53 +00:00
James Rich
39620d063b fix(nav): restore broken traceroute map navigation (#5104) 2026-04-13 12:25:21 +00:00
James Rich
35bf1fded5 build: align Compose Multiplatform versions and exclude transitive BOMs (#5103) 2026-04-13 12:02:52 +00:00
James Rich
4dd591af25 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5101)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2026-04-13 11:04:58 +00:00
James Rich
a8cdec7f55 fix(ci): isolate JetBrains Compose Multiplatform in Renovate config (#5102) 2026-04-13 06:09:22 -05:00
renovate[bot]
1e29fec469 chore(deps): update androidx (general) to v1.11.0-rc01 (#5099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: James Rich <james.a.rich@gmail.com>
2026-04-12 22:33:44 -05:00
James Rich
b0c603c7ed fix(build): align AndroidX Compose versions with CMP and migrate to runComposeUiTest (#5096) v2.7.14-internal.51 2026-04-13 02:49:11 +00:00
James Rich
e424d4d076 fix(build): add explicit compose-multiplatform-animation dependency (#5095) v2.7.14-internal.50 2026-04-12 22:36:37 +00:00
James Rich
17d85c88c4 fix(release): publish GitHub release on promotion instead of staying draft (#5094) v2.7.14-internal.49 2026-04-12 16:04:13 -05:00
James Rich
5c47256b3f test(prefs): migrate DataStore tests from androidHostTest to commonTest (#5092) 2026-04-12 20:45:19 +00:00
James Rich
a11dee42a7 test: migrate Compose UI tests from androidTest to commonTest (#5091) 2026-04-12 20:20:00 +00:00
James Rich
4156acf297 ci: fix Gradle cache path validation warning for Robolectric jars (#5093) 2026-04-12 15:18:02 -05:00
James Rich
c059f19cc6 ci: reduce CI costs by ~54% — skip desktop builds in PR/main, reduce scheduled frequency (#5090) 2026-04-12 18:59:21 +00:00
James Rich
ade314d503 build: upgrade TARGET_SDK to 37 and update AGP to 9.2.0-alpha08 (#5089) 2026-04-12 17:42:58 +00:00
James Rich
bc44af1597 fix(connections): show device name during connecting state (#5085) 2026-04-12 17:29:25 +00:00
James Rich
eeed780e51 chore(ai): modernize and unify agent tooling and instructions (#5087) 2026-04-12 17:29:05 +00:00
James Rich
d03e61af6f fix(build): remove Compose BOM to resolve compileSdk 37 conflict (#5088) 2026-04-12 17:05:52 +00:00
renovate[bot]
916eb51b94 chore(deps): update androidx.compose:compose-bom-alpha to v2026.04.00 (#5086)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-12 10:01:40 -05:00
James Rich
7ca7179197 build: migrate Compose dependencies to Compose Multiplatform (#5084) 2026-04-12 14:45:11 +00:00
James Rich
9281324be3 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5082) v2.7.14-internal.48 2026-04-12 06:44:03 -05:00
renovate[bot]
6da9f088a9 chore(deps): update softprops/action-gh-release action to v3 (#5081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-12 06:43:45 -05:00
James Rich
e85300531e refactor(transport): complete transport architecture overhaul — extract callback, wire BleReconnectPolicy, fix safety issues (#5080) 2026-04-12 04:22:18 +00:00
James Rich
962c619c4c chore(deps): bump Kotlin 2.3.21-RC, Koin plugin 1.0.0-RC1, drop datetime compat (#5079) 2026-04-12 02:09:23 +00:00
James Rich
19502cd1e0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5078) 2026-04-12 01:48:42 +00:00
James Rich
9468bc6ebe refactor(service): unify dual connectionState flows into single source of truth (#5077) 2026-04-12 00:50:52 +00:00
James Rich
5e44cbd3a9 fix(data): make MeshConnectionManagerImpl.onConnectionChanged atomic (#5076) 2026-04-12 00:49:09 +00:00
James Rich
62264b10c6 refactor(model): remove ConnectionState helper methods and fix updateStatusNotification return type (#5074) 2026-04-11 23:41:34 +00:00
James Rich
174315b21f refactor(data): replace lateinit var scope + start() with constructor injection (#5075) 2026-04-11 23:39:29 +00:00
James Rich
172680fd46 fix(mqtt): replace yield() with proper connection readiness signal (#5073) 2026-04-11 23:38:33 +00:00
James Rich
a3c0a4832d fix(transport): Kable BLE audit + thread-safety, MQTT, and logging fixes across transport layers (#5071) 2026-04-11 22:56:29 +00:00
James Rich
5f0e60eb21 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5067) 2026-04-11 22:07:04 +00:00
James Rich
40ea45a4fe fix(settings): hide Status Message config until firmware v2.8.0 (#5070) 2026-04-11 22:06:53 +00:00
James Rich
1fe3f4423d fix(ui): add missing @ParameterName annotations on actual rememberReadTextFromUri declarations (#5072) 2026-04-11 22:06:44 +00:00
James Rich
0441093ce8 refactor(node): move Position to last in telemetry list on node details (#5068) 2026-04-11 17:06:17 +00:00
James Rich
b3d0c97206 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#5065) v2.7.14-internal.47 2026-04-11 04:53:07 -05:00
James Rich
1f88a26d51 feat(desktop): align versioning with Android, build runnable distributions in CI (#5064) 2026-04-11 03:50:32 +00:00
James Rich
6b77658cb1 ci: remove mesh_service_example from CI checks and Codecov (#5066) 2026-04-11 03:48:09 +00:00
James Rich
3794c79dae refactor: adopt M3 Expressive components from material3 1.11.0-alpha06 (#5063) 2026-04-11 02:10:03 +00:00
James Rich
a6423d0a0f feat(metrics): redesign position log with SelectableMetricCard and add CSV export to all metrics screens (#5062) 2026-04-11 01:26:26 +00:00
James Rich
37e9e2c8f0 fix(charts): hoist rememberVicoZoomState above vararg layers to prevent ClassCastException (#5060) 2026-04-11 00:05:56 +00:00
James Rich
9c8532f80d refactor: leverage new dependency features from recent updates (#5057) v2.7.14-internal.46 2026-04-10 22:51:08 +00:00