From 418f6ae8c8ccb968c2674548139dab36e2ab1905 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 15 Mar 2026 05:39:21 +0000 Subject: feat: add voice log UI with FAB, fragment container, and logbook domain models - Add VoiceLogFragment, VoiceLogViewModel, VoiceLogState, LogEntry, InMemoryLogbookRepository - Wire voice log FAB in MainActivity to show/hide fragment container - Add RECORD_AUDIO permission to manifest - Add native CMakeLists.txt and native-lib.cpp stubs - Fix missing BufferOverflow import in LocationService Co-Authored-By: Claude Sonnet 4.6 --- android-app/SESSION_STATE.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 android-app/SESSION_STATE.md (limited to 'android-app/SESSION_STATE.md') diff --git a/android-app/SESSION_STATE.md b/android-app/SESSION_STATE.md new file mode 100644 index 0000000..f1c9edc --- /dev/null +++ b/android-app/SESSION_STATE.md @@ -0,0 +1,32 @@ +# SESSION_STATE.md + +## Current Task Goal +Add VoiceLogFragment with SpeechRecognizer integration to the sailing companion Android app. + +## Status: [APPROVED] + +## Completed Items +- [APPROVED] Add RECORD_AUDIO permission to AndroidManifest.xml +- [APPROVED] Create logbook data layer stubs: + - `app/src/main/kotlin/org/terst/nav/logbook/LogEntry.kt` + - `app/src/main/kotlin/org/terst/nav/logbook/VoiceLogState.kt` (sealed class: Idle, Listening, Result, Saved, Error) + - `app/src/main/kotlin/org/terst/nav/logbook/VoiceLogViewModel.kt` + - `app/src/main/kotlin/org/terst/nav/logbook/InMemoryLogbookRepository.kt` +- [APPROVED] Create `app/src/main/res/layout/fragment_voice_log.xml` +- [APPROVED] Create `app/src/main/kotlin/org/terst/nav/ui/voicelog/VoiceLogFragment.kt` +- [APPROVED] Add voice log FAB (`fab_voice_log`) and fragment container (`voice_log_container`) to `activity_main.xml` +- [APPROVED] Wire VoiceLogFragment into MainActivity via FAB toggle + +## Navigation Integration Note +The existing app uses a single-activity design (no BottomNavigationView). VoiceLogFragment is integrated via: +- A FAB (`fab_voice_log`) positioned above `fab_tidal` on the right side +- A `FrameLayout` (`voice_log_container`) covering the full screen, initially `GONE` +- FAB click shows/hides the container and adds/pops VoiceLogFragment on the FragmentManager back stack + +## Package Adaptation +Task instructions referenced `com.example.androidapp` package but the actual sailing companion uses `org.terst.nav`. All files were created with the correct package. + +## Next Steps +- N/A (task complete) +- Future: Persist logbook entries to a Room database instead of in-memory storage +- Future: Classify entry type from speech text rather than defaulting to GENERAL -- cgit v1.2.3