Skip to content

Add permission warning banner and save-time dialog for alarms and reminders#159

Merged
mapgie merged 2 commits into
mainfrom
claude/native-time-pickers-f5bokb
Jun 22, 2026
Merged

Add permission warning banner and save-time dialog for alarms and reminders#159
mapgie merged 2 commits into
mainfrom
claude/native-time-pickers-f5bokb

Conversation

@mapgie

@mapgie mapgie commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • EditAlarmScreen: Replaces the one-shot permission check with live, resumable state for both POST_NOTIFICATIONS and SCHEDULE_EXACT_ALARM. An inline ListItem banner appears whenever either permission is missing. The Save button intercepts with an AlertDialog: "Open Settings" saves then navigates to the relevant system settings, "Save anyway" saves without fixing.
  • RemindersScreen: Adds a POST_NOTIFICATIONS banner (shown when any reminder toggle is enabled and the permission is missing) alongside the existing exact-alarm banner. Both banners now use live, refreshable state instead of a one-shot remember.
  • SettingsScreen (RemindersSubScreen): Same live permission state upgrade and notification-permission banner as RemindersScreen.
  • Corrected semantics role placement (role before clickable) in the existing exact-alarm banner to match CI rules.

Test plan

  • Open Edit Alarm on a device where POST_NOTIFICATIONS is denied. Confirm the permission banner appears in the configure step.
  • Tap Save. Confirm the dialog appears with "Open Settings" and "Save anyway".
  • Grant permission and return. Confirm banner disappears.
  • Toggle a reminder on in RemindersScreen with notification permission denied. Confirm notification banner appears.
  • Switch delivery mode to ALARM without SCHEDULE_EXACT_ALARM permission. Confirm exact-alarm banner appears.
  • Confirm no banners when both permissions are granted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9


Generated by Claude Code

claude added 2 commits June 22, 2026 05:44
Show an inline ListItem-style warning banner when any reminder or alarm
is active but POST_NOTIFICATIONS or SCHEDULE_EXACT_ALARM is missing.
The banner auto-refreshes on every ON_RESUME so it clears once the user
grants the permission and returns to the screen.

EditAlarmScreen: permission state replaces the old one-shot `remember`
check; save button intercepts when permissions are missing and shows a
dialog with "Open Settings" (saves + navigates to system settings) and
"Save anyway" (saves without fixing). Banner appears throughout the
configure step unconditionally when either permission is absent.

RemindersScreen / SettingsScreen (RemindersSubScreen): upgraded from a
single one-shot canScheduleExactAlarms check to live, resumable state
for both POST_NOTIFICATIONS and SCHEDULE_EXACT_ALARM. Added a
notification-permission banner that appears when any reminder toggle is
on. Existing exact-alarm banner is preserved; semantics role order
corrected (role before clickable per CI rules).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9
SettingsScreen.kt declared anyEnabled twice in the same Column lambda
scope (once for the notification banner, once for the reminder-time
row), causing a Kotlin conflicting-declarations compile error.

Removed the second declaration; both uses now share the first.

Also adds the missing changelog/unreleased/reminder-permission-warnings.json
fragment that the changelog-check CI job requires.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6ww6od57rWLYrGSCs8ta9
@mapgie mapgie marked this pull request as ready for review June 22, 2026 17:12
@mapgie mapgie merged commit 64fb4b8 into main Jun 22, 2026
4 checks passed
@mapgie mapgie deleted the claude/native-time-pickers-f5bokb branch June 22, 2026 17:12
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.

2 participants