summaryrefslogtreecommitdiff
path: root/.agent/code-map.md
diff options
context:
space:
mode:
Diffstat (limited to '.agent/code-map.md')
-rw-r--r--.agent/code-map.md16
1 files changed, 12 insertions, 4 deletions
diff --git a/.agent/code-map.md b/.agent/code-map.md
index e5b28a1..7232110 100644
--- a/.agent/code-map.md
+++ b/.agent/code-map.md
@@ -1,7 +1,7 @@
# Code Map & Context Tips
**Purpose:** Bootstrap context for any new agent session. Read this before touching code.
-**Last updated:** 2026-06-30
+**Last updated:** 2026-07-01
---
@@ -214,6 +214,13 @@ Data-only classes (no logic): `WindData`, `HeadingData`, `BoatSpeedData`, `Depth
| `FishingModeManager.kt` | Persists `isActive` pref; `computeTarget()` returns cross-current bearing toward estimated temp break |
| `FishingOverlayView.kt` | Custom `FrameLayout` inflating `view_fishing_overlay.xml`; `bind(FishingTarget)` updates all text views |
+### `ui/aton/`
+
+| File | Role |
+|------|------|
+| `AtonData.kt` | Stateless object: `colorFor(type)` (Light→red, Float/Buoy→green, Daybeacon/Range→yellow, else→white), `parseStation(json)` → Feature, `parseResponse(json)` → List<Feature>. Uses `org.json.JSONObject`. |
+| `AtonRepository.kt` | `suspend getFeatures(): List<Feature>` — 24h disk cache at `filesDir/aton_cache.json`, falls back to stale cache if network unavailable. Fetches from NOAA ATON API. |
+
### `ui/` (top level)
| File | Role |
@@ -221,9 +228,9 @@ Data-only classes (no logic): `WindData`, `HeadingData`, `BoatSpeedData`, `Depth
| `MainViewModel.kt` | Top-level app state |
| `MobHandler.kt` | MOB activation logic; always-on-top button handler |
| `InstrumentHandler.kt` | Routes NMEA/GPS data to instrument display widgets |
-| `MapHandler.kt` | MapLibre map setup, overlay rendering, track display, fishing bearing line |
-| `MapLayerManager.kt` | Layer visibility: satellite, charts, wind, SST, depth (GEBCO WMS), seamarks, FADs toggle |
-| `LayerPickerSheet.kt` | Bottom sheet: layer toggle UI; constructor takes `onSstChanged` in addition to existing callbacks |
+| `MapHandler.kt` | MapLibre map setup, overlay rendering, track display, fishing bearing line. ATON: `setupAtonLayer(style, visible)` + `updateAtonLayer(features)` + `setAtonLayerVisible(style, visible)`. TSS: `setupTssLayer(style, context, visible)` + `setTssLayerVisible(style, visible)`. |
+| `MapLayerManager.kt` | Layer visibility manager; `MapBasePreset` now has 4 values (OCEAN, SATELLITE, CHARTS, HYBRID) with Esri World Ocean Base as OCEAN preset. ATON/TSS pref keys (`atonEnabled`, `tssEnabled` — pref-only, no Style param). All raster layer defaults are false. |
+| `LayerPickerSheet.kt` | Windy-style card-based picker (2×2 base map cards + 2-col overlay toggle cards). Full-height bottom sheet with `onCreateDialog` override and `STATE_EXPANDED`. Constructor has 13 params including `onAtonChanged` and `onTssChanged`. |
| `FadData.kt` | 18 Hawaii Island DLNR FAD positions in decimal degrees; `toFeatures()` returns GeoJSON for MapHandler |
| `NavLogger.kt` | In-app debug log (primary debugging tool — prefer over ADB) |
| `LocationPermissionHandler.kt` | Runtime location permission request flow |
@@ -343,6 +350,7 @@ Key test files by domain:
| GRIB storage | `test-runner/.../data/storage/GribFileManagerTest.kt` |
| Fishing / rig advisor | `android-app/.../ui/fishing/RigAdvisorTest.kt` (2 tests) |
| Fishing / mode manager | `android-app/.../ui/fishing/FishingModeManagerTest.kt` (1 test) |
+| ATON / layer data | `android-app/.../ui/aton/AtonDataTest.kt` (7 JVM tests: colorFor mappings, parseStation, parseResponse) |
---