docs(openspec): add SDD artifact trail for recent alarm and EQ changes
Build & Deploy PluriWave / Análisis de código (push) Successful in 38s
Build & Deploy PluriWave / Build APK + AAB release (push) Successful in 2m30s

Persist the exploration, proposal, spec, design, tasks, and
verify/archive reports produced during the multi-device EQ,
alarm-countdown, and notification-visual-polish SDD cycles.
This commit is contained in:
2026-07-04 12:42:11 +02:00
parent e5b6d8acb3
commit bccc5c48b8
64 changed files with 6020 additions and 0 deletions
@@ -0,0 +1,33 @@
# Exploration: Alarm Live Countdown & Snooze Dismiss
## Feature 1: Live countdown in pre-notice notification
### Current state
`PluriWaveAlarmReceiver.showPreNoticeNotification()` posts a single notification with hardcoded Spanish text `"Empieza en 30 minutos"`. No l10n, no update mechanism. Notification ID is deterministic (`53 * alarmId.hashCode() + 7`), enabling in-place updates.
### Recommended approach (B)
Compute remaining minutes at fire time: `(triggerAtMillis - System.currentTimeMillis()) / 60_000`. Use existing translated `durationMinutesOnly` key (`"{minutes} min"`) already available in all 13 locales.
### Why not live updates
- AlarmManager chain (30 PendingIntents): quota risk on API 31+
- Foreground service: MIUI/OneUI/ColorOS kill aggressively (~60% of market)
- Flutter Timer.periodic: only works when app is foregrounded
## Feature 2: Snooze dismisses modal reliably
### Current state
`_posponer()` calls `navigator.pop()` but when app is launched from dead state via full-screen intent, Navigator stack is empty and `pop()` is a no-op. Screen stays visible.
### Fix
```dart
if (navigator.canPop()) {
navigator.pop();
} else {
SystemNavigator.pop();
}
```
## Affected Files
- `android/.../PluriWaveAlarmReceiver.kt` — compute remaining, l10n-ready text
- `lib/pantallas/pantalla_alarma_sonando.dart` — canPop guard
- `lib/l10n/app_*.arb` — new pre-notice l10n key if needed