feat(fe): flag-driven warehouse plan gating for free orgs - #8379
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe utility module retains Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The PR makes warehouse access UI-gating configurable for free organizations. Merge readiness is currently moderate because the changed helper may fail strict TypeScript checks, the import path violates frontend conventions, a conversion edge-case concern remains open, and server-side enforcement for the newly relaxed entitlement has not been confirmed. 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. Comment |
Docker builds report
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cbbef2c3-7424-44bb-86ca-10eb85f417d6
📒 Files selected for processing (1)
frontend/common/utils/utils.tsx
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19862 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #19862 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19862 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19862 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19834 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19834 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19834 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19834 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Skipped testsfirefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss ✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19793 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19793 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19793 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19793 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
|
@themis-blindfold review |
⚖️ Themis review: 🟠 Fix before mergeThe free-plan warehouse rollout is not covered by a direct regression test, and the unrelated inlined feature-state converter regresses its established input contract. Completed lint, unit, build, E2E, and CodeQL checks passed, but they did not catch either path.
🟠 Majors
📝 Walkthrough
🧪 How to verify
Automate: Add table-driven utility tests for both configuration shapes and each plan tier. Product take: This is a solid controlled rollout for experimentation access on free organisations. The converter regression risks unrelated feature-value rendering, so it should be corrected before that rollout lands. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. Free-tier access deserves a free pass; value conversion does not · reviewed at 94055b1 |
talissoncosta
left a comment
There was a problem hiding this comment.
One question before approving it.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/common/utils/utils.tsx (2)
64-64: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMake
planHierarchynon-nullable.
planHierarchyis typed asPlan[], andPlanincludesnull.allowedPlansis astring[], soallowedPlans.includes(p)causes a TypeScript error withstrict: true.Use
Exclude<Plan, null>[]or define a separate non-null plan type.
24-24: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winUse the
common/alias for this import.This frontend file must not use a relative import. Replace
./featureStateToValuewithcommon/utils/featureStateToValue.As per coding guidelines, frontend files must use only
common/,components/, andproject/import paths.Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 16a1a1e5-7bcc-4f03-a7e8-079e3c1022df
📒 Files selected for processing (1)
frontend/common/utils/utils.tsx
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
docs/if required so people know about the feature.Changes
Makes warehouse plan gating flag-driven so free orgs can access experimentation when enabled.
getPlanPermissionchecksgetRequiredPlanbefore the free-plan bail-out — if a feature resolves to'free', all plans pass. No regression risk: every other feature returns a hardcoded plan string that is never'free'.getRequiredPlan('WAREHOUSE')supports both the legacy array format and a new object format ({ allowed_plans: [...] }).Plantype andplanHierarchyinclude'free'.Companion API PR: #8377
Flag configuration
Set the
experimentation_warehouse_connectionsegment override value to:{"allowed_plans": ["free"]}Or use the legacy array format:
["free"].Revert by removing
"free"from the array — warehouse reverts to enterprise-only plan gate. No code deploy needed.How did you test this code?
getPlanPermissioncallers: every other feature returns a hardcoded plan string, so the new'free'early-return never fires for them.