diff options
Diffstat (limited to '.agent/worklog.md')
| -rw-r--r-- | .agent/worklog.md | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/.agent/worklog.md b/.agent/worklog.md index 6187ae5..01b7122 100644 --- a/.agent/worklog.md +++ b/.agent/worklog.md @@ -2,42 +2,20 @@ ## Backlog -- **Pirate mode** — Easter egg / opt-in toggle, not the default voice. Long-press the trip report header flips the narrative into pirate dialect. Seamanlike voice stays default. -- **Race mode tack detection** — Tighter windows (T_SETTLE ~10–15 s), wider STAB_MAX (~30°), shorter MIN_GAP_MS (~20 s) for quick successive tacks at race starts and mark roundings. Current mode is CRUISING (conservative). See `TackDetector.kt` constants. -- **Persist tracks to Room** — Replace in-memory `_pastTracks` with a Room database. SAF write path is solid; the in-memory list is still the source of truth at runtime. -- **AnchorWatchHandler UI** — Re-integrate into `activity_main.xml` and wire to the Safety Dashboard. -- **Unit tests for trip generators** — `TripReportGenerator` and `PreTripReportGenerator` have no JVM tests yet. - ---- - -## Paused Task: Instrument Sheet Visual Redesign - -**Started:** 2026-04-06 · **Status:** Tasks 1–2 done; Tasks 3–7 pending - -### What's being built -Full visual redesign of the instrument bottom sheet: -- `WaveView`: animated canvas divider (swell + wind waves + whitecaps), sky-blue above / ocean-blue below -- `DirectionArrowView`: 14dp inline chevron in two palettes (SKY grey / OCEAN blue) -- Direction arrows inline with all numeric values -- `°` baked into HDG/COG (no separate unit label) -- Forecast cells: value line 1, [arrow] bearing line 2 (swell adds period) -- Imperial units throughout (ft for depth, wave height, swell) -- Forecast labels: "Current" / "Waves" (no section header) -- Reports section removed; touch-through prevented - -### Progress -- [x] Task 1: Remove report buttons, fix touch-through — commit `2d86c0b` -- [x] Task 2: Update typography styles — commit `e79b678` -- [ ] Task 3: Create `DirectionArrowView.kt` -- [ ] Task 4: Create `WaveView.kt` -- [ ] Task 5: Restructure `layout_instruments_sheet.xml` -- [ ] Task 6: Refactor `InstrumentHandler.kt` -- [ ] Task 7: Wire new views in `MainActivity.kt`, fix units +*(all backlog items completed as of 2026-05-27)* --- ## Recently Completed +### Backlog Sweep — 2026-05-27 +All five backlog items closed: +1. **Pirate mode** (trip report Easter egg) — long-press title toggles dialect; done in prior session. +2. **Race mode tack detection** — `TackMode.RACE` with tight windows (T_SETTLE=12s, MIN_GAP=20s, STAB_MAX=30°); 18/18 tests pass including two race-mode-specific tests. +3. **Unit tests for PreTripReportGenerator** — 18 JVM tests in `android-app/.../tripreport/PreTripReportGeneratorTest.kt`; covers `estimatedSogKt`, condition window, sail plan, watch items, similar trips. +4. **AnchorWatchHandler UI re-integration** — depth + rode EditTexts and live radius display embedded directly in `card_anchor` inside `fragment_safety.xml`; removed `button_anchor_config` and `SafetyListener.onConfigureAnchor()`. +5. **Room persistence** — `TrackEntity`, `TrackDao`, `NavDatabase` (Room 2.6.1, KSP); write-through on `stopTrack()`/`importTrack()`; one-time GPX backfill on cold start if Room is empty. GPX/SAF remains source-of-truth. + ### Tack Detection Redesign — 2026-05-26 Full rewrite of `TackDetector.kt` (both `android-app` and `test-runner` mirrors). @@ -56,7 +34,7 @@ Full rewrite of `TackDetector.kt` (both `android-app` and `test-runner` mirrors) - De-duplication uses adjacent-candidate comparison (not group-start), so a long raw-candidate stream from one maneuver stays as one group even if it spans > MIN_GAP_MS - Position pin refined to max instantaneous heading rate within the maneuver zone -**Key constants:** `T_SETTLE=30s, T_MANEUVER=30s, STAB_MAX=20°, MIN_DELTA=60°, MAX_DELTA=160°, MIN_GAP_MS=60s, START_SKIP_MS=60s` +**Key constants:** `T_SETTLE=30s, T_MANEUVER=30s, STAB_MAX=20°, MIN_DELTA=75°, no MAX_DELTA, MIN_GAP_MS=60s, START_SKIP_MS=60s` **Tests:** 16/16 passing at 1 Hz (FULL mode). Covers: straight course, port↔stbd tack, jibe, 0/360 wrap, below/above delta limits, noisy anchor (rejected), unstable before-window (rejected), gradual course change (rejected), two tacks with sufficient gap, two tacks within MIN_GAP_MS (deduplicated), cold-start suppression, too few points. @@ -76,5 +54,5 @@ Full rewrite of `TackDetector.kt` (both `android-app` and `test-runner` mirrors) ## Infrastructure - **`test-runner/`** — standalone Kotlin/JVM Gradle project for logic tests without Android SDK. Run: `cd test-runner && ./gradlew test` -- **Branch policy** — all work merges to `main`. Current feature branch: `claude/optimize-nav-location-tracking-Vac5Z` +- **Branch policy** — all work merges to `main`. - **Build note** — `./gradlew assembleDebug` requires network access to Google plugin repo (unavailable in cloud sandbox). Use `test-runner` for logic tests; build verification requires a local dev environment. |
