Add a UI and API to manage traffic limit exceptions

What?

  • Add a traffic_limit_exceptions table (db/init.sql and the api test schema)
  • Add a service layer (list/create/update/delete/toggle) and point the existing fetchActiveTrafficLimitExceptions at it so active exceptions are read from the database and applied to experiment responses (it keeps an in-memory fallback for unit tests)
  • Add a controller and routes to register/list/update/delete/disable exceptions, restricted to the growthbook-admin group via isAuthorized
  • Add a Pinia store, three admin-only routes, a list view and a register/edit form, and an account-menu entry ("Access admin dashboard") shown only to growthbook-admin members
  • Cover the database exception lookup and the CRUD endpoints with unit and api tests

Why?

  • Non-cache-splitting experiments are capped hard at the edge, and some approved experiments need to run above those caps. This adds the admin UI and API to grant, list, edit and disable those per-experiment exceptions.
  • Saving an exception activates it and the growthbook-admin group only has access to both the UI and the endpoints. The category presets (editing 25%, account-creation 50%) prefill the traffic value while "other" allows a custom amount.

Notes:

Testing Instructions:

  • Ensure that the traffic_limit_exceptions table exists in your local dev environment by destroying previous docker container and running "make run-dev" fresh
  • Clear the stale auth and reload with the following in DevTools on your local TKUI instance:
localStorage.removeItem('userAuth'); location.reload();
  • Confirm the role is set with:
JSON.parse(localStorage.getItem('userAuth'))   // should show roles: ['growthbook-admin']
  • Create a new experiment in the staging GrowthBook instance and start the experiment making sure it passes validation
  • Navigate to http://localhost/traffic-limit-exceptions
  • Fill out a new exception using the newly created GrowthBook experiment link
  • Verify that the experiment shows up in the TKUI endpoint with the overridden traffic sample rate

Screenshot_2026-07-27_at_2.29.56_PM

Screenshot_2026-07-27_at_3.00.06_PM

Screenshot_2026-07-27_at_2.37.28_PM

Assisted-by: Claude Opus 4.8
Bug: T432304
Bug: T432305

Edited by Clare Ming

Merge request reports

Loading