Add a UI and API to manage traffic limit exceptions
What?
- Add a
traffic_limit_exceptionstable (db/init.sqland the api test schema) - Add a service layer (
list/create/update/delete/toggle) and point the existingfetchActiveTrafficLimitExceptionsat 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/disableexceptions, restricted to thegrowthbook-admingroup viaisAuthorized - 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-adminmembers - 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-admingroup 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:
- Builds on the traffic limit exception service (T432309, MR !373 (merged)) and the growthbook-admin access control (T432310, MR !374 (merged)). This MR should land after both.
- Also implements the backend described in T432305.
Testing Instructions:
- Ensure that the
traffic_limit_exceptionstable 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


