Keep the Material graph implementation while preserving public Cupertino parameters for callers. Remove unreachable Cupertino widgets, routes, theme branches, imports, and Cupertino-only tests because the app runs exclusively under MaterialApp.
The linear layout used by the definition and run graphs placed each
outcome label at the middle of its widest run with no collision check,
and the run graph measured only the label text while rendering an order
badge in front of it, so taken labels ran into the next node.
Labels now try positions along their own route (horizontal runs above
and below, sliding along, then vertical runs) and take the first whose
box stays 4px clear of every node and earlier label, preferring spots
off other wires. If a label finds no spot, the layout widens its column
gaps and lanes and runs again; a last-resort shelf below the drawing
never overlaps. The run graph measures the exact badge+label widget it
renders, keyed by edge id.
Extract the chat's segmented bar into lib/ui/adaptive (SegmentedBar,
GlassPill, SegmentedBarOverlay) and use it for the shell bar, DetailPane
and every page-level bar. Pieces are frosted glass over a fading scrim;
only pills take taps. Actions keep their natural width so the title gives
way before a model name. The chat transcript scrolls behind its header.
Mark the run's recorded current stage on the run graph while it executes. The
halo is a foreground painter outside the node box, so it adds no size, hit
target or semantics, and it is derived only from RunGraphState.activeStage,
which is non-null only while the run reports executing. Reduced motion keeps a
still ring instead of animating.
Widget tests cover the sole active node, a finished run with no halo or ticker,
reduced motion, toggling it at runtime and unchanged node extents.
One content-sized stage node as an ordinary native control. Material uses
stock Card.outlined/Card.filled inside an InkWell; Cupertino uses
CupertinoButton.tinted/filled. onSelected reports the definition key
verbatim, one merged button semantics node carries the exact label and
selected state, recorded status is shown only when the caller supplies it,
and invisible U+200B break opportunities reproduce the web's anywhere
wrapping. Painted-boundary and painted-surface tests cover the UI-review
2x outline and Cupertino container defects.