Help centre Families Coaches Support

Littles Baby Tracker

Help for families and coaches

Site Tools


technical:features:10_device_reminders

10 — Device reminders

Technical reference. For task-based help, see the corresponding user guide.
Documentation status: complete for the current implementation

Reviewed: 2026-07-21

Primary users: family members on a native device

Surfaces: mobile web app and native wrapper

Purpose

Device Reminders schedule local prompts for routine care without creating server data or changing an activity record. The native wrapper owns notification permission, scheduling and cancellation; the WebView provides the seven-card editor and live next-due display.

Entry points

  1. Family route: /reminders from the family side menu.
  2. Coach view-as route: /coach/families/:familyId/reminders exists for navigation continuity, but it displays reminders on the coach's physical device. It does not read the family's reminders or create family-scoped platform records.

Supported reminder cards are Breastfeed, Bottles, Sleep, Nappies, Pumping, Medication and Solids.

Create a reminder

  1. Select an inactive card or its switch.
  2. Choose a countdown with separate hour (0–23) and minute (0–59) wheels. Zero is normalized to a minimum of one minute.
  3. Choose One-off or Repeatedly.
  4. Repeating intervals must be at least 15 minutes. If the current countdown is shorter, selecting Repeatedly changes it to 15 minutes and explains why.
  5. Select Set Reminder. The wrapper requests notification permission, replaces any existing activity reminder of the same type, and creates the native trigger.

The result is one active routine reminder per activity type on the device. Creating another for the same type replaces the prior native notification instead of stacking invisible duplicates.

Active reminder display and cancellation

The screen asks the native wrapper for its trigger list on mount and every five seconds while open. Each active card shows:

  1. Due now or the approximate time remaining for a one-off reminder;
  2. Every X. Next: Y left for a repeating reminder.

Selecting an active card/switch cancels it by notification ID and type. The updated native list is returned and used for the card state and global activity-reminder count. Allergy-stage notifications use a different source/type and are not folded into these routine activity cards.

Native notification behavior

The WebView communicates through three bridge request types:

Request Native behavior
reminders.list Enumerate Notifee trigger notifications created by the activity-reminder source.
reminders.schedule Validate, request permission, cancel the prior same-type trigger and create a one-off timestamp or repeating interval trigger.
reminders.cancel Cancel a matching notification ID, or all activity reminders of the requested type, then return the list.

On Android, the wrapper creates the reminders-v2 high-importance channel with default sound, vibration and a reminder category. On iOS it requests a time-sensitive notification with sound and foreground banner/list presentation. Operating-system settings can still suppress delivery even after the app reports a scheduled trigger.

Tapping a routine reminder passes its stored tracker route back to the WebView. The current scheduler stores the legacy form /track/:activityType, while current in-app tracker routes are /family/track/:activityType (or coach subject routes). This route compatibility should be verified in release testing; scheduling/list/cancel do not themselves prove tap-through navigation.

Browser-only fallback

When no React Native bridge exists, the WebView stores a best-effort reminder-shaped record in localStorage so the screen can be developed and exercised in a browser. It does not schedule an operating-system notification or a JavaScript alarm.

A browser card that displays a countdown is not evidence that the user will receive a notification. Real reminder delivery requires the supported native wrapper and OS permission.

Device-local boundaries

  1. Routine reminder state is not sent to the platform API.
  2. It is not associated with a user, family, baby or organization on the server.
  3. It does not sync across phones, reinstalls, browser/native environments or a family member's and coach's devices.
  4. Signing out does not turn a device trigger into another account's server data; teams should nonetheless treat shared-device notification cleanup as a product/session-lifecycle concern.
  5. A notification prompts the selected-device user to open a tracker; it does not automatically create an activity.

Allergy ladder stage reminders are distinct: delivery is also native-device based, but the ladder feature stores reminder metadata on the platform. See Feature 11.

Validation and user-visible states

State Expected behavior
One-off interval below one minute Normalize to one minute; the native timestamp must still be in the future.
Repeating interval below 15 minutes Change to 15 minutes, show the explanatory notice and enforce the same rule natively.
Permission denied Keep the reminder inactive and show the native error; never claim it was scheduled.
Native bridge timeout/unavailable Surface the request failure in the wrapper; browser mode uses clearly non-delivering local fallback state.
List polling fails Keep the screen usable and show Could not load reminders/native error rather than fabricating an empty list.
Schedule fails Leave the modal/card recoverable so the user can retry or cancel.
Cancel fails Preserve the active state until a refreshed native list confirms removal.
OS removes/fires a one-off trigger The next five-second refresh updates/removes the card according to the native trigger list.

Security and privacy

  1. Bridge payloads contain reminder copy, type, interval and route; they do not carry Supabase tokens.
  2. The wrapper lists/cancels only notifications marked with the app's activity-reminder source when operating by type.
  3. No care note, medication instruction, baby identifier or medical detail is required by the current routine-reminder payload.
  4. OS notification content can appear on a lock screen according to the user's device settings.

Acceptance checklist

  1. All seven reminder types can schedule one-off and repeating native triggers.
  2. Repeating intervals below 15 minutes are adjusted/explained in the WebView and rejected defensively by native code.
  3. Re-scheduling a type replaces its prior activity reminder and cancellation is reflected within the polling interval.
  4. Denied permission or bridge/native errors never produce a false active state.
  5. Browser fallback is documented/tested as display state only, not notification delivery.
  6. Reminder state is demonstrably device-local and not mistaken for family/coach shared data.
  7. Notification tap-through to a current authenticated tracker route is verified for cold and warm app launches before release.

Implementation caveats and documentation drift

  1. platform/docs/multi-tenancy/06-existing-app-feature-inventory.md describes only five types and native scheduling as deferred. Current code supports seven types and a Notifee implementation; that canonical inventory entry is stale.
  2. The stored /track/:type notification route does not match the current /family/track/:type route table directly. Treat tap-through as a known verification point until compatibility is covered end-to-end.
  3. The coach view-as Reminders route has no family subject binding because routine reminders are device-local. Its presence must not be described as viewing the family's schedule.

Source evidence

  • mobile-web/src/routes/RemindersScreen.tsx
  • mobile-web/src/webview/native-messages.ts
  • mobile-web/src/App.tsx
  • mobile-wrapper/App.tsx
  • mobile-wrapper/src/native/reminders.ts
  • mobile-wrapper/src/native/notificationRoutes.ts
  • mobile-wrapper/src/native/notificationNavigation.ts
  • platform/docs/multi-tenancy/06-existing-app-feature-inventory.md