Skip to content

feat(experimentation): hide experimentation UI when the experimentation infra isn't deployed - #8749

Merged
gagantrivedi merged 3 commits into
mainfrom
feat/frontend-experimentation-enabled
Oct 13, 2026
Merged

gagantrivedi merged 3 commits into
mainfrom
feat/frontend-experimentation-enabled

Conversation

@gagantrivedi

@gagantrivedi gagantrivedi commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

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

Experimentation UI shows whenever its flag is on, even on installs without the experimentation infra.

  • Add a useHasExperimentationFeature(flag) hook: the flag and experimentation_enabled from /version/ must both be on. Pages wait for /version/ before redirecting.
  • Use it for every experimental_flags and experimentation_warehouse_connection gate.

Merge after #8747 is deployed, otherwise SaaS loses the experimentation UI.

How did you test this code?

New useHasExperimentationFeature unit tests and updated useFeatureExperimentFreeze tests; lint passes on changed files.

@gagantrivedi
gagantrivedi requested a review from a team as a code owner October 13, 2026 08:27
@gagantrivedi
gagantrivedi requested review from talissoncosta and removed request for a team October 13, 2026 08:27
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Oct 13, 2026 9:41am UTC
flagsmith-frontend-staging Ready Ready Preview Oct 13, 2026 9:41am UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 13, 2026 9:41am UTC

Request Review

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added the feature New feature or request label Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8c1b8799-2862-41a7-a470-93ced12f4e4f
📥 Commits

Reviewing files that changed from the base of the PR and between 47b9a64 and 2c1f688.

📒 Files selected for processing (2)
  • frontend/common/hooks/__tests__/useFeatureExperimentFreeze.test.ts
  • frontend/common/hooks/useFeatureExperimentFreeze.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The change adds experimentation_enabled to the backend version type and introduces a hook that combines backend support with a feature flag. Experimentation hooks and pages use this hook to control query execution, loading, and redirects. The feature value tab, environment navigation, and environment settings also use it to control existing UI conditions.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to 2c1f6

Experimentation pages and settings remain unavailable until the backend reports support. Confirm that #8747 is deployed before merging; otherwise SaaS may lose the experimentation UI.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 17fb4e27-e64d-4af4-b3e5-fa897ffb18d1
📥 Commits

Reviewing files that changed from the base of the PR and between c092cd6 and 89e2f81.

📒 Files selected for processing (9)
  • frontend/common/hooks/__tests__/useFeatureExperimentFreeze.test.ts
  • frontend/common/hooks/useFeatureExperimentFreeze.ts
  • frontend/common/types/responses.ts
  • frontend/common/utils/utils.tsx
  • frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx
  • frontend/web/components/navigation/navbars/EnvironmentNavbar.tsx
  • frontend/web/components/pages/ExperimentDetailPage.tsx
  • frontend/web/components/pages/ExperimentsPage.tsx
  • frontend/web/components/pages/environment-settings/EnvironmentSettingsPage.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Comment thread frontend/common/utils/utils.tsx Outdated
Comment thread frontend/web/components/pages/ExperimentsPage.tsx Outdated
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #21891 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.2 seconds
commit  2c1f688
info  🔄 Run: #21891 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #21891 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  49.4 seconds
commit  2c1f688
info  🔄 Run: #21891 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #21891 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.9 seconds
commit  2c1f688
info  🔄 Run: #21891 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #21891 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  32.1 seconds
commit  2c1f688
info  🔄 Run: #21891 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #21844 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  47.9 seconds
commit  47b9a64
info  🔄 Run: #21844 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #21844 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  36.3 seconds
commit  47b9a64
info  🔄 Run: #21844 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #21844 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.8 seconds
commit  47b9a64
info  🔄 Run: #21844 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #21844 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.5 seconds
commit  47b9a64
info  🔄 Run: #21844 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #21842 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  54.9 seconds
commit  89e2f81
info  🔄 Run: #21842 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #21842 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  36 seconds
commit  89e2f81
info  🔄 Run: #21842 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #21842 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.3 seconds
commit  89e2f81
info  🔄 Run: #21842 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #21842 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  3.4 seconds
commit  89e2f81
info  🔄 Run: #21842 (attempt 1)

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

20 screenshots compared. See report for details.
View full report

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 087b9dc8-f4a8-4884-b4b3-e75be10704c3
📥 Commits

Reviewing files that changed from the base of the PR and between 89e2f81 and 47b9a64.

📒 Files selected for processing (9)
  • frontend/common/hooks/__tests__/useFeatureExperimentFreeze.test.ts
  • frontend/common/hooks/__tests__/useHasExperimentationFeature.test.ts
  • frontend/common/hooks/useFeatureExperimentFreeze.ts
  • frontend/common/hooks/useHasExperimentationFeature.ts
  • frontend/web/components/modals/create-feature/tabs/FeatureValueTab.tsx
  • frontend/web/components/navigation/navbars/EnvironmentNavbar.tsx
  • frontend/web/components/pages/ExperimentDetailPage.tsx
  • frontend/web/components/pages/ExperimentsPage.tsx
  • frontend/web/components/pages/environment-settings/EnvironmentSettingsPage.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Comment thread frontend/common/hooks/useFeatureExperimentFreeze.ts Outdated

@Zaimwa9 Zaimwa9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gagantrivedi
gagantrivedi merged commit bb9cd36 into main Oct 13, 2026
30 checks passed
@gagantrivedi
gagantrivedi deleted the feat/frontend-experimentation-enabled branch October 13, 2026 09:51

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-preview — 2c1f688a Deployed Oct 13, 2026 by vercel[bot]
Preview – flagsmith-frontend-staging — 2c1f688a Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants