Skip to content

feat(streak): one-tap reminder opt-out from the push - #7375

Merged
rebelchris merged 4 commits into
mainfrom
feat/streak-reminder-opt-out
Nov 16, 2026
Merged

rebelchris merged 4 commits into
mainfrom
feat/streak-reminder-opt-out

Conversation

@rebelchris

@rebelchris rebelchris commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • New page /notifications/streak-reminder/off, opened by the push button from dailydotdev/daily-api#4609.
  • Removes the reminder row (same unsubscribePersonalizedDigest call as the settings switch), toasts "Streak reminders are off. You can turn them back on in Settings." and goes to /settings/notifications. If the call fails it toasts an error and still goes to settings.
  • Logged-out users go through onboarding and come back.
  • useStreakReminder gains turnOffStreakReminder and isReady.

Deploy order

  1. This PR first. It only uses existing mutations.
  2. Then dailydotdev/daily-api#4609, which adds the button linking here.

Events

Type event_name value
New click target_type: streak reminder opt out, extra: { origin: push }

Experiment

No.

Manual Testing

Specs: new StreakReminderOffPage.spec.tsx, AccountNotificationsPage.

Preview domain

https://feat-streak-reminder-opt-out.preview.app.daily.dev

🤖 Generated with Claude Code

/notifications/streak-reminder/off is the target of the "Turn off streak
reminders" button on the streak pushes. For a signed-in reader it removes the
streak_reminder digest row, as the settings switch does, and also mutes the
in-app streak_reminder flag so no path sends another one, then toasts and
lands on /settings/notifications where the same row turns it back on. A
signed-out reader goes through the usual protected-page login with
after_auth pointing back at the link. The mute waits for both the reminder
row and the notification flags to load, since the flags mutation replaces
the whole set from client state.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Nov 16, 2026 11:27am UTC
storybook Ready Ready Preview Nov 16, 2026 11:27am UTC

Request Review

@rebelchris rebelchris left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed together with dailydotdev/daily-api#4607/#4608/#4609 and the iOS click handler PR.

Deploy order: the description treats this as following daily-api#4609, but it should go first. This page only uses the existing unsubscribePersonalizedDigest and notification-settings mutations, so it works today. #4609, on the other hand, adds the button to every streak reminder (it has no flag) and links here. If #4609 lands first, the button lands on a 404.

One inline finding.

Reviewed by AI.

extra: toggleLogExtra,
});

if (notificationSettings && !isMuted) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: setNotificationStatus isn't awaited and its failure is never surfaced. The settings mutation rolls back onError silently, while the page toasts "Streak reminders are off" anyway.

The mute is also a second source of truth for the same decision. unsubscribePersonalizedDigest already deletes the row and stamps streakReminderOptOutAt, which keeps streakReminderDefaultOn from recreating it, and the #4608 saver uses the same row. Leaving inApp muted makes a later re-enable path inconsistent. For example, toggleStreakReminderWithStreak(true) in SettingsContext (hide then show streaks) recreates the row but never unmutes, so the API skips every send and Settings shows the reminder as off.

Suggestion: drop the mute and rely on the row delete, like the settings switch does. If the mute is kept, await it and unmute in toggleStreakReminderWithStreak as well.

Reviewed by AI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped the mute in ea94f5c. turnOffStreakReminder now only calls unsubscribePersonalizedDigest, same as the settings switch, and isReady no longer waits on the notification flags. That mutation is mutateAsync, so the page only shows the success toast once it resolves; on failure it shows the error toast and skips the opt-out event. The spec no longer expects the settings mutation and adds a failure case.

The one-tap opt-out now only deletes the reminder row, like the settings
switch. The API stamps the opt-out so the row is not recreated, and the
mute was a second source of truth that a later re-enable never cleared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…opt-out

# Conflicts:
#	packages/shared/src/lib/log.ts
@rebelchris
rebelchris merged commit 26e78db into main Nov 16, 2026
13 checks passed
@rebelchris
rebelchris deleted the feat/streak-reminder-opt-out branch November 16, 2026 12:04

This branch was successfully deployed

2 active deployments
Preview – daily-webapp — f696ef1f Deployed Nov 16, 2026 by vercel[bot]
Preview – storybook — f696ef1f Deployed Nov 16, 2026 by vercel[bot]
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