CCExtractor / CCExtractor/taskwarrior-flutter

[Bug] Intent Caching and BottomSheet Stacking via Android Widgets & Deep Links

Abierto
#627 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Dart
Estrellas
244
Forks
179
Merge medio
12 h 42 min
PR fusionados (30 d)
2

Descripción

### Describe your issue

When the application is launched from the background via an Android Home Screen Widget or Quick Action intent, GetX state management encounters two severe routing and context synchronization bugs:

1. **The Widget Controller Cache Loop:** Tapping "Task 1" on a widget correctly loads the Detail Route and instantiates a `DetailRouteController` for Task 1. However, if the app is backgrounded and the user taps a widget for "Task 3", GetX recognizes that `DETAIL_ROUTE` is already active in memory. Instead of routing the new UUID, GetX lazily reuses the cached `DetailRouteController`, keeping "Task 1" permanently stuck on screen for all subsequent widget taps.

2. **The "Black Screen" Context Void:** The Floating Action Button natively launched `showModalBottomSheet`. If a user tapped a "Quick Action" or "Widget Add Task" intent while the app was backgrounded with a native sheet open, GetX was unable to detect the native sheet via `Get.isBottomSheetOpen`. GetX stacked the new intent sheet on top. Upon saving, the system popped the GetX sheet, stranding the user inside an orphaned/black void natively.

### Steps to reproduce

**Widget Caching Loop:**
1. Tap Task 1 from an Android Widget.
2. Press the Android Home button to background the app.
3. Tap Task 3 from an Android Widget.
**Result:** The app incorrectly displays Task 1.

**Black Screen Void:**
1. Tap the in-app `+` FAB to open the Add Task modal.
2. Press the Android Home button to background the app.
3. Long-press the App Icon and trigger the "Add Task" Quick Action intent.
4. Fill out the task details and hit Save.
**Result:** The UI dismisses the active modal but reveals a broken/black overlay instead of the Home screen.

### What was the expected result?

The app should cleanly unmount stale overlays (like the native FAB bottom sheet) and explicitly purge legacy controllers (`DetailRouteController`) from memory before injecting new routing intents from a warm start. The new task should load accurately, and closing a bottom sheet should safely return the user to the underlying UI without crashing into a black screen.

### Put here any screenshots or videos (optional)

https://github.com/user-attachments/assets/5d021ebe-5f77-475e-b0d0-e6d84e01a383

### How can we contact you (optional)

_No response_

### Would you like to work on this issue?

Yes

### By submitting this issue, I have confirmed that:

- [x] I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza siguiendo los puntos de entrada de Android Home Screen Widget y Quick Action/deep-link hasta Flutter, y luego inspecciona el DetailRouteController y el flujo nativo de showModalBottomSheet del FAB. Reproduce ambos escenarios de lanzamiento en segundo plano y verifica que una nueva task se abra correctamente y que guardar una sheet impulsada por un intent vuelva a la pantalla Home subyacente sin una superposición negra.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
android, dart, flutter
Área
mobile
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.