Skip to content

Conversation

jozsef-vesza
Copy link
Contributor

@jozsef-vesza jozsef-vesza commented Oct 13, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211494295271896
Tech Design URL: https://app.asana.com/1/137249556945/project/481882893211075/task/1211375835464498
CC:

Description

This PR adds the following macOS entry points for the win-back offer:

  • modal message on the first day of eligibility
  • badge in the ‘more options’ menu
  • badge in the preferences sidebar
  • updated ‘purchase subscription’ preference pane
  • updated ’subscription settings’ preference pane
  • partial support for NTP badge (see Notes at the bottom)

Testing Steps

  1. enable feature flag: Debug > Feature Flag Overrides > VPN > winBackOffer
  2. simulate churn via Debug > Win-back Offer > Simulate Churn
  3. override Today’s date via Debug > Win-back Offer > Override Today’s date so that it’s 3 days after churn date (e.g. churn date is Oct 10, offer will start on Oct 13(
  • After you restart, you should see the launch modal for the offer.
  • You should also see the “Save 25%” badge in the ‘more options’ menu
  • You should see the same badge in the preferences sidebar
  • If you have no active subscription, you should see a variant of the ‘purchase subscription’ view on the preferences detail pane
  • if you have an active subscription, you should see a variant of the ‘expired subscription’ view on the preferences detail

Impact and Risks

None, everything is behind feature flag

What could go wrong?

N/A

Quality Considerations

I’ve added tests for the menu/sidebar behaviors.

Notes to Reviewer

A few caveats below:

  • NTP support is in place, but needs FE work before it’s usable, so I will finalize it once the FE is ready
  • strings are being translated for both platforms. Translations are not a blocker for this feature, but I plan to download them once I’m done with the iOS entry points (ETA: tomorrow)
  • The entry points are visible, but don’t do anything at the moment. I’ll hook up the landing page when working on this task.

Internal references:

Definition of Done | Engineering Expectations | Tech Design Template


Note

Implements macOS win‑back offer entry points (modal, menu/sidebar badges, preferences updates, NTP banner scaffolding) and exposes shared storage/manager with new state while adding strings, assets, and tests.

  • macOS – Win‑back Offer UI:
    • Launch Modal: New prompt presenter/view/view model to show on first eligible launch.
    • Menu Badge: MoreOptionsMenu shows “SAVE 25%” on Subscription when offer available; layout tweaks to MenuItemWithBadge.
    • Preferences:
      • Sidebar badge on Subscription.
      • Purchase/Settings panes updated with offer‑aware CTAs and messaging.
    • New Tab Page: Banner provider + client wiring; promotion view coordinator (awaiting FE consumption).
    • Feature/Debug: Feature flag provider and debug menu (simulate churn/override date); assets added.
    • App Wiring: AppDelegate constructs visibility manager, store, prompt presenter, and promotion coordinator.
  • Shared (BrowserServicesKit/Subscription):
    • Make WinbackOfferStoring/WinBackOfferVisibilityManaging public; add didDismissUrgencyMessage state.
    • Inject dateProvider; replace direct Date() usage; minor logic refactors.
  • Localization:
    • Add win‑back campaign strings for iOS/macOS (modal, last‑day message, badges, preferences CTAs).
  • Tests:
    • Add mocks and unit tests for menu badge visibility, NTP coordinator wiring, and preferences model behavior.

Written by Cursor Bugbot for commit b7dcd11. This will update automatically on new commits. Configure here.

@jozsef-vesza jozsef-vesza requested a review from miasma13 October 13, 2025 12:47
Copy link

github-actions bot commented Oct 13, 2025

Warnings
⚠️ PR has 1330 lines of added code (excluding Xcode projects and assets). Consider splitting into smaller PRs if possible.
Messages
📖

You seem to be updating localized strings. Make sure that you request translations and include translated strings before you ship your change. See iOS and macOS localization guidelines for more information.

Generated by 🚫 dangerJS against b7dcd11

Copy link
Contributor

@miasma13 miasma13 left a comment

Choose a reason for hiding this comment

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

Code looks good and all worked according to the test steps. 👍

.frame(maxWidth: .infinity)
.frame(height: Constants.buttonHeight)
}
.frame(height: 28)
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be extracted to constants, and for the following button too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ll address this in the following PR.

@jozsef-vesza jozsef-vesza merged commit 6f0ac4c into main Oct 16, 2025
43 checks passed
@jozsef-vesza jozsef-vesza deleted the jozsef/winback-offer-entry-points-macos branch October 16, 2025 07:30
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