Merged
Conversation
|
Cursor Agent can help with this pull request. Just |
✅ Deploy Preview for content-scope-scripts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Temporary Branch UpdateThe temporary branch has been updated with the latest changes. Below are the details:
Please use the above install command to update to the latest version. |
Contributor
[Beta] Generated file diffTime updated: Fri, 16 Jan 2026 12:02:33 GMT Android
File has changed Apple
File has changed Chrome-mv3File has changed FirefoxFile has changed IntegrationFile has changed WindowsFile has changed |
This change introduces a new `isStateEnabled` utility function to correctly handle feature states like 'internal' and 'preview' based on platform flags. It also updates the `computeEnabledFeatures` and `getFeatureSettingEnabled` methods to utilize this new function, ensuring features are enabled or disabled according to the platform's capabilities. The unit tests have been updated to reflect these changes and add new test cases for the `isStateEnabled` function. Co-authored-by: jkingston <jkingston@duckduckgo.com>
f905ebd to
4cae275
Compare
aataraxiaa
approved these changes
Jan 16, 2026
aataraxiaa
left a comment
There was a problem hiding this comment.
Tested using duckduckgo/privacy-configuration#4355.
LGTM @jonathanKingston
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.
Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1201614831475344/task/1212720272153009?focus=true
Description
Adds support for
internalandpreviewas valid feature states, allowing features to be conditionally enabled based onplatform.internalandplatform.previewflags. This extends feature gating capabilities beyond simpleenabled/disabledstates.Testing Steps
isStateEnabledlogic and feature enablement forinternalandpreviewstates.state: 'internal'and confirm it's enabled whenplatform.internalis true, and disabled otherwise.state: 'preview'and confirm it's enabled whenplatform.previewis true, and disabled otherwise.Checklist
Please tick all that apply:
Note
Introduces platform-gated feature states and updates enablement to depend on platform flags rather than only version.
FeatureStatetypedef andisStateEnabled(state, platform)to gateenabled/disabled/internal/previewcomputeEnabledFeaturesto acceptplatform(not just version), useisStateEnabled, and still honorminSupportedVersionand exceptionsprocessConfigandConfigFeatureconstructor to passplatformtocomputeEnabledFeaturesConfigFeature.getFeatureSettingEnabledto useisStateEnabledfor both string and object settingspreview/internalgating andisStateEnabledbehaviorWritten by Cursor Bugbot for commit 4cae275. This will update automatically on new commits. Configure here.