Skip to content

fix(snooze): preserve original alarm categories, sound and label on snooze - #21

Merged
KashifKhn merged 2 commits into
mainfrom
fix/snooze-metadata
Mar 26, 2026
Merged

fix(snooze): preserve original alarm categories, sound and label on snooze#21
KashifKhn merged 2 commits into
mainfrom
fix/snooze-metadata

Conversation

@KashifKhn

Copy link
Copy Markdown
Owner

Summary

  • Forward categories, sound, and label from the original alarm into the snooze notification payload in _snooze() (alarm_ring_screen.dart)
  • Add label field to AlarmRingScreen so the snooze notification title reflects the original alarm label
  • Decode label from notification payload in _handleNotificationPayload (main.dart) and forward it to AlarmRingScreen via the router extras
  • Include label in the scheduled alarm payload in AlarmService.scheduleAlarm so it is available end-to-end

Closes #11

Acceptance Criteria Verification

  • Snoozed alarm fires with the same categories as the original
  • Snoozed alarm fires with the same sound as the original
  • Snoozed alarm fires with the same label as the original
  • No regression on the standard (non-snooze) alarm flow — all 30 tests pass, flutter analyze --fatal-infos exits 0

@vercel

vercel Bot commented Mar 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drawbell Ready Ready Preview, Comment Mar 26, 2026 9:56am

@KashifKhn

Copy link
Copy Markdown
Owner Author

I reviewed this PR and found one functional issue to fix before merge: In lib/screens/alarm_ring/alarm_ring_screen.dart _snooze(), the snooze payload now includes difficulty, categories, sound, and label, but still omits alarmId. For one-shot alarms, dismissing from the snoozed ring screen depends on alarmId so _disableAlarmIfOneShot() can disable the original alarm; without it, the original alarm may stay enabled and fire again later. Suggested fix: include alarmId in the snooze payload when available and keep forwarding it through router extras (already supported).

@KashifKhn
KashifKhn merged commit 34e3e66 into main Mar 26, 2026
5 checks passed
@KashifKhn
KashifKhn deleted the fix/snooze-metadata branch March 26, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: snooze does not preserve original alarm metadata

1 participant