-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
revert: remove feature-flags to user traits tracking (PR #24178) #24317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts the changes from PR #24178 that added automatic tracking of remote feature flags to user traits via addTraitsToUser. Reverted changes: - Removed useEffect hook that called addTraitsToUser with rawFeatureFlags - Removed useMetrics import and addTraitsToUser usage - Removed related unit tests for feature flag user traits tracking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reverts the automatic tracking of remote feature flags to user traits that was introduced in PR #24178. The revert removes the feature flag tracking functionality while preserving all core feature flag override APIs and processing logic.
- Removes automatic user trait tracking when feature flags are loaded or changed
- Eliminates the
useMetricshook dependency from the FeatureFlagOverrideContext - Removes all associated unit tests for the reverted feature flag tracking functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/contexts/FeatureFlagOverrideContext.tsx | Removed useEffect import, useMetrics hook, and the effect that automatically tracked feature flags to user traits |
| app/contexts/FeatureFlagOverrideContext.test.tsx | Removed useMetrics mock setup and all test cases covering the automatic feature flag tracking functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once the lint error is fixed
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes remove analytics tracking functionality from the FeatureFlagOverrideContext. Specifically, the code that was calling This is a clean removal of analytics-related code:
Since this change only affects analytics tracking and doesn't modify any user-facing features or core wallet functionality, the risk is low. The SmokeAnalytics tag is selected to verify that analytics functionality still works correctly after this change, as the removal of this tracking code could potentially affect analytics data collection patterns. |
|



Description
This reverts the changes from PR #24178 that added automatic tracking of remote feature flags to user traits via addTraitsToUser.
Automatic Github revert not available for this PR.
Reverted changes:
Related
Reverts #24178
Changelog
CHANGELOG entry: null
Related issues
Reverts #24178
Manual testing steps
Identify calls should be sent to Segment server again.
Screenshots/Recordings
NA
Before
NA
After
NA
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Reverts automatic syncing of remote feature flags to user traits.
useMetricsimport and theuseEffectthat calledaddTraitsToUser(rawFeatureFlags)inFeatureFlagOverrideContext.tsxFeatureFlagOverrideContext.test.tsxfor bulk/add-on-change trait updatesWritten by Cursor Bugbot for commit 27ec9cd. This will update automatically on new commits. Configure here.