feat(experiments): add experiment detail page with exposures panel#7811
Conversation
Introduce the experiment detail page accessible from the experiments list. Includes the detail header with inline-editable hypothesis, experiment configuration section, and the full exposures panel with polling, refresh, and cumulative enrolment chart.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
…vert - Restore HomePage optional chaining (accidental revert of #7788) - Remove unused VariantShareLegend component - Strip results.scss to PR1-only classes - Use getPrimaryMetric helper instead of experiment.metrics[0] - Remove unused _status param from deriveExposuresViewState - Remove dead getRefreshPollInterval export and its tests
|
@gemini-code-assist review |
talissoncosta
left a comment
There was a problem hiding this comment.
Looks pretty good @Zaimwa9 !
Just a few suggestions.
…idation - Fix polling not starting after refresh when data already exists - Add 2-minute poll timeout to prevent infinite polling - Handle 429 throttle gracefully: extract Retry-After header, show countdown instead of error toast, disable button during cooldown - Invalidate individual experiment cache on start/pause/complete mutations so the detail page updates immediately - Hide exposures section when experiment is in draft status
Use queryFn to access response headers from fetchBaseQuery, extract the Retry-After value on 429 responses, and pass it through the error object so the exposures panel shows an accurate countdown. Requires CORS_EXPOSE_HEADERS on the backend (PR #7832).
- Replace alert banner with inline error text below As Of label - Use selectable-card__tag for feature flag chip (fixes Bootstrap yellow) - Replace header SCSS blocks with utility classes - Add optional chaining guard on multivariate_options - Make experiment rows always clickable - Disable Start button with tooltip when no metric attached
talissoncosta
left a comment
There was a problem hiding this comment.
Thanks for addressing the feedbacks, looks great!
docs/if required so people know about the feature.Changes
Adds the experiment detail page, the landing view when clicking an experiment row from the list.
Page shell & routing
/project/:projectId/environment/:environmentId/experiments/:experimentIdgated behindexperimental_flagsDetail header
VariationKeyLabel), with an immediate PATCH on confirm via the newupdateExperimentmutationConfiguration section
Exposures panel
LineChartcomponent (added an optionalheightprop)exposuresViewState.ts) handling empty → computing → loaded → refreshing transitionsSupporting code
derive.tsutilities: cumulative series builder, headline total, variant identity resolutionContentCard(optionaltitleprop, size variant) andSelectableCardborder stylingHow did you test this code?
npm run test:unit -- --testPathPatterns=experiments)npm run typecheck)Experiment in draft => No exposure section, later will be updatable

Experiment running => with fake data

Paused experiment
