Context
Measured on 2026-09-02 in a downstream dock workspace app (engine checkout at dev@ec6856b804, Chrome): after a pane was pinned to its right-edge rail and pinned back, the whole workspace stood exactly one host width to the LEFT of the viewport — an empty dock under the app's menu bar. Switching tabs in a two-tab container did the same. Neither reproduced in apps/workstation.
The difference is one stylesheet rule the Workstation carries and the downstream host did not:
> .neo-dock-preview { inset: 0; pointer-events: none; position: absolute; z-index: 25; }The engine's own sheet never positions the preview's ROOT. resources/scss/src/dashboard/dock/interaction/Preview.scss:7 gives .neo-dock-preview only pointer-events: none; position: absolute appears on the affordances INSIDE it (:15) and on the dwell pseudo-element (:41). The sibling overlay does position itself: .neo-dashboard-dock-drop-indicators { inset: 0; position: absolute; z-index: 30 } (resources/scss/src/dashboard/Container.scss:601). Every consumer so far re-derived the missing pair for the preview: the Demo-A example (resources/scss/src/examples/dashboard/choreography/DemoAWorkspace.scss:79), the Workstation (added after the July 2026 finding that its overlays were drawn a header height too high), and now the downstream workspace, whose host had copied the Workstation's position: relative and stopped there.
The Problem
A dock host lays out fit, i.e. a flex row. An unpositioned preview is an in-flow neo-layout-fit-item there — flex: 1 0 100%, as wide as the host — so the host's content is twice its width. overflow-x: hidden hides the scrollbar but the host stays programmatically scrollable, and any focus or scroll-into-view aimed at content right of the first width scrolls it:
| moment |
host clientWidth |
scrollWidth |
scrollLeft |
first shell x |
| boot, preview in flow |
1600 |
3200 |
0 |
0 |
| pin-back clicked while the reveal was still sliding in |
1600 |
3200 |
1561 |
-1561 |
| tab switch in a two-tab container |
1600 |
3200 |
1423 |
-1423 |
| same cycles with the preview positioned absolutely |
1600 |
1600 |
0 |
0 |
Nothing scrolls the host back: the preview keeps the overflow alive after the re-projection has retired the old shell, so the shift is permanent until a reload. With the preview lifted out of the flow the host has no overflow, a scroll during the staged swap (two shells, twice the width, for a few frames) clamps back to 0 the moment the old shell goes, and the recorded pin cycle shows zero scroll events.
The Architectural Reality
Neo.dashboard.dock.Workspace hosts the projection at dockShellIndex and keeps the preview and the indicator layer as persistent SIBLINGS in the same host (src/dashboard/dock/Workspace.mjs, dockHostReference / dockShellIndex); DragAffordances positions the preview's affordances in host-local coordinates (localRect) — the contract assumes the preview's box IS the host's box.
Reconciler.reconcileProjection stages the next shell as a hidden sibling at shellIndex + 1 (src/dashboard/dock/projection/Reconciler.mjs:426) — for the duration of the transaction the host legitimately holds two full-width shells, so the host MUST be able to recover from a transient scroll; it can only do that when nothing else keeps it scrollable.
- The indicator layer already owns its positioning in the engine sheet; the preview is the one overlay whose geometry a consumer has to know about.
The Fix
resources/scss/src/dashboard/dock/interaction/Preview.scss: position the root — .neo-dock-preview { inset: 0; pointer-events: none; position: absolute; } — with a stacking value that keeps it under the indicator layer (z-index: 30) and above the reveal overlay (z-index: 20), i.e. the 25 the Workstation and Demo-A declare today (consumers may keep overriding z-index).
- Retire the now-redundant consumer duplicates in
apps/workstation/Workspace.scss:259 and DemoAWorkspace.scss:79, or leave them as documented no-ops — one owner for the rule either way.
- A geometry witness: the dock host's
scrollWidth equals its clientWidth with nothing but position: relative on the host, asserted where the overlays are already measured (test/playwright/e2e/workstation/WorkstationDragAffordancesNL.spec.mjs or a component spec on a bare Neo.dashboard.dock.Workspace with dockHostReference).
Acceptance Criteria
Out of Scope
- Programmatic
focus() calls without preventScroll during a staged re-projection (a separate hygiene item; harmless once the host cannot stay scrolled).
- The reconciler's behaviour when one of its own updates rejects mid-transaction (filed separately).
Avoided Traps
overflow-x: clip on the host would also stop the scroll but hides the cause: the preview would still be an in-flow fit item consuming a full host width in the flex row.
- Positioning the preview from
DragAffordances at runtime (inline style) puts a layout constant on a per-drag code path; the stylesheet is the owner.
Related
- Epic #13158 (docking polish).
- #18138 — the same ownership pattern: a rule the engine's reveal needs, living in consumer stylesheets.
- Prior instance of the same omission on the Workstation: the July 2026 finding that its overlays were drawn a header height too high; repaired in app SCSS rather than in the engine sheet.
Live latest-open sweep: checked the latest 20 open issues at 2026-09-02T21:31:05Z; no equivalent found (nearest: #18138, a sibling pattern on a different rule). A2A claim sweep over the last 30 messages: no overlapping lane claim.
Origin Session ID: f6da5bf6-e688-454c-8fea-1ee269327016
Retrieval Hint: "dock preview in flow host scrollWidth twice clientWidth pushed out to the left"
Context
Measured on 2026-09-02 in a downstream dock workspace app (engine checkout at
dev@ec6856b804, Chrome): after a pane was pinned to its right-edge rail and pinned back, the whole workspace stood exactly one host width to the LEFT of the viewport — an empty dock under the app's menu bar. Switching tabs in a two-tab container did the same. Neither reproduced inapps/workstation.The difference is one stylesheet rule the Workstation carries and the downstream host did not:
// resources/scss/src/apps/workstation/Workspace.scss:259 > .neo-dock-preview { inset: 0; pointer-events: none; position: absolute; z-index: 25; }The engine's own sheet never positions the preview's ROOT.
resources/scss/src/dashboard/dock/interaction/Preview.scss:7gives.neo-dock-previewonlypointer-events: none;position: absoluteappears on the affordances INSIDE it (:15) and on the dwell pseudo-element (:41). The sibling overlay does position itself:.neo-dashboard-dock-drop-indicators { inset: 0; position: absolute; z-index: 30 }(resources/scss/src/dashboard/Container.scss:601). Every consumer so far re-derived the missing pair for the preview: the Demo-A example (resources/scss/src/examples/dashboard/choreography/DemoAWorkspace.scss:79), the Workstation (added after the July 2026 finding that its overlays were drawn a header height too high), and now the downstream workspace, whose host had copied the Workstation'sposition: relativeand stopped there.The Problem
A dock host lays out
fit, i.e. a flex row. An unpositioned preview is an in-flowneo-layout-fit-itemthere —flex: 1 0 100%, as wide as the host — so the host's content is twice its width.overflow-x: hiddenhides the scrollbar but the host stays programmatically scrollable, and any focus or scroll-into-view aimed at content right of the first width scrolls it:clientWidthscrollWidthscrollLeftNothing scrolls the host back: the preview keeps the overflow alive after the re-projection has retired the old shell, so the shift is permanent until a reload. With the preview lifted out of the flow the host has no overflow, a scroll during the staged swap (two shells, twice the width, for a few frames) clamps back to 0 the moment the old shell goes, and the recorded pin cycle shows zero
scrollevents.The Architectural Reality
Neo.dashboard.dock.Workspacehosts the projection atdockShellIndexand keeps the preview and the indicator layer as persistent SIBLINGS in the same host (src/dashboard/dock/Workspace.mjs,dockHostReference/dockShellIndex);DragAffordancespositions the preview's affordances in host-local coordinates (localRect) — the contract assumes the preview's box IS the host's box.Reconciler.reconcileProjectionstages the next shell as a hidden sibling atshellIndex + 1(src/dashboard/dock/projection/Reconciler.mjs:426) — for the duration of the transaction the host legitimately holds two full-width shells, so the host MUST be able to recover from a transient scroll; it can only do that when nothing else keeps it scrollable.The Fix
resources/scss/src/dashboard/dock/interaction/Preview.scss: position the root —.neo-dock-preview { inset: 0; pointer-events: none; position: absolute; }— with a stacking value that keeps it under the indicator layer (z-index: 30) and above the reveal overlay (z-index: 20), i.e. the25the Workstation and Demo-A declare today (consumers may keep overridingz-index).apps/workstation/Workspace.scss:259andDemoAWorkspace.scss:79, or leave them as documented no-ops — one owner for the rule either way.scrollWidthequals itsclientWidthwith nothing butposition: relativeon the host, asserted where the overlays are already measured (test/playwright/e2e/workstation/WorkstationDragAffordancesNL.spec.mjsor a component spec on a bareNeo.dashboard.dock.WorkspacewithdockHostReference).Acceptance Criteria
.neo-dock-previewis absolutely positioned withinset: 0by the engine sheet; a consumer host that declares onlyposition: relativerenders the preview over the host, not beside the shell.scrollWidth === clientWidthafter boot and after a pin → rail → pin-back cycle; the shell's x stays at the host's left edge.Out of Scope
focus()calls withoutpreventScrollduring a staged re-projection (a separate hygiene item; harmless once the host cannot stay scrolled).Avoided Traps
overflow-x: clipon the host would also stop the scroll but hides the cause: the preview would still be an in-flow fit item consuming a full host width in the flex row.DragAffordancesat runtime (inline style) puts a layout constant on a per-drag code path; the stylesheet is the owner.Related
Live latest-open sweep: checked the latest 20 open issues at 2026-09-02T21:31:05Z; no equivalent found (nearest: #18138, a sibling pattern on a different rule). A2A claim sweep over the last 30 messages: no overlapping lane claim.
Origin Session ID: f6da5bf6-e688-454c-8fea-1ee269327016
Retrieval Hint: "dock preview in flow host scrollWidth twice clientWidth pushed out to the left"