FE-1690: Toggle optimization from the experiment creation form - #9689
FE-1690: Toggle optimization from the experiment creation form#9689kube wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview Public API change: Ad-hoc / interval editing is unified: interval mode is Min and Max only (Step, Scale, and boolean optimize UI removed); gutter labels follow Sweep vs Optimize (Swept count / Optimized count). Docs, Storybook notes, and tests are updated for the new creation contract, scenario on the record, and interval-selection behavior. Reviewed by Cursor Bugbot for commit a533a06. Bugbot is set up for automated code reviews on this repo. Configure here. |
33bbc8d to
9bab6b3
Compare
9bab6b3 to
18987af
Compare
18987af to
7a7f386
Compare
7a7f386 to
631fa02
Compare
4428067 to
9bb809b
Compare
…and let callers select it
…mizer can drive the sweep
…udy with the experiment
…time study in the guide, the settings and the architecture docs
9bb809b to
a533a06
Compare
Important
Experimental
Behind the Parameter sweeps and In-browser optimization feature flags.
Summary
Before this PR, optimizing a sweep took two steps. The Create Experiment drawer offered a Sweep toggle on each numeric value and created an idle sweep; the optimizer started later from a purple Optimize button on the sweep's Parameters card, which asked for the metric, the direction and the step count in a popover, and a sweep could be optimized again and again into one strip.
This PR starts the study with the experiment. Where the in-browser optimizer can drive the sweep, the interval toggle reads Optimize instead of Sweep; the first toggle adds an Objective section to the drawer, metric over the experiment's metric drafts, Maximize or Minimize, and the number of steps, with a helper line that pre-checks the optimizer's step budgets. The footer reads Optimize, and submit is one gesture: create the experiment, start the study, then select it, so the results drawer opens already driving with the Parameters card purple, the headline counting steps and the cards and table mounted. A study that cannot start removes the experiment again and names the reason in the footer. The Parameters card keeps only Stop while a study drives; one experiment carries one study, and a new search is a new experiment. Without the optimizer the toggle still reads Sweep and the sweep opens idle as before.
9689.mp4
Links
Changes
Create Experiment drawer
Results drawer
Public API
createExperimentresolves with theExperimentRecord, which carries the scenario it compiledKnown issues
Test coverage
create-experiment.test.ts,provider.test.tsx,context.test.ts:ad-hoc-scenario-form.test.tsx,experiment-scenario-run.test.tsx:sweep-objective.test.ts,objective-section.test.tsx,create-optimized-experiment.test.tsx,sweep-optimizer.test.ts:create-experiment-drawer.test.tsx,ad-hoc-interval-toggles.test.ts:experiment-results.test.tsx,view-experiment-drawer.test.tsx,sweep-objective-history.test.ts:How to test
infected_ratioinfected_ratio