Skip to content

Conversation

@mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Nov 20, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207908166761516/task/1211978534005008?focus=true

Description

This pull request refactors feature flag usage across the browser and DuckChat modules by replacing references to SettingsPageFeature with the new SerpSettingsFeature interface, and introduces a new toggle for controlling the visibility of the "Hide AI Generated Images" option in DuckChat settings.

Feature flag refactoring:

  • Replaced all usages of SettingsPageFeature with SerpSettingsFeature in BrowserTabViewModel, DuckDuckGoRequestRewriter, dependency injection (BrowserModule), and related test files to standardize feature flag handling for SERP settings.
  • Updated constructor parameters and usages in affected classes and test setups to use SerpSettingsFeature instead of SettingsPageFeature.
  • Modified logic to use storeSerpSettings() from SerpSettingsFeature in place of serpSettingsSync() from SettingsPageFeature for feature checks.

DuckChat settings improvements:

  • Added a new toggle showHideAiGeneratedImages() to DuckChatFeature to control visibility of the "Hide AI Generated Images" option in AI Features Settings. Updated DuckChatSettingsViewModel to use this toggle for UI logic and navigation.

Test updates:

  • Updated all affected unit tests to use SerpSettingsFeature for feature flag mocking and assertions, ensuring consistency and coverage for the new interface and toggle.

Steps to test this PR

Hide AI Generated Images Toggle

  • Enable showHideAiGeneratedImages feature toggle
  • Open Settings -> AI Features
  • Check AI-Generated Images option is visible
  • Click it
  • SERP Settings should open
  • Disable showHideAiGeneratedImages feature toggle
  • Open Settings -> AI Features
  • Check AI-Generated Images option is NOT visible

storeSerpSettings Toggle

  • Clear data and launch app
  • Enable storeSerpSettings feature toggle
  • Navigate to "Duck AI Testing url" listed here
  • Do a search e.g. "FPL"
  • Filter logs for "SERP-SETTINGS"
  • Check IsNativeDuckAiEnabledHandler has fired
  • Open Settings
  • Press back
  • In the logs SubscriptionEventData should be sent
  • Click SERP settings cog
  • Click "Manage" by "AI Features"
  • Click "Open Duck.ai Settings"
  • Check logs for "OpenNativeSettingsHandler" and native AI Features screen should open
  • Navigate to "SERP Settings Testing URL"
  • Do a search e.g. "FPL"
  • Check GetNativeSettingsHandler fires
  • Check UpdateNativeSettingsHandler fires

UI changes

N/A

Copy link
Contributor Author

mikescamell commented Nov 20, 2025

Base automatically changed from feature/mike/serp-settings-sync/hide-duck-ai-serp-setting to develop November 20, 2025 12:55
@mikescamell mikescamell force-pushed the feature/mike/serp-settings-sync/update-feature-flag-names branch from 404a3ee to 7153a78 Compare November 20, 2025 13:06
@mikescamell mikescamell marked this pull request as ready for review November 20, 2025 13:08
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

LGTM

@mikescamell mikescamell merged commit b5302d5 into develop Nov 20, 2025
14 checks passed
@mikescamell mikescamell deleted the feature/mike/serp-settings-sync/update-feature-flag-names branch November 20, 2025 14:56
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