Skip to content

refactor: Prevent duplicate features list GETS#6927

Open
kyle-ssg wants to merge 4 commits intomainfrom
refactor/feature-fetching
Open

refactor: Prevent duplicate features list GETS#6927
kyle-ssg wants to merge 4 commits intomainfrom
refactor/feature-fetching

Conversation

@kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Mar 11, 2026

…een environments

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Uses RTK cache for feature list to reduce latency, long term solution will be to migrate fully away from the flux store but in the meantime this is a win.

Left = After (1 request instead of multiple)

image

Also adds loading indication between environment where we treat switching environment + fetching = loading

image

How did you test this code?

  • Filtering features in production
  • E2E covers a lot

@kyle-ssg kyle-ssg requested a review from a team as a code owner March 11, 2026 16:10
@kyle-ssg kyle-ssg requested review from Zaimwa9 and removed request for a team March 11, 2026 16:10
@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Mar 11, 2026 4:43pm
flagsmith-frontend-staging Ready Ready Preview, Comment Mar 11, 2026 4:43pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Mar 11, 2026 4:43pm

Request Review

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard refactor labels Mar 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6927 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-6927 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6927 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6927 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6927 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-6927 Finished ✅ Results

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

failed  7 failed

Details

stats  7 tests across 4 suites
duration  24.3 seconds
commit  fbe48f9
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15245 (attempt 1)

Failed tests

firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can be created, toggled, edited, and deleted across environments @oss
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can have tags added and be archived @oss
firefox › tests/initialise-tests.pw.ts › Signup › Create Organisation and Project @oss
firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss
firefox › tests/segment-test.pw.ts › Segment test 3 - Test user-specific feature overrides @oss
firefox › tests/versioning-tests.pw.ts › Versioning tests - Create, edit, and compare feature versions @oss

### Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  12 failed

Details

stats  12 tests across 9 suites
duration  30.1 seconds
commit  fbe48f9
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15245 (attempt 1)

Failed tests

firefox › tests/change-request-test.pw.ts › Change Request Tests › Change requests can be created, approved, and published with 4-eyes approval @enterprise
firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can be created, toggled, edited, and deleted across environments @oss
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can have tags added and be archived @oss
firefox › tests/initialise-tests.pw.ts › Signup › Create Organisation and Project @oss
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise
firefox › tests/project-test.pw.ts › Project Tests › Additional Projects can be created and renamed with configurable change request approvals @enterprise
firefox › tests/roles-test.pw.ts › Roles Tests › Roles can be created with project and environment permissions @enterprise
firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss
firefox › tests/segment-test.pw.ts › Segment test 3 - Test user-specific feature overrides @oss
firefox › tests/versioning-tests.pw.ts › Versioning tests - Create, edit, and compare feature versions @oss

### Playwright Test Results (oss - depot-ubuntu-latest-16)

failed  7 failed

Details

stats  7 tests across 4 suites
duration  24.2 seconds
commit  ca2e762
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15247 (attempt 1)

Failed tests

firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can be created, toggled, edited, and deleted across environments @oss
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can have tags added and be archived @oss
firefox › tests/initialise-tests.pw.ts › Signup › Create Organisation and Project @oss
firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss
firefox › tests/segment-test.pw.ts › Segment test 3 - Test user-specific feature overrides @oss
firefox › tests/versioning-tests.pw.ts › Versioning tests - Create, edit, and compare feature versions @oss

### Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  12 failed

Details

stats  12 tests across 9 suites
duration  30 seconds
commit  ca2e762
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15247 (attempt 1)

Failed tests

firefox › tests/change-request-test.pw.ts › Change Request Tests › Change requests can be created, approved, and published with 4-eyes approval @enterprise
firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can be created, toggled, edited, and deleted across environments @oss
firefox › tests/flag-tests.pw.ts › Flag Tests › Feature flags can have tags added and be archived @oss
firefox › tests/initialise-tests.pw.ts › Signup › Create Organisation and Project @oss
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise
firefox › tests/project-test.pw.ts › Project Tests › Additional Projects can be created and renamed with configurable change request approvals @enterprise
firefox › tests/roles-test.pw.ts › Roles Tests › Roles can be created with project and environment permissions @enterprise
firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss
firefox › tests/segment-test.pw.ts › Segment test 3 - Test user-specific feature overrides @oss
firefox › tests/versioning-tests.pw.ts › Versioning tests - Create, edit, and compare feature versions @oss

### Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

failed  2 failed

Details

stats  2 tests across 1 suite
duration  52.8 seconds
commit  6d2ffcb
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15248 (attempt 1)

Failed tests

firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss

### Playwright Test Results (oss - depot-ubuntu-latest-16)

failed  2 failed

Details

stats  2 tests across 1 suite
duration  34.5 seconds
commit  6d2ffcb
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15248 (attempt 1)

Failed tests

firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss

### Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  2 failed

Details

stats  2 tests across 1 suite
duration  49.7 seconds
commit  6d2ffcb
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15248 (attempt 1)

Failed tests

firefox › tests/segment-test.pw.ts › Segment test 1 - Create, update, and manage segments with multivariate flags @oss
firefox › tests/segment-test.pw.ts › Segment test 2 - Test segment priority and overrides @oss

### Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  43.6 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  28.9 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  1 minute, 8 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 3 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  29.7 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 2)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  43.1 seconds
commit  f2431ae
info  🔄 Run: #15249 (attempt 2)

@talissoncosta
Copy link
Contributor

talissoncosta commented Mar 12, 2026

Hey @kyle-ssg , great work!!

I found a pre-existing bug while testing this PR (also reproduces on main):

Bug: Typing only whitespace (e.g. a space) in the search or value search filter sends search=%20 to the API, which returns a 400 "This field may not be blank.". On main, this also triggers a hard redirect to /404?entity=environment because the Flux store's catch block treats any error as a permission issue.

I've opened #6934 on top of your branch to fix it — it trims search values at the source in useFeatureFilters so whitespace-only input never triggers a state change or API request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants