You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SERP Settings Sync: Add event when Duck Ai setting changed (#7052)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1207908166761516/task/1211756086814103?focus=true
### Description
Added support for sending subscription events to ContentScopeScripts.
This enables real-time updates to the SERP settings when DuckChat
settings change. The implementation includes:
- Created a new `ContentScopeScriptsSubscriptionEventPlugin` interface
to allow features to provide subscription event data
- Added a plugin point for subscription event plugins
- Implemented a DuckChat-specific plugin that sends the enabled state to
Content Scope Scripts
- Added subscription event channels and flows in both
BrowserTabViewModel and SettingsWebViewViewModel
- Set up observers in BrowserTabFragment and SettingsWebViewActivity to
send events to Content Scope Scripts
### Steps to test this PR
_DuckChat Settings Sync_ _from_ _Browser_
- [x] Enable `serpSettingsSync` feature toggle
- [x] Do a search e.g. "FPL"
- [x] Open Settings -> AI Features
- [x] Disable/enable Duck.AI
- [x] Navigate back to SERP
- [x] Verify that the subscription event is sent to Content Scope
Scripts (check logs for "SERP-Settings: Sending subscription event
data") with the correct state
- [x] Open Settings -> AI Features
- [x] Disable/enable Duck.AI
- [x] Verify that the subscription event is sent to Content Scope
Scripts (check logs for "SERP-Settings: Sending subscription event
data") with the correct state
_DuckChat Settings Sync_ _from_ _SettingsWebView_
- [x] Enable `serpSettingsSync` feature toggle
- [x] Open Settings -> AI Features
- [x] Note the current state of Duck.AI
- [x] Click "Search Assist Settings"
- [x] Press back
- [x] Verify that the subscription event is sent to Content Scope
Scripts (check logs for "SERP-Settings: Sending subscription event
data") with the correct state
- [x] Disable/enable Duck.AI
- [x] Click "Search Assist Settings"
- [x] Press back
- [x] Verify that the subscription event is sent to Content Scope
Scripts (check logs for "SERP-Settings: Sending subscription event
data") with the correct state
### UI changes
N/A
0 commit comments