FE-1685: Draw every sweep study's objective by step under the Parameters sliders - #9660
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
e20bd4b to
e767790
Compare
e767790 to
b385ea6
Compare
b385ea6 to
fd1cfc7
Compare
PR SummaryLow Risk Overview Shared chart refactor: Sweep wiring: Reviewed by Cursor Bugbot for commit 76d4a9e. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
The chart incorrectly connects studies, drops infeasible-point rendering, mishandles failed-only summaries, and lacks the required changeset.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a persistent objective-history chart beneath sweep parameter sliders, reusing the optimization history chart infrastructure.
Changes:
- Extracts reusable objective-history data and chart components.
- Adds concatenated sweep-study histories, dividers, summaries, and folding UI.
- Updates tests, stories, architecture docs, and user documentation.
File summaries
| File | Description |
|---|---|
libs/@local/petrinaut-arch-docs/content/ui/optimizations-tab.mdx |
Documents shared chart and sweep strip architecture. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/results-view.tsx |
Renders content below result-band controls. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/results-model.ts |
Adds the result-band below slot. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/objective-history-data.ts |
Provides shared objective-history transformation. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/objective-history-data.test.ts |
Tests objective-history generation. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/objective-history-chart.tsx |
Generalizes chart styling, axis pinning, and dividers. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/infeasible-color.ts |
Shares the infeasible-step color. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/drawer-frame.tsx |
Exports the shared fold component. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/shared/drawer-frame.test.tsx |
Adds a ResizeObserver test stub. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/optimizations/view-optimization-drawer.test.tsx |
Updates the objective-card mock path. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/optimizations/study-results/steps-table.tsx |
Uses the shared infeasible color. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/optimizations/study-results/objective-history-card.tsx |
Wraps the shared chart for study results. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/optimizations/study-results.tsx |
Uses the extracted card and initializes below. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/optimizations/optimization-full-view.test.tsx |
Updates the objective-card mock path. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/view-experiment-drawer.test.tsx |
Tests sweep-strip behavior and multiple studies. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/view-experiment-drawer.stories.tsx |
Adds optimized and stopped sweep stories. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/sweep-optimizer.ts |
Exposes all sweep studies in chronological order. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/sweep-objective-strip/sweep-objective-history.ts |
Builds concatenated sweep histories and summaries. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/sweep-objective-strip/sweep-objective-history.test.ts |
Tests history concatenation and axis behavior. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/sweep-objective-strip.tsx |
Implements the folding objective strip. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/experiment-results.tsx |
Places the strip beneath sweep sliders. |
libs/@hashintel/petrinaut/src/ui/views/Editor/panels/SimulateView/experiments/experiment-results.test.tsx |
Tests result-model strip integration. |
libs/@hashintel/petrinaut/docs/optimization.md |
References the sweep objective chart. |
libs/@hashintel/petrinaut/docs/experiments.md |
Documents the new sweep-strip workflow. |
Review details
- Files reviewed: 21/24 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3fb1fae to
8df70ef
Compare
…che on the artifact fingerprint
…etric state binder
…g the GPU metric-spec gate
… after every run executed
…e halt ahead of an overflow
…ts calibration out of the cache
…es through the drawer and drop the unused FoldProps export
…hose only study failed at start the empty summary
…hen its every study failed at start
Important
Experimental
Behind the Parameter sweeps and In-browser optimization feature flags.
Summary
Before this PR, a study started from a sweep's Parameters card showed its progress as one line under the sliders: the step count while it ran, the outcome once it settled. The objective's path over the steps, the chart the Optimizations tab draws for every study, was nowhere in the sweep drawer.
This PR draws it at the bottom of the Parameters card. From the first Optimize on, a full-width purple strip sits under the sliders: a disclosure row naming the metric, the steps run and the best value so far, and beneath it a compact chart of the objective per step with the best-so-far line, the x axis pinned to the steps to come so dots fill left to right while the study streams. The strip stays after the study settles and folds from its row in both states. A second Optimize appends its steps after a dashed divider, the numbering continuing. Before any study the card is unchanged.
9660.mp4
Links
Changes
Shared chart
ObjectiveHistoryChartmoves toSimulateView/sharedObjectiveHistoryCardmoves tostudy-results/objective-history-card.tsxobjective-history-data.tsis shared tooFoldexported throughdrawer-frame.tsxSweep drawer
useSweepOptimizerexposes every study of the sweepResultsBand.belowslotSweepObjectiveStripReview fixes
Next steps
xMaxthroughsetScaleif recreating the plot on settle ever flickersTest coverage
sweep-objective-history.test.ts:objective-history-data.test.ts:experiment-results.test.tsx,view-experiment-drawer.test.tsx:sweep-optimizercoverage throughview-experiment-drawer.test.tsx:drawer-frame.test.tsx:How to test
populationandinfected_ratio