Updated CPM settings view behind feature flag#9102
Open
sammacbeth wants to merge 6 commits into
Open
Conversation
Avoid persisting the migrated preference before remote config loads so invalidateCache can apply onByDefault correctly. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 4a39d83. Configure here.
| override fun getCookiePopUpPreference(): CookiePopUpPreference { | ||
| return settingsRepository.cookiePopUpPreference | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Enabled state ignores cookie preference
High Severity
With the new settings UI, changeCookiePopUpPreference only persists cookiePopUpPreference, while isSettingEnabled() and isAutoconsentEnabled() still read the legacy userSetting flag. Enabling auto-manage when legacy storage is false leaves isAutoconsentEnabled() false, so injectAutoconsent skips injecting the autoconsent script and cookie pop-up handling never runs despite the user turning protection on.
Reviewed by Cursor Bugbot for commit 4a39d83. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Task/Issue URL: https://app.asana.com/1/137249556945/task/1214148192222353
Tech Design URL (if applicable):
Description
Adds a new UI for the CPM settings page, behind the
cookiePopupPreferenceSettingfeature flag.This UI provides a new option, that will also click 'accept' buttons when no 'reject' or similar button is in the popup, and also no settings button exists.
Steps to test this PR
Feature 1
UI changes
Note
Medium Risk
Changes in-page consent automation (including optional accept clicks at MAX) and persistence migration; misconfiguration could affect privacy expectations on real sites until the flag is validated.
Overview
Introduces a Cookie Pop-up Preference model (
OFF,DEFAULT,MAX) with API and persisted storage (including migration from the legacy on/off toggle), gated by remote flagcookiePopUpPreferenceSetting.When the flag is on, the CPM settings screen swaps the single toggle for Auto-Manage Cookie Pop-Ups and Pop-Ups Without Opt-Outs, which map to
DEFAULTandMAX. Init handling now derives enablement and JS config from the preference instead of onlyuserSetting.The embedded autoconsent bundle is updated:
enableHeuristicActionbecomesheuristicMode(off/reject/tier1/tier2) so heuristics can click reject-only, acknowledge/dismiss, or accept when no opt-out exists. Consentomatic rules are dropped from the Android userscript bootstrap.Reviewed by Cursor Bugbot for commit 4a39d83. Bugbot is set up for automated code reviews on this repo. Configure here.