Remove ai_feature feature flag and ungate search recommendations#5695
Merged
bjester merged 5 commits intolearningequality:hotfixesfrom Feb 11, 2026
Merged
Remove ai_feature feature flag and ungate search recommendations#5695bjester merged 5 commits intolearningequality:hotfixesfrom
bjester merged 5 commits intolearningequality:hotfixesfrom
Conversation
Remove the ai_feature property from the feature flags JSON schema, ungating the AI recommendations feature. Add test verifying ai_feature is rejected as an unknown property. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete the IsAIFeatureEnabledForUser permission class from user.py and remove its import/usage from recommendation.py. The recommendations endpoint now only requires authentication, making AI recommendations available to all authenticated users. Add test verifying non-admin users can access the recommendations endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ommendations UI Remove the isAIFeatureEnabled Vuex getter from the session module and remove the FeatureFlagKeys import that was only used by it. Remove the feature flag check from SearchOrBrowseWindow.vue's shouldShowRecommendations computed property, making recommendations available to all users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
👋 Thanks for contributing! We will assign a reviewer within the next two weeks. In the meantime, please ensure that:
We'll be in touch! 😊 |
bjester
requested changes
Feb 10, 2026
Member
bjester
left a comment
There was a problem hiding this comment.
Since we're effectively purging the flag from the codebase, I see little value in the tests that assert it's gone.
contentcuration/contentcuration/frontend/shared/vuex/session/index.spec.js
Outdated
Show resolved
Hide resolved
|
|
||
| self.assertEqual(response.status_code, 200, response.content) | ||
| self.assertEqual(response.json(), self.recommendations_list) | ||
|
|
Author
There was a problem hiding this comment.
Acknowledged, keeping this test as-is.
Author
|
Thanks for the review, taking a look now. |
Since the flag is being purged entirely, tests that assert it's gone add no value — the existing `test_validate__nonexistent` already covers unknown flags being rejected by the schema validator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Closes #5691
ai_featurefeature flag fromfeature_flags.json, theIsAIFeatureEnabledForUserpermission class from the backend, and theisAIFeatureEnabledVuex getter and its usage from the frontendhasFeatureEnabled,FeatureFlagKeys, other flags) remains intactChanges
ai_featureentry fromfeature_flags.jsonIsAIFeatureEnabledForUserpermission class fromviewsets/user.pyand its import/usage inviewsets/recommendation.py—RecommendationViewnow only requiresIsAuthenticatedisAIFeatureEnabledgetter from session Vuex module and the feature flag guard inSearchOrBrowseWindow.vue'sshouldShowRecommendationscomputed propertyisAIFeatureEnabledreferences; added Python tests assertingai_featureis now rejected by the schema validator and that unauthenticated users are denied access to the recommendations endpointTest plan
session/index.spec.js,SearchOrBrowseWindow.spec.js)test_feature_flags.py)🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com