diff options
| author | Claude <noreply@anthropic.com> | 2026-04-22 05:35:49 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-04-22 05:35:49 +0000 |
| commit | eeafe2f0f3a3718bd52e9c333894e1abbc0611ab (patch) | |
| tree | 68ba329f0cadd64333fb5d72587f684fc38a500a /.agent/worklog.md | |
| parent | 3cddcd3b0a8719da5e828734a1d3054cef803235 (diff) | |
feat: vessel registry, crew management, and thermal alarm
- Vessel/CrewMember data classes with full profile fields
(MMSI, callsign, flag, home port, hull type, dimensions, roles)
- VesselRepository: in-memory CRUD for own vessel, fleet, and crew;
getOwnVessel(), getSkipper(), getCrewByRole() helpers
- VesselRegistryFragment: own-vessel card + crew list + known-vessels
list; AlertDialog editors for add/edit; long-press to delete
- ic_vessel.xml sailboat icon; 5th bottom-nav tab "Vessel"
- ThermalMonitor: thermalFlow() using Intent.ACTION_BATTERY_CHANGED
(battery °C) + PowerManager.OnThermalStatusChangedListener (API 29+);
ThermalState OK/WARM/HOT/CRITICAL with distinct-until-changed filter
- MainActivity: startThermalMonitoring() sounds mob_alarm + Toast on
HOT (≥45°C) and CRITICAL (≥50°C); auto-silences on OK/WARM
- MainViewModel: thermalState and thermalReading StateFlows
- 18 VesselRepositoryTest cases — all GREEN (test-runner)
- design.md: updated competitive matrix + feature implementation status
https://claude.ai/code/session_011h2dXbgXg3PesQMmQUNTCW
Diffstat (limited to '.agent/worklog.md')
| -rw-r--r-- | .agent/worklog.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.agent/worklog.md b/.agent/worklog.md index 7a4467f..4818a94 100644 --- a/.agent/worklog.md +++ b/.agent/worklog.md @@ -140,6 +140,25 @@ Section 7.3 AIS display — COMPLETE (2026-03-15): AIS integrated into ViewModel - `activity_main.xml`: `fab_record_track` FAB anchored top|end of bottom nav - `drawable/ic_track_record.xml`: red dot record icon +### [APPROVED] Vessel Registry + Crew Management (2026-04-22) +- `android-app/app/src/main/kotlin/org/terst/nav/vessel/Vessel.kt` — data class: name, MMSI, callsign, flag, homePort, hullType, LOA, beam, draft, displacement, engineHp, notes, isOwnVessel +- `android-app/app/src/main/kotlin/org/terst/nav/vessel/CrewMember.kt` — data class: name, role (SKIPPER/FIRST_MATE/WATCH_CAPTAIN/CREW/GUEST), emergencyContact, emergencyPhone, certifications, notes +- `android-app/app/src/main/kotlin/org/terst/nav/vessel/VesselRepository.kt` — in-memory CRUD for vessels and crew; addVessel, updateVessel, removeVessel, getOwnVessel, addCrewMember, updateCrewMember, removeCrewMember, getSkipper, getCrewByRole +- `android-app/app/src/main/res/layout/fragment_vessel_registry.xml` — NestedScrollView with own vessel card, crew list, and known vessels list; + ADD buttons for crew and fleet +- `android-app/app/src/main/kotlin/org/terst/nav/ui/vessel/VesselRegistryFragment.kt` — fragment with AlertDialog editors for vessels and crew; long-press to delete +- `android-app/app/src/main/res/menu/bottom_nav_menu.xml` — added `nav_vessel` 5th tab with `ic_vessel` icon +- `android-app/app/src/main/res/drawable/ic_vessel.xml` — sailboat silhouette vector icon +- `MainViewModel.kt` — added `vesselRepository` property (public, for fragment access) +- `MainActivity.kt` — `R.id.nav_vessel` case loads `VesselRegistryFragment` +- Mirror classes in `test-runner/src/main/kotlin/org/terst/nav/vessel/` +- 18 tests in `test-runner/src/test/kotlin/org/terst/nav/vessel/VesselRepositoryTest.kt` — all GREEN + +### [APPROVED] Thermal Alarm (2026-04-22) +- `android-app/app/src/main/kotlin/org/terst/nav/thermal/ThermalMonitor.kt` — `thermalFlow(context)` as Kotlin Flow using `Intent.ACTION_BATTERY_CHANGED` for battery temperature; `PowerManager.addThermalStatusListener` on API 29+ for supplemental state; emits distinct `ThermalReading` only on state change +- `ThermalState` enum: OK (<40°C), WARM (40–45°C), HOT (45–50°C), CRITICAL (>50°C) +- `MainViewModel.kt` — `thermalState: StateFlow<ThermalState>`, `thermalReading: StateFlow<ThermalReading?>`, `onThermalReading()` entry point +- `MainActivity.kt` — `startThermalMonitoring()` called from `observeDataSources()`; HOT triggers Toast + alarm sound (reuses `R.raw.mob_alarm`); CRITICAL triggers urgent Toast + alarm; OK/WARM stops alarm; alarm released in `onDestroy()` + ## Next 3 Specific Steps 1. **Persist track to GPX/Room** — export recorded track as GPX file or store in Room DB 2. **Track stats in Log tab** — show elapsed time, distance, avg SOG while recording |
