Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freemium DBP: Feature Branch to Main PR #3426

Merged
merged 31 commits into from
Oct 28, 2024
Merged

Conversation

aataraxiaa
Copy link
Contributor

@aataraxiaa aataraxiaa commented Oct 21, 2024

Task/Issue URL: https://app.asana.com/0/72649045549333/1208494224217325/f
Tech Design URLs:

  1. https://app.asana.com/0/481882893211075/1208020895737940/f
  2. https://app.asana.com/0/481882893211075/1208051900053059/f
  3. https://app.asana.com/0/481882893211075/1208179957462572/f

CC: @THISISDINOSAUR @miasma13

Description: This PR merges all the previously-review Freemium PIR commits to our main branch.

Test Prerequisites

  1. Test using the DMG build here
  2. Follow Test Prerequisites defined here

Steps to test this PR:

  1. Complete all test flows defined here
  2. After completing the above, smoke test standard PIR, ensuring opt-outs run (leave the browser running, giving the scheduler time to run, then use the debug DB browser to check the OptOutOperations data. You should see some values for successfullySubmittedDate if opt-outs ran)

Definition of Done:

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

aataraxiaa and others added 26 commits October 8, 2024 12:47
…3160)

Task/Issue URL:  https://app.asana.com/0/0/1208098668401283/f

**Description**: This PR targets a feature branch, and is just the first
part of a larger piece of work. This PR adds:
Task/Issue URL: https://app.asana.com/0/0/1208161235633538/f

**Description**: This **PR to the feature branch** includes the
following UX changes relating to Freemium PIR:
Task/Issue URL: https://app.asana.com/0/1206488453854252/1208052452067290/f

**Description**: This PR (_to a feature branch_) implements two Freemium
PIR aspects:

