Share one drawer frame between the Simulate drawers and the full optimization view - #9607
Draft
kube wants to merge 13 commits into
Draft
Share one drawer frame between the Simulate drawers and the full optimization view#9607kube wants to merge 13 commits into
kube wants to merge 13 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
kube
added this pull request to stack #9549
September 9, 2026 06:39
kube
force-pushed
the
claude/opt-proto-drawer-frame
branch
from
September 9, 2026 12:45
cbf2e4e to
c341dee
Compare
kube
force-pushed
the
claude/opt-proto-drawer-frame
branch
from
September 9, 2026 13:32
c341dee to
fe9dfe3
Compare
kube
force-pushed
the
claude/opt-proto-drawer-frame
branch
from
September 9, 2026 13:51
fe9dfe3 to
cd5fd92
Compare
…ugh one StudyFrame
…ol went idle The study drawer's opening focus landed on the computing chip inside the header. The chip was disabled under it without a blur, so the header's engaged state stuck at true and the header stayed at 56px on scroll until the pointer visited it. The drawer body now takes the opening focus, and the frame remembers which element took focus in the header and drops it on scroll once that element is disabled, removed or no longer active. The ds Drawer's focus ref props accept a ref that starts null, as the Popover's do.
The two-column arrangement started at 1100px of body width while the extra-large drawer's body measures 1010px, 995px beside a classic scrollbar, so every drawer stacked and a two-axis sweep with four metrics could still put the metrics below the fold. The threshold is 960px, and the secondary column is never narrower than two chart cards and their gap: the primary column yields until the body is wide enough for the 3:5 split. The chart card minimum is one shared constant. A "Sweep, four metrics" story shows the common case.
In the two-column drawer the primary column is 342px wide, and the Parameters band's status wrapped onto a second line while a study followed its steps, then unwrapped on Pause: a 20.8px shift in the column below. The band's title row is a fixed 24px, its trailing readout clips with an ellipsis and a tooltip instead of wrapping, and the Follow steps toggle never shrinks. The sweep navigator's sampling status line is one fixed line the same way, and the study navigator's control grid never exceeds the band's width.
…idest value Every stat is a column with its label over its value and a hairline before it, as the old summary strip drew them. The column is exactly as wide as the widest text its value can show, laid invisibly under the live one, so a number growing a digit, a status changing word or the computing count going to zero moves nothing. The computing chip is always drawn, 0 computing and disabled while nothing runs, with room for a three-digit count; the compute badge is the strip's last column and stays among the compact chips once the header condenses. The header is 68px at rest for the two-line columns.
The parameter controls are global to the drawer, so the band sits under the header across the whole body instead of sharing the left column with the surface. A chevron folds it; the fold animates the band's height alone, the controls stay mounted so slider positions and refinement state survive, and the columns beneath move as one block. FrameColumns now holds the surface and the cards only, and gives the cards the whole width when there is no surface.
The ds Slider gains variant plain: a 12px round thumb of one fixed size, no swell while dragged, and a rail that spans the root whatever aligns the root's children. The optimization navigator centred the slider root's children, which shrank the rail to the thumb; the sweep navigator's range slider takes the same plain thumb.
…he metric select The axis selects share their row's width instead of a fixed 170px each, so the footer fits the surface card's narrowest column; the sweep's Metric select takes a second row the footer reserves at all times.
…or the strip The live simulated time prints three decimals under the maximum, so the column's widest text is a fraction just under the maximum over the maximum. The compute badge is 18px tall like the status pill and the computing chip, so it fits the strip's value line instead of clipping under it.
kube
force-pushed
the
claude/opt-proto-drawer-frame
branch
from
September 9, 2026 18:38
cd5fd92 to
6278026
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Experimental
Behind the In-browser optimization feature flag.
Summary
Before this PR, the experiment drawer, the optimization drawer and the full study view each built their own chrome. Each opened with a collapsible Summary section and a summary strip that scrolled with the body, so the status and the progress left the screen as soon as a reviewer scrolled to a chart. A note appearing, a status changing or a number growing a digit moved the cards below it.
This PR gives the three surfaces one
DrawerFrame. Its header sits outside the body scroll, names the experiment or study in one line and carries the status, the runs, the time, the computing chip and the compute badge as a strip of labelled columns divided by hairlines, with a progress bar along its bottom edge. Every column is as wide as its widest value, so nothing in the header moves while results stream. Once the body scrolls the header condenses to one line with the columns as compact chips, and grows back under the pointer. The body puts the Parameters band across its width under the header, collapsible; beneath it, at the extra-large drawer's width and above, the surface sits left and the metric cards right, two to a row, so two swept parameters and four metrics fit without scrolling; in a narrower drawer the cards come first. Every card and the note row keep a fixed height. The Summary section is gone from every surface.Links
Changes
Drawer frame
DrawerFramerenders the header, the body and the footer of every Simulate drawer and of the full study viewFrameStatis a labelled column as wide as its widest valueFrameColumnsarrangesprimary,secondaryandafterby the body's widthFrameBandis the titled band for parameter controls, spanning the body under the headerComputeBatchesChipis always drawn and opens its batch list in aPopoverframeLayoutSignaturereads the header, the note, every card and the steps table heights from the DOMExperiment drawer
SIR transmission sweep · Seasonal Flu · 100 runs · dt 1ExperimentStatsreplaces the Summary sectionprimary, the metric cards insecondary, the error in the note rowCHART_CARD_MIN_WIDTHwide at minimum, 320px, so two fit the right column from the threshold upStudy view
StudyFramebuilds the frame for the optimization drawer and the full viewprimary, the four chart cards in a grid insecondary, the steps table inafterleadingand its actions sit in the frame footerstepsProgressPercentdrives the header bar; the followed step's secondary bar and its label are gonesummary-strip.tsx,compute-activity.tsx,study-summary-strip.tsxandexperiment-summary.tsxReview fixes
DraweracceptsinitialFocusRefandreturnFocusRefrefs that startnull, asPopoverdoesSweep, four metricsshows the common caseSlidergains aplainvariant and the navigators use itKnown issues
Next steps
ChartCardwith a flush bodyTest coverage
drawer-frame.test.tsx:view-experiment-drawer.test.tsx:view-optimization-drawer.test.tsx,optimization-full-view.test.tsx:study-stats.test.ts:How to test
Experiment drawer
Study view
Profit, direction Maximize, tick Optimize production_rate, set Optimization steps to 12, Run