Skip to content

feat(mobile): let the phone switch task-finished reminders off - #1336

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Oct 24, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

What and why

The mobile app raises a reminder when a task finishes, and until now nothing could silence it. This adds a phone-local switch on the phone's own settings screen: on by default, persisted in AsyncStorage, and read by the notification path, so "off" means no scheduled reminder and no in-app stand-in alert either. Turning reminders back on is when the OS permission is requested, so a phone with reminders off is never asked.

The preference belongs to the phone, not to the desktop that ran the task: the reminder is drawn on the phone, so one choice covers every paired machine — including one made with no machine connected at all.

Commits

  • feat(mobile): let the phone switch task-finished reminders off — a taskFinishedReminders preference module (get/subscribe/set, default on, tolerant of unreadable storage), the notification path gated on it, a switch on the mobile settings screen, i18n strings, and tests for the preference, the notification path and the settings screen.

Verification

Local, before opening the PR (mobile/, Node 22 — the pinned CI line, since mobile jest does not run on this machine's Node 26):

  • npx tsc --noEmit → clean
  • npx eslint src/features/settings/SettingsScreen.tsx src/features/settings/__tests__/SettingsScreen.test.ts src/i18n/locales.ts src/notifications → clean
  • npx jest --runInBand src/notifications src/features/settings → 11 suites, 216 tests passed

Notes

  • Default is on: existing installs with no stored value keep the reminder they already get, and an unparseable or unreadable store falls back to the default rather than to silence.
  • The switch is committed only after persistence succeeds, so a failed write leaves the switch showing the state that actually holds.

The completion reminder every phone now shows had no way to silence it.
Add a phone-local preference, on by default, on the phone's own settings
screen; the notification path reads it, so off means no scheduled
reminder and no in-app stand-in alert either. Turning reminders back on
is when the OS is asked for permission, which preparation skipped while
they were off.
@huichen
huichen enabled auto-merge (squash) October 24, 2026 06:17
@huichen
huichen merged commit 6b76a3e into main Oct 24, 2026
10 checks passed
@huichen
huichen deleted the pr/huichen branch October 24, 2026 06:31
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.

1 participant