Interactive gallery and 20-check automated Chrome CDP stress harness for @umwelten/substrate Shell layouts, the 15-component built-in framework, and the design.md visual identity compiler.
Live scenarios
Start the gallery locally on http://127.0.0.1:7490:
pnpm exec tsx examples/32-substrate-layout-stress-test/run.ts
Then open:
/— Gallery index with links to all 8 live scenarios/catalog/shell/— Complete 15-component showcase (workbench-layout,fleet-connections,chat,kpi-strip,data-table,markdown-doc,workspace,detail-inspector,terminalover RFC 6455 mock WS,activity-log,beats,form-panel,connections,traces,theme-switcher)/branded/shell/— Server-injected TheFocus.AI Dark & Amberdesign.md(Ink #0E1014,Slate #1A1E26,Cream #F3F1EA,Amber #F2B33D,0pxsquare corners,2pxborders) applied automatically across both full workbench and/branded/shell/solo/kpi-strip//workbench/shell/— 3-rail IDE workbench withnav-status,stress-controls,selectable-text,hmr-clock,chat,Overview,iframe-probe,live-editor, andtraces/gaia-clone/shell/— 9-component Gaia Hub replica (fleet-connectionsleft;Chat/Agents/Nodes/Keys/Userscenter;Inspectoriframe +Tracesright)/custom-layout/shell/— Runtime ADR 0034 layout swapper (3-Rail Workbench↔Bottom-Dock Drawer↔Focus Mode↔Bare Grid) via manifest reconciliation with zero page reload/tab-overflow/shell/— 14-tab overflow bar with horizontal scrolling, WAI-ARIAArrowLeft/ArrowRight/Home/Endnavigation, and sibling HMR reload/bare/shell/— ADR 0034 base CSS auto-fill grid when no layout component is active
Running --smoke
pnpm exec tsx examples/32-substrate-layout-stress-test/run.ts --smoke
Checks node --check on all 15 built-ins + 10 Lab 32 components, fetches all 13 HTTP routes (200 OK), and drives headless Chrome over CDP through all 20 stress checks with strict zero console/page error enforcement.
What we learned
Inspecting @umwelten/substrate/shell/components/workbench-layout.js, theme.css, and Gaia Hub's fleet-inspector.js / fleet-agents.js uncovered eight root causes behind the tab click/highlight breakage and layout instability:
- DOM re-parenting on tab switches & split toggles: Moving panels between
centerBody/slotPrimary/slotSecondaryand.umw-wb-parkingtore<iframe>documents down and reloaded them on every switch (breakingfleet-inspectorsolo panels andui://apps), wiped panel scroll offsets, cleared text selections, and triggeredMutationObserverremoval noise. Fix: Panels now stay permanently inside zone containers (leftPanelsWrap,centerBody,rightBody) and toggle visibility strictly viadata-wb-slot="primary" | "secondary" | "hidden". - Recreating tab & nav
<button>nodes on everyrender(): CallingreplaceChildren()oncenterTabs,rightTabList, andnavSectioninside click handlers destroyed the clicked button mid-gesture, breaking focus, breaking click+highlight interactions, and discarding keyboard focus. Fix: Cached tab/nav elements are reconciled in place (reconcileOrder), preserving exact button DOM identity and enabling WAI-ARIAArrowLeft/ArrowRight/Home/Endkeyboard navigation. - Center tab bar stretched edge-to-edge without
.umw-wb-tab-list:centerTabsused.umw-wb-tabs(justify-content: space-between) directly, stretching Gaia's 5 center tabs across the pane and overflowing horizontally under 5+ tabs. Fix:centerTabsnow wraps tabs in.umw-wb-tab-list[role="tablist"]with left-aligned flex layout and clean horizontal scrolling. - Card flex/scroll clipping:
.umw-wb-center-body > .shell-cardforcedflex: 1; min-height: 0;without scroll isolation. Fix: Primary/secondary[data-wb-slot]panels shareflex: 1 1 0; min-height: 0; overflow-y: auto;, while full-bleed interactive cards (chat,terminal,fleet-inspector,[data-fill="true"]) flex cleanly to fill height. - Viewport overflow & stuck drag state over iframes: Fixed pixel widths pushed the right pane past narrow (
980px–1200px) viewports, and missing pointer capture leftumw-wb-resizing(user-select: none) stuck when releasing over an iframe. Fix: Viewport-aware width clamping viaResizeObserver,setPointerCapturewithpointercancel/blurcleanup,body.umw-wb-resizing iframe { pointer-events: none; }, anduser-select: nonescoped strictly to workbench chrome (tabs, headers, resizers) rather than panel content. - Origin-wide
localStoragecollision:umw.workbench.v1shared one key across/shell/and/agents/<id>/shell/. Fix: Scoped persistence toumw.workbench.v2:${pathname}. - Gaia
fleet-inspectortab lookup & topbar order:b.textContent === "Inspector"missed"Inspector (2)"in split mode. Fix: UseserviceKey("shell:workbench")(openRightTab("fleet-inspector")) with[data-panel-id="fleet-inspector"]fallback and consistent topbar button ordering. - Solo-page guard & non-panel filtering:
workbench-layoutnow no-ops withoutheader.topbar(unlessforceMount: true) and skips<style>,<script>,<dialog>, and[data-workbench-ignore="true"].