-
Notifications
You must be signed in to change notification settings - Fork 466
refactor: restore FeaturesPage RTK Query migration with MV and CR fixes #6469
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
base: main
Are you sure you want to change the base?
Conversation
…igration…" This reverts commit cc85eea.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Pass current search term, sort order, page number, and filter parameters to AppActions.getFeatures to keep FeatureListStore in sync with RTK Query. This fixes a crash when editing features found via search or on pages beyond page 1, where the store would be missing the feature being edited. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Import PAGE_SIZE from useProjectFlag service to ensure consistent pagination size between RTK Query and Flux store implementations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6469 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 1294 1294
Lines 46535 46537 +2
=======================================
+ Hits 45637 45639 +2
Misses 898 898 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0926c8f to
f7540cc
Compare
…ironment states Build multivariate_feature_state_values from multivariate_options when transforming the feature list response. The API expects the format with multivariate_feature_option ID and percentage_allocation, which is now properly derived from the default_percentage_allocation of each option. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f7540cc to
459f824
Compare
4270d2a to
459f824
Compare
Co-authored-by: Talisson Costa <talisson.odcosta@gmail.com>
Prevent rapid toggling race condition and provide visual feedback when toggling a feature flag. The row now shows reduced opacity and blocks interactions while the toggle operation is in progress. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply the same row-level loading state (opacity + disabled) when
removing a feature. Add key={projectFlag.id} to ensure React properly
unmounts deleted rows instead of reusing them for adjacent items.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace useOptimisticToggle with useFeatureRowState that handles both toggle and remove loading states. This simplifies FeatureRow by moving all row-level state management into a single, well-documented hook. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace Utils.mapMvOptionsToStateValues() with direct mapping that prioritizes user-entered weights (default_percentage_allocation) over existing environment values. The utility function was using nullish coalescing (??) which doesn't fall back when existing value is 0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The mapMvOptionsToStateValues function was using mvOption.id to look up existing multivariate_feature_state_values, but for segment overrides the structure is different: - mvOption.id = feature state value ID (e.g., 28716) - mvOption.multivariate_feature_option = actual MV option ID (e.g., 10102) The lookup was failing because existingMvFeatureStateValues uses multivariate_feature_option (10102) not the feature state ID (28716). This fix: 1. Uses mvOption.multivariate_feature_option when available for lookups 2. Falls back to mvOption.id for backward compatibility 3. Also prioritizes mvOption.percentage_allocation over existing values 4. Fixes feature_segment check in getFeatureStateCrud to properly detect value-only feature states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add useViewMode hook that updates React state immediately for instant feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The route context doesn't have organisationId since the FeaturesPage route doesn't include :organisationId param. Use project.organisation from RTK Query instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
QA PlanList view (compact and normal views)
In modal
All of the above for (a feature on page 1 / a feature on page 3 -- broken)
for CR => new states are reflected when committed |
Summary
Restores the FeaturesPage RTK Query migration with critical bug fixes for multivariate features and change requests.
Changes
multivariate_feature_state_valuesin PATCH payloadidfield to MV optionsmapMvOptionsToStateValuesTest Plan
Automated (E2E)
Manual Testing - P0 Critical (Bugs Fixed in This PR)
Manual Testing - P1 Core Feature CRUD
Manual Testing - P2 Filtering & Navigation
Manual Testing - P3 Advanced Features
Manual Testing - P4 Environment-Specific
Manual Testing - P5 Project Settings
Manual Testing - P6 Edge Cases
Related Issues