Add support for contingency messaging#9083
Draft
CrisBarreiro wants to merge 9 commits into
Draft
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 52afd00. Configure here.
Show a one-off bottom sheet when ad-blocking contingency mode is enabled and the user visits YouTube, gated behind the adBlockingUXImprovements flag. It shows once per contingency-enabled period; the shown state is reset when contingency mode is disabled (observed via the toggle's enabled() flow in MainProcessLifecycleObserver.onCreate). Driven by AdBlockingExtensionJsInjectorPlugin on page load, which notifies the internal ContingencyMessageHandler, keeping JS injection and UI concerns separated. No changes to any -api module.
4f76570 to
540ac9e
Compare
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/project/72649045549333/task/1214489465023873?focus=true
Tech Design URL (if applicable):
Description
Add support for contingency messaging:
Steps to test this PR
Feature 1
UI changes
Note
Medium Risk
Changes user-visible ad blocking settings and YouTube browsing UX under remote flags; injection is already blocked in contingency mode elsewhere, but mis-flagging could hide controls or show messaging unexpectedly.
Overview
Adds contingency mode UX when remote flags
adBlockingUXImprovementsandenableContingencyModeare on: a one-time bottom sheet on foreground YouTube page loads (viaContingencyMessageHandlerfromAdBlockingExtensionJsInjectorPlugin.onPageFinished), with persistence in a new DataStore and session guards so repeats are suppressed until contingency is toggled off and back on.Ad Blocking settings v2 switches from the block-ads toggle to a static contingency info row when contingency is active, and drives the status indicator via
isStatusIndicatorOn(off in contingency even if blocking is notionally enabled).RealDuckPlayer moves the new-install ad-blocking rollout
combine()collector frominittoMainProcessLifecycleObserver.onCreate, with test updates to trigger lifecycle explicitly.Reviewed by Cursor Bugbot for commit a655a3a. Bugbot is set up for automated code reviews on this repo. Configure here.