Skip to content

fix(usage): drop the app-wide quota banner on the usage dashboard - #8512

Open
talissoncosta wants to merge 1 commit into
mainfrom
fix/usage-duplicate-quota-banner
Open

talissoncosta wants to merge 1 commit into
mainfrom
fix/usage-duplicate-quota-banner

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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

Contributes to #8183

OrganisationLimit renders app-wide from App, so on the new usage dashboard it sat directly above the page's own over-limit banner, both saying the organisation is over its quota. The app-wide one cannot tell whether overage charges actually apply, so it hedges with "automated billing for the overages may apply"; the page can be specific. The page keeps its banner, the app-wide one is hidden there.

Only where the new dashboard renders, so the legacy usage page is untouched.

isOrganisationUsage joins isAllowedWhileBlocked in web/routePaths, which exists so a component can match a path without importing web/routes, which imports App.

This is what we would like to prevent:

image

How did you test this code?

web/__tests__/routePaths.test.ts covers the new matcher, including that a path nested under the usage page does not match.

By hand against a local API: on the usage dashboard with the organisation over its limit, only the page's banner shows; off the usage route it still appears; with usage_dashboard off the legacy page still shows it.

The dashboard carries its own over-limit banner, so both appeared, one
under the other, saying the same thing. The app-wide one cannot reach
the detail the page has, so the page keeps its own.

Only hidden where the new dashboard renders, so the legacy usage page
keeps the banner it has always had.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 11, 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 Sep 11, 2026 8:17pm UTC
flagsmith-frontend-staging Ready Ready Preview Sep 11, 2026 8:17pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Sep 11, 2026 8:17pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview 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: 32d6fb5b-fda5-4e72-b4d2-569e5db83a29

📥 Commits

Reviewing files that changed from the base of the PR and between 787c927 and c49cbc1.

📒 Files selected for processing (3)
  • frontend/web/__tests__/routePaths.test.ts
  • frontend/web/components/App.js
  • frontend/web/routePaths.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds exact route matching and exports isOrganisationUsage. It tests the organisation usage route against matching and non-matching paths. App checks this route and the usage_dashboard feature flag. When both conditions are true, OrganisationLimit is not rendered.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c49cb

The change is narrowly scoped to route matching and duplicate banner suppression, with no unresolved merge-blocking risk identified.


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.

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Sep 11, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review September 11, 2026 20:17
@talissoncosta
talissoncosta requested a review from a team as a code owner September 11, 2026 20:17
@talissoncosta
talissoncosta requested review from Zaimwa9 and kyle-ssg and removed request for a team and kyle-ssg September 11, 2026 20:17
@github-actions github-actions Bot added fix and removed fix labels Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added the fix label Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  c49cbc1
info  🔄 Run: #20402 (attempt 1)

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

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  38.3 seconds
commit  c49cbc1
info  🔄 Run: #20402 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.8 seconds
commit  c49cbc1
info  🔄 Run: #20402 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.6 seconds
commit  c49cbc1
info  🔄 Run: #20402 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

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

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant