summaryrefslogtreecommitdiff
path: root/android-app/SESSION_STATE.md
blob: 6d1b5d33dff1ea58e0a6fee35ee7b18b909d966a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SESSION_STATE.md

## Current Task Goal
BottomNavigationView UI refactor — replace FAB-based navigation with 4-tab bottom nav (Map, Instruments, Log, Safety)

## Status: [APPROVED]

## Completed Items
- [APPROVED] Add RECORD_AUDIO permission to AndroidManifest.xml
- [APPROVED] Create VoiceLogFragment + logbook data layer (LogEntry, VoiceLogState, VoiceLogViewModel, InMemoryLogbookRepository)
- [APPROVED] BottomNavigationView refactor:
  - `activity_main.xml` — CoordinatorLayout with MapView, fragment_container overlay, instrument bottom sheet (CardView), BottomNavigationView, MOB FAB
  - `bottom_nav_menu.xml` — 4 tabs: nav_map, nav_instruments, nav_log, nav_safety
  - `colors.xml` — M3 color palette, instrument/night-vision colors
  - `themes.xml` — Theme.Nav (M3), Theme.Nav.NightVision, InstrumentLabel/PrimaryValue/Card styles
  - `layout_instruments_sheet.xml` — 3×3 GridLayout (AWS, HDG, BSP, TWS, COG, SOG, VMG, Depth, Polar%), barometer, PolarDiagramView
  - `fragment_safety.xml` — MOB card, Anchor Watch card with status
  - `fragment_doc.xml` — AppBarLayout + MaterialToolbar + NestedScrollView + TextView for Markwon
  - `ic_map.xml`, `ic_instruments.xml`, `ic_log.xml`, `ic_safety.xml`, `ic_close.xml` — vector drawables
  - `ui/safety/SafetyFragment.kt` — MOB button, Anchor Watch button, SafetyListener interface, updateAnchorStatus()
  - `ui/doc/DocFragment.kt` — loads markdown from assets via Markwon (core + tables + images)
  - `MainActivity.kt` — setupBottomNavigation(), showOverlay()/hideOverlays(), SafetyFragment.SafetyListener impl
  - `build.gradle` — added Markwon dependencies (core, ext-tables, image)
  - Fixed: isHideable toggled to true before STATE_HIDDEN (was false from XML behavior_hideable="false")

## Navigation Integration
- Single-activity with fragment overlay (fragment_container) for Log/Safety tabs
- Instruments tab expands the bottom sheet; Map tab collapses it to peek height
- MOB FAB is always visible (anchored above BottomNav, left side)
- Safety fragment reused as persistent instance to preserve anchor watch state updates

## Next Steps
- Future: Persist logbook entries to a Room database
- Future: AnchorWatchHandler UI wired into SafetyFragment (currently stub fallback views)
- Future: CPA/TCPA alarms in ViewModel
- Future: AISHub periodic polling on timer