Add link to experiments running in GrowthBook on list/catalog view
What?
During the interim transition period (and after when GrowthBook will be the only experiment source), the TKUI catalog renders a link to experiments configured in GrowthBook.
- New
GET /growthbook-experiments-summaryendpoint returns { enabled, count, url } whether GrowthBook is an enabled source (include_gb=true), how many GB experiments are currently running, and the environment-specific GrowthBook UI URL (staging TKUI links to staging GB, production TKUI links to production GB). -
countGrowthBookExperiments()counts only running GB-source rows inexperiments_cachedetermined by the cached date window rather than GrowthBook'sisActiveflag which can go stale when an experiment leaves the GB API. -
ui_urladded to the growthbook config block in config.dev/prod.yaml. -
List.vuerenders the link whenever GrowthBook is enabled and a URL is configured. The summary fetch runs in parallel with the registered- experiments fetch and upon failure, the link remains hidden without blocking the list.
Why?
Because we are no longer including read-only GB-sourced experiments in the TK frontend, we are instead providing a link from the TKUI frontend to the GB UI for viewing GB-originated experiments.
Notes:
- The rendering of the GrowthBook experiments link is gated behind
include_gb=true so while we have yet to include GB as a source, this MR should be safe to merge on production. It will render the link if GB is included as a source and if there are any actively running experiments in GB. - The new config variables should be included in the Kubernetes helm charts and values added accordingly per staging and production environments.
Testing Instructions
- Make sure
include_gb=truein config.local.yaml - View the new link header on the list/catalog view:
- Test that the link doesn't show up if
include_gb=falsein config.local.yaml - Verify that the new link header to GB UI is not visible and the normal list/catalog view renders
Bug: T426464