1. When checking PIR prerequisites (see `GateKeeper..` `AgentStopper…`
types), it accounts for Freemium PIR users
2. When running scheduled operations, it only performs scans, and not
opt-outs
…ountManager (#3197)

Task/Issue URL:
https://app.asana.com/0/1201621853593513/1208197280287450/f
CC: @miasma13

**Description**: As an outcome of
[this](#3178 (comment))
discussion, I have refactored `FreemiumPIRUserStateManager` to remove
it’s dependency on `AccountManager`. This includes the removal of the
`isActiveUser` computed property.
…led (#3200)

Task/Issue URL: https://app.asana.com/0/0/1208081037247881/f

**Description**: This PR implements disabling of PIR and deletion of
related data when:

1. The user had onboarded to Freemium AND
2. The feature flag is disabled
Task/Issue URL:
https://app.asana.com/0/1201621853593513/1208052452067293/f
Tech Design URL:
https://app.asana.com/0/481882893211075/1208179957462572/f

**Description**: This PR implements the Freemium PIR scan observation
and polling as described in the related [tech
design](https://app.asana.com/0/481882893211075/1208179957462572/f).
Changes include:

1. Implement a new `FreemiumPIRScanResultPolling` type to observe for
profile save events and poll for results
2. Add a new `DBPProfileSavedNotifier` protocol and concrete
`FreemiumDBPFirstProfileSavedNotifier` type to handle logic of deciding
to post the profile saved notification
3. Adding a new `matchesFoundCount()` method to
`DataBrokerProtectionDataManaging`
4. Adding debug menu commands to reset the related freemium state
5. Adding test coverage for all changes
Task/Issue URL:
https://app.asana.com/0/1201621853593513/1208225303752349/f
Tech Design URL:
https://app.asana.com/0/481882893211075/1208179957462572/f

**Description**: This PR implements the new tab page ‘promotion’ banner,
used for Freemium DBP, together with associated logic. Changes include:
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208220883876723/f

**Description**: No functional changes. Just renaming all PIR references
for DBP (via find and replace for the different variations, e.g. `pir`,
`PIR`)
… & Subscription Changes (#3251)

Task/Issue URL: https://app.asana.com/0/0/1208258950415952/f

**Description**: This PR improves upon existing behavior by doing the
following:
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208294167066324/f

**Description**: This PR moves the declaration of
FreemiumDBPPromotionViewCoordinator to the App Delegate to enable UI
state to be shared by multiple windows (ensuring the new tab page is
updated as expected when state changes)
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208294167066323/f

**Description**: This PR changes a previously defined `didOnboard` state
value to `didActivate. This change is because:
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208052452067283/f
Tech Design URL:
CC:

**Description**: This PR:

1. Creates the experiment manager for Freemium DBP and associated tests
2. Assigns a cohort on app startup if the user is eligible
3. Includes the cohort as a condition when deciding if Freemium DBP is
available
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208161235633546/f

**Description**: This PR updates the copy of Freemium DBP UI to match
the (nearly) final design copy.
…Counted Mirror Sites without Extracted Profiles) (#3311)

Task/Issue URL: https://app.asana.com/0/0/1208338809971749/f

**Description**: I noticed when testing that the results displayed on
the new tab page banner were not correct. Then noticed original logic
was incorrect, and counted mirror sites before checking if we had any
extracted profiles.
…not) (#3326)

Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208052452067292/f

**Description**: This PR adds a new response type,
`DBPUIHandshakeResponse`, which is returned to the FE client via the
`handshake` API.
…chase Success (#3339)

Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208399397658124/f

**Description**: This PR implements the sending of a new notification
when a user purchases a PP Subscription after activating Freemium DBP.
This notification is used to close any open DBP tabs. We close these
tabs because after a purchase the DBP dashboard should be refreshed, and
we will accomplish this by ensuring the tab is re-opened
Task/Issue URL: https://app.asana.com/0/0/1208098668401284/f

**Description**: Update feature flag to remote releasable (the privacy
config value is unchanged, still `internal`, but just updating this now
in preparation for ship review etc.)
Task/Issue URL: https://app.asana.com/0/0/1208499724576829/f

**Description**: PR which makes some changes to further enable testing
of Freemium PIR
Task/Issue URL:
https://app.asana.com/0/72649045549333/1208317449103070/f

**Description**: This PR makes the following changes:
1. Adds experiment pixels and fires them at designated points
2. Prevents regular PIR Reporting  pixels from firing
3. Changes how we store timestamps for Freemium (just Date objects
instead of String)
…esults (#3385)

Task/Issue URL:
https://app.asana.com/0/72649045549333/1208507342220062/f

**Description**: This PR fixes an issue with Freemium PIR where the
results displayed on the new tab page do not match the results displayed
on the dashboard
)

Task/Issue URL: https://app.asana.com/0/0/1208515919807374/f

**Description**: Fixes a bug where the Freemium new tab page banner
would not dismiss. Changes included:
Task/Issue URL:
https://app.asana.com/0/72649045549333/1208081037247873/f

**Description**: When a user has performed a Freemium PIR scan, and then
subscribed - either from the Freemium dashboard or from outside it, e.g
from the Privacy Pro landing page - we will attribute the Subscription
to Freemium. (i.e if the user has performed a Freemium PIR scan, and
then Subscribes via any entry point, we are attributing the Subscription
to Freemium)
@aataraxiaa aataraxiaa changed the title Pete/feature/pir freemium Freemium PIR: Feature Branch to Main PR Oct 21, 2024
Copy link
Contributor

github-actions bot commented Oct 22, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against 7ee8aec

@aataraxiaa aataraxiaa changed the title Freemium PIR: Feature Branch to Main PR Freemium DBP: Feature Branch to Main PR Oct 22, 2024
@aataraxiaa aataraxiaa marked this pull request as ready for review October 23, 2024 10:55
@aataraxiaa aataraxiaa requested a review from quanganhdo October 23, 2024 10:55
@quanganhdo
Copy link
Member

@aataraxiaa I'm following the test flows with this build but at Flow 3, the landing page doesn't show up, so I haven't progressed past that.

Screen.Recording.2024-10-27.at.6.52.44.PM.mov

@aataraxiaa
Copy link
Contributor Author

@aataraxiaa I'm following the test flows with this build but at Flow 3, the landing page doesn't show up, so I haven't progressed past that.

Screen.Recording.2024-10-27.at.6.52.44.PM.mov

Thanks @quanganhdo. I can’t reproduce the issue using the same build. If you have time later today let’s jump on Zoom to debug.

Copy link
Member

@quanganhdo quanganhdo left a comment

Choose a reason for hiding this comment

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

It was with my local setup where PIR web UI is pointed to a different URL, so non-issue.

I've followed all list test cases & smoke tested the standard flow. "New" commits look good.

@aataraxiaa aataraxiaa merged commit 45c1658 into main Oct 28, 2024
21 checks passed
@aataraxiaa aataraxiaa deleted the pete/feature/pir-freemium branch October 28, 2024 16:04
samsymons added a commit that referenced this pull request Oct 29, 2024
# By Dax the Duck (5) and others
# Via GitHub (4) and Diego Rey Mendez (1)
* main: (26 commits)
  PIR broker configs: Add sub actions to ExpectationAction (#3452)
  Fix Neighbor Report Broker JSON and include optOutUrl for all brokers (#3463)
  Freemium DBP: Feature Branch to Main PR (#3426)
  Remove noisy PIR pixels (#3459)
  Bump version to 1.112.0 (290)
  Set marketing version to 1.112.0
  Update embedded files
  update fe onboarding (#3415)
  fire pixels when showing the error screen (#3462)
  Disable NTP animation when toggling Privacy Feed (#3460)
  Bump version to 1.111.0 (289)
  Check the config test pixel from the subscription monitor (#3455)
  Update OnboardingUserScript to use a weak script broker reference (#3456)
  fix flaky bookmark store tests (#3431)
  Workaround for stuck scans on Xcode 16 (#3453)
  Set autohidesScrollers in Bookmarks Manager; Fix scrollers positioning (#3451)
  fix Suggestions not reacting to clicks after being interacted with using keyboard (#3457)
  Fix testWhenChangingSortingInThePanelIsReflectedInTheManager UI Test (#3454)
  add contextual onboarding pixels  (#3447)
  Bump version to 1.111.0 (288)
  ...

# Conflicts:
#	DuckDuckGo/Preferences/View/PreferencesViewController.swift
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