Browse Source

docs: update UI modernization tasks with implementation journey

- Document all approaches tried: Activity-based, ComposeView overlay, lifecycle solutions
- Detail specific issues encountered: positioning, transparency, lifecycle crashes
- Analyze three next-step options with pros/cons
- Record user requirements and current git state for easy resume
- Provide technical deep dive of what worked vs what failed

Ready for next conversation to pick up from Option A, B, or C.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
feature/modern-capture-ui
Quildra 5 months ago
parent
commit
418e7e5c46
  1. 47
      UI_MODERNIZATION_TASKS.md

47
UI_MODERNIZATION_TASKS.md

@ -3,11 +3,48 @@
## Overview
This document outlines the planned modernization of the capture mode UI, transforming it from a basic floating button system to a modern, feature-rich interface.
## Current State
- Basic floating "orb" (actually just a styled Button)
- Simple expandable menu with 5 options
- Basic visual state feedback
- MVC architecture with proper event handling
## Implementation Journey & Current Status
### ✅ **What We Successfully Implemented**
- **Decoupled Architecture**: FloatingUIActivity + ScreenCaptureService with Binder communication
- **Material 3 Compose FAB**: Beautiful, animated FAB with proper Material Design
- **Expandable Menu**: Smooth animations, haptic feedback, proper Material 3 theming
- **Service Communication**: Clean Binder-based API for detection commands
### ❌ **Critical Issues Encountered**
#### 1. **Activity-Based Approach Issues**
- **Problem**: FloatingUIActivity not truly "floating" - positioned like regular activity
- **Symptom**: Couldn't drag freely, brought up navigation/status bars
- **User Feedback**: "It's not floating, I can drag it to the left a little but that's it"
#### 2. **ComposeView in Overlay Context**
- **Problem**: `ViewTreeLifecycleOwner not found` when using ComposeView in WindowManager overlay
- **Root Cause**: ComposeView requires LifecycleOwner, but overlay context has none
- **Attempts Made**:
- Created custom `OverlayLifecycleOwner` implementing LifecycleOwner + SavedStateRegistryOwner
- Tried `ViewTreeLifecycleOwner.set()` - API not available
- Tried View.setTag() with lifecycle IDs - didn't work
- Simplified approach without explicit lifecycle - still crashed
#### 3. **Transparency & System UI Issues**
- **Problem**: Activity showed system bars, wasn't truly transparent
- **Symptoms**: Navigation bar visible, black status bar, couldn't see underlying apps
- **Attempts**: Immersive mode, SYSTEM_UI_FLAG_*, WindowInsetsController - partially worked
### 🔄 **Current Architecture State**
```
MainActivity → ScreenCaptureService → FloatingComposeOverlay (BROKEN)
ComposeView + WindowManager (Crashes on lifecycle)
```
**Files Modified:**
- `FloatingUIActivity.kt` - Working Compose UI (but not truly floating)
- `FloatingComposeOverlay.kt` - Crashes due to lifecycle issues
- `ScreenCaptureService.kt` - Clean service communication
- `AndroidManifest.xml` - Activity registration with transparent theme
## Phase 1: Core Modernization ⚡

Loading…
Cancel
Save