Audit A+B: header/toast stacking above overlays; toolbar wraps instead of clipping Run
Browse files- TopBar z-20 -> z-40: the ThemeSwitcher dropdown lives inside the
header's stacking context, so the Multiverse board (z-20) and the
Evidence Theater (z-30) overlays painted over it where it hangs
below the bar. Mobile drawers (z-40/50, later in DOM) still cover.
- CanvasToast z-30 -> z-40: run errors / replicate notices fire while
the theater (which auto-opens on streaming runs) covers the canvas
and were invisible behind it.
- Canvas toolbar: min-h-12 + flex-wrap (row and action cluster,
min-w-0 so wrapping actually engages). The cluster's md:/lg: label
breakpoints key on the viewport while the row lives in a resizable
column; at 1280-1440px windows with default panes the row
overflowed and clipped the Run button. One-line case renders
pixel-identical.
- Copy: last "Results" remnants -> "Evidence" (TopBar drawer button
title/aria, App resizer aria-label).
|
@@ -362,7 +362,7 @@ export default function App() {
|
|
| 362 |
}
|
| 363 |
onDoubleClick={() => setRightW(RIGHT_DEFAULT)}
|
| 364 |
onDragChange={setIsResizing}
|
| 365 |
-
ariaLabel="Resize
|
| 366 |
/>
|
| 367 |
)}
|
| 368 |
<aside
|
|
|
|
| 362 |
}
|
| 363 |
onDoubleClick={() => setRightW(RIGHT_DEFAULT)}
|
| 364 |
onDragChange={setIsResizing}
|
| 365 |
+
ariaLabel="Resize evidence pane"
|
| 366 |
/>
|
| 367 |
)}
|
| 368 |
<aside
|
|
@@ -1098,8 +1098,19 @@ export function FlowCanvas() {
|
|
| 1098 |
when overflow-x is auto, which would clip the dropdowns
|
| 1099 |
(PresetPicker, MoreMenu) that anchor below this row. On
|
| 1100 |
mobile the Run button drops out (md:flex) and the FAB
|
| 1101 |
-
replaces it, so the remaining icon-only items fit easily.
|
| 1102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1103 |
{/* Status counter. Full form on ≥sm. On <sm we swap in an icon
|
| 1104 |
pair (Box = "blocks", Link2 = "links") so the compact counter
|
| 1105 |
is still self-explanatory — a bare "5·4" turned out to be
|
|
@@ -1121,7 +1132,12 @@ export function FlowCanvas() {
|
|
| 1121 |
<span className="tabular-nums">{edges.length}</span>
|
| 1122 |
</span>
|
| 1123 |
</div>
|
| 1124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1125 |
<PresetPicker onPick={loadPreset} />
|
| 1126 |
|
| 1127 |
{/* ≥ md: individual action buttons. Labels show at ≥ lg only —
|
|
@@ -1496,7 +1512,11 @@ function TouchDragPreview({
|
|
| 1496 |
* Absolute-positioned toast pinned to the bottom-center of the canvas.
|
| 1497 |
* Handles Auto-connect summaries, Auto-connect warnings (multi-line via
|
| 1498 |
* `notice.detail`), and runner errors. Sits above React Flow's controls
|
| 1499 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1500 |
*/
|
| 1501 |
function CanvasToast({
|
| 1502 |
notice,
|
|
@@ -1535,7 +1555,7 @@ function CanvasToast({
|
|
| 1535 |
style={{
|
| 1536 |
bottom: "calc(env(safe-area-inset-bottom, 0px) + 4.5rem)",
|
| 1537 |
}}
|
| 1538 |
-
className={`absolute left-1/2 -translate-x-1/2 z-
|
| 1539 |
>
|
| 1540 |
<div className="shrink-0 mt-0.5">{palette.icon}</div>
|
| 1541 |
<div className="flex-1 min-w-0 text-sm text-ink">
|
|
|
|
| 1098 |
when overflow-x is auto, which would clip the dropdowns
|
| 1099 |
(PresetPicker, MoreMenu) that anchor below this row. On
|
| 1100 |
mobile the Run button drops out (md:flex) and the FAB
|
| 1101 |
+
replaces it, so the remaining icon-only items fit easily.
|
| 1102 |
+
|
| 1103 |
+
flex-wrap + min-h-12 (not a fixed h-12): the action cluster's
|
| 1104 |
+
visibility is keyed to VIEWPORT breakpoints (md:/lg:) but this
|
| 1105 |
+
row lives in a RESIZABLE center column — at a 1280-1440px
|
| 1106 |
+
window with default side panes the column is only ~550-700px
|
| 1107 |
+
wide while lg: still shows every label, and with the optional
|
| 1108 |
+
chips present (pinned seed / cost estimate) the row used to
|
| 1109 |
+
overflow and clip the Run button off the right edge. Wrapping
|
| 1110 |
+
keeps every control reachable at any pane width; when one
|
| 1111 |
+
line fits (the common wide case) min-h-12 renders pixel-
|
| 1112 |
+
identical to the old fixed row. */}
|
| 1113 |
+
<div className="min-h-12 shrink-0 border-b border-edge px-3 sm:px-4 py-1 flex flex-wrap items-center justify-between gap-x-2 sm:gap-x-4 gap-y-1">
|
| 1114 |
{/* Status counter. Full form on ≥sm. On <sm we swap in an icon
|
| 1115 |
pair (Box = "blocks", Link2 = "links") so the compact counter
|
| 1116 |
is still self-explanatory — a bare "5·4" turned out to be
|
|
|
|
| 1132 |
<span className="tabular-nums">{edges.length}</span>
|
| 1133 |
</span>
|
| 1134 |
</div>
|
| 1135 |
+
{/* min-w-0 (NOT shrink-0) is what lets flex-wrap actually engage:
|
| 1136 |
+
a shrink-0 cluster would keep its one-line preferred width and
|
| 1137 |
+
overflow the row instead of wrapping its buttons. justify-end
|
| 1138 |
+
keeps continuation lines right-aligned, so Run stays in the
|
| 1139 |
+
bottom-right corner of the toolbar where the eye expects it. */}
|
| 1140 |
+
<div className="flex flex-wrap items-center justify-end gap-1.5 sm:gap-2 gap-y-1 min-w-0">
|
| 1141 |
<PresetPicker onPick={loadPreset} />
|
| 1142 |
|
| 1143 |
{/* ≥ md: individual action buttons. Labels show at ≥ lg only —
|
|
|
|
| 1512 |
* Absolute-positioned toast pinned to the bottom-center of the canvas.
|
| 1513 |
* Handles Auto-connect summaries, Auto-connect warnings (multi-line via
|
| 1514 |
* `notice.detail`), and runner errors. Sits above React Flow's controls
|
| 1515 |
+
* AND above the center-column overlays (Multiverse z-20, Theater z-30):
|
| 1516 |
+
* the theater auto-opens on streaming runs, and a run error surfaced
|
| 1517 |
+
* here must not be occluded by it — hence z-40 (mobile drawers, fixed
|
| 1518 |
+
* z-40/50 later in the DOM, still cover it). Caps at a readable width
|
| 1519 |
+
* regardless of canvas size.
|
| 1520 |
*/
|
| 1521 |
function CanvasToast({
|
| 1522 |
notice,
|
|
|
|
| 1555 |
style={{
|
| 1556 |
bottom: "calc(env(safe-area-inset-bottom, 0px) + 4.5rem)",
|
| 1557 |
}}
|
| 1558 |
+
className={`absolute left-1/2 -translate-x-1/2 z-40 w-[min(36rem,calc(100%-2rem))] rounded-lg border ${palette.border} ${palette.bg} bg-surface/95 backdrop-blur-sm shadow-xl px-4 py-3 flex items-start gap-3 md:!bottom-4`}
|
| 1559 |
>
|
| 1560 |
<div className="shrink-0 mt-0.5">{palette.icon}</div>
|
| 1561 |
<div className="flex-1 min-w-0 text-sm text-ink">
|
|
@@ -32,7 +32,7 @@ export function PresetPicker({ onPick }: { onPick: (key: string) => void }) {
|
|
| 32 |
// toolbar, so anchoring `left-0` pushed the popover past the right
|
| 33 |
// viewport edge. Pin it with `fixed right-3 top-14` instead so it
|
| 34 |
// always stays inside the viewport — same pattern PapersPopover
|
| 35 |
-
// and DevelopersPopover use. The header is z-
|
| 36 |
// child with `z-30` stacks cleanly above React Flow.
|
| 37 |
//
|
| 38 |
// Desktop (≥sm): `absolute right-0 top-full` anchors it to the
|
|
|
|
| 32 |
// toolbar, so anchoring `left-0` pushed the popover past the right
|
| 33 |
// viewport edge. Pin it with `fixed right-3 top-14` instead so it
|
| 34 |
// always stays inside the viewport — same pattern PapersPopover
|
| 35 |
+
// and DevelopersPopover use. The header is z-40, and a fixed
|
| 36 |
// child with `z-30` stacks cleanly above React Flow.
|
| 37 |
//
|
| 38 |
// Desktop (≥sm): `absolute right-0 top-full` anchors it to the
|
|
@@ -64,7 +64,14 @@ export function TopBar({
|
|
| 64 |
paddingLeft: "max(0.75rem, env(safe-area-inset-left))",
|
| 65 |
paddingRight: "max(0.75rem, env(safe-area-inset-right))",
|
| 66 |
}}
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
>
|
| 69 |
<div className="flex items-center gap-2 sm:gap-3 min-w-0 flex-shrink">
|
| 70 |
{mobile && onOpenLeftDrawer && (
|
|
@@ -121,8 +128,8 @@ export function TopBar({
|
|
| 121 |
<button
|
| 122 |
type="button"
|
| 123 |
onClick={onOpenRightDrawer}
|
| 124 |
-
aria-label="Open
|
| 125 |
-
title="
|
| 126 |
className="w-9 h-9 rounded-md border border-edge bg-surface/60 text-mute hover:text-ink hover:border-accent/40 flex items-center justify-center shrink-0"
|
| 127 |
>
|
| 128 |
<PanelRight className="w-4 h-4" />
|
|
|
|
| 64 |
paddingLeft: "max(0.75rem, env(safe-area-inset-left))",
|
| 65 |
paddingRight: "max(0.75rem, env(safe-area-inset-right))",
|
| 66 |
}}
|
| 67 |
+
// z-40: the ThemeSwitcher dropdown is a CHILD of this header, so its
|
| 68 |
+
// own z-index can never escape the header's stacking context. The
|
| 69 |
+
// center-column overlays (Multiverse z-20, Evidence Theater z-30)
|
| 70 |
+
// come later in the DOM and used to paint OVER the dropdown where
|
| 71 |
+
// it hangs below the bar; z-40 keeps header dropdowns clickable
|
| 72 |
+
// while any overlay is up. Mobile drawers (fixed z-40/z-50, later
|
| 73 |
+
// in the DOM) still cover the header as before.
|
| 74 |
+
className="relative z-40 h-14 shrink-0 border-b border-edge sm:px-5 flex items-center justify-between gap-2 sm:gap-4 bg-canvas"
|
| 75 |
>
|
| 76 |
<div className="flex items-center gap-2 sm:gap-3 min-w-0 flex-shrink">
|
| 77 |
{mobile && onOpenLeftDrawer && (
|
|
|
|
| 128 |
<button
|
| 129 |
type="button"
|
| 130 |
onClick={onOpenRightDrawer}
|
| 131 |
+
aria-label="Open evidence"
|
| 132 |
+
title="Evidence"
|
| 133 |
className="w-9 h-9 rounded-md border border-edge bg-surface/60 text-mute hover:text-ink hover:border-accent/40 flex items-center justify-center shrink-0"
|
| 134 |
>
|
| 135 |
<PanelRight className="w-4 h-4" />
|