Context
Reported by @tobiu, 2026-09-09, who also specified the required scope: right and bottom docks are both in normal use; left and top are rare. Dragging a native popup back into a Workstation window works correctly — 1.2s dwell, the drop zone fills, the view moves, the popup closes — unless Chrome DevTools is docked to a side. Then dragging in from the right makes drop zones activate while the pointer is still over the DevTools panel.
Measured on his own window, docked right, with a one-line console probe:
{trueViewportX: 64, modelSaysX: 303.5, devtoolsWidth: 479}303.5 − 64 = 239.5 = 479 / 2. The error is exactly half the DevTools width, to the pixel.
The Problem
Neo.manager.Window#calculateGeometry (src/manager/Window.mjs:74) derives the viewport origin from the frame origin by splitting the frame/viewport difference across assumed window borders:
widthDiff = outerWidth - innerWidth,
sideBorder = widthDiff / 2,
bottomBorder = sideBorder,
topChrome = heightDiff - bottomBorder;
Both assumptions describe OS window borders. A docked DevTools panel is not a border: it consumes innerWidth on one side while outerWidth is unchanged. The split then invents widthDiff / 2 of phantom border on each side and subtracts the same amount from the title-bar height.
Run through the real function — a 1600×1000 macOS Chrome frame at (100, 50), with the browser's own 87px of top chrome, and the truth computed independently of the model (viewport = frame top + 87, plus the panel only when the panel is on that edge):
| dock |
model origin |
true origin |
error |
| none |
(100, 137) |
(100, 137) |
OK |
| right 479 |
(339.5, −102.5) |
(100, 137) |
(+239.5, −239.5) |
| bottom 400 |
(100, 537) |
(100, 137) |
(0, +400) — the whole panel height |
| left 479 |
(339.5, −102.5) |
(579, 137) |
(−239.5, −239.5) |
| top 400 |
(100, 537) |
(100, 537) |
OK |
The unifying statement, and the reason no case analysis will fix this: the split is only ever right when the entire frame/viewport difference genuinely sits above the viewport. That holds with no DevTools and, coincidentally, with a top dock — the code puts all leftover height into topChrome, which is correct exactly when the panel really is on top. Every other dock position is wrong.
Three consequences worth stating precisely:
- The viewport SIZE is correct in every row. Only the origin is wrong. The fix is a one-place origin correction, not a re-model.
- A bottom dock is wrong by the full panel height, not half. The modeled viewport spans y 537–1050 while the real one spans 137–650 — i.e. the model places the viewport exactly where the DevTools panel is. The reported symptom is the right-dock case only because that is the direction the drag comes from; the bottom case produces the same class of false zone activation along the bottom edge.
- Left and right are indistinguishable to the model — both produce origin (339.5, −102.5) — while their truths differ by the panel width. No clamping scheme can separate them, because the inputs are identical.
The Architectural Reality
- The signal already arrives.
src/dashboard/dock/Workspace.mjs:1114 observeWindowGeometry arms observeMovement and observeResize for the host's own first real window binding and for every admitted vessel (#18077 added the resize listener at src/main/addon/WindowPosition.mjs:126). Docking DevTools fires window.resize, publishGeometry() sends a fresh getWindowData() snapshot, and manager.Window#onWindowPositionChange recomputes. This is not a detection gap.
- Where it manifests:
src/manager/DragCoordinator.mjs:1104-1105 computes localX = screenX - targetWindow.innerRect.x (same shape at :897 and :1008). A viewport origin 240px too far right maps every screen point 240px too far left in page space, so a pointer physically over DevTools lands on live page content near the right edge.
getWindowAt is innocent. src/manager/Window.mjs:55 hit-tests outerRect, which legitimately contains the DevTools strip — it is inside the OS window. The error is purely the page-space mapping.
- The consumers that read
innerRect for its size are also innocent: DragAffordances#getGeometrySignature (:209) and Participation#defaultHitTest (:457) use width/height only, and those are correct.
- Firefox already takes the exact route.
calculateGeometry:99 branches on mozInnerScreenX, which publishes the viewport origin directly. Chrome has no such property — but it has an exact measurement, below.
- Predecessor: #18058 made
screenLeft/screenTop the frame origin, which is what made this split load-bearing for hit-tests. That ticket is complete and correct; this is the assumption it left standing, now falsified with a real case. This is an unmasking, not a regression, and carries no Resolves for it.
The Fix
For any pointer event, event.screenX - event.clientX is the viewport's screen-space left origin and event.screenY - event.clientY its top — by definition, with no assumption about borders, dock side, platform, or menu bar. git grep confirms nothing in the tree uses this today. A cross-window drag is pointer-driven, so samples are abundant exactly when this matters.
src/main/addon/WindowPosition.mjs measures it. The addon is already in the mouse-event business (:91 registers mouseout). Arm a one-shot pointermove listener that records the origin and removes itself; re-arm it from onResize, so a DevTools dock/undock/re-dock recalibrates on the next pointer motion. No poll, no permanent listener.
- The measured origin reaches the worker the way native effects already do — a main-thread stash read by
Main#getWindowData (src/Main.mjs:326 reads win.neoNativeGeometryEffects in exactly this shape).
calculateGeometry prefers the measured origin when present, alongside the existing mozInnerScreenX branch, and falls back to today's split when a window has never seen a pointer. Additive: a window with no sample behaves exactly as it does now.
Contract Ledger Matrix
| Target surface |
Source of authority |
Proposed behavior |
Fallback |
Docs |
Evidence |
Neo.manager.Window#calculateGeometry |
CSSOM View: MouseEvent.screenX/clientX |
Prefers a measured viewport origin; keeps the Firefox mozInnerScreenX branch ahead of it |
The current symmetric split, unchanged, when no sample exists |
Method docblock states which of the three sources answered |
Unit arms over all three source paths, incl. the measured table above |
Main#getWindowData payload (src/Main.mjs:316) |
Existing neoNativeGeometryEffects stash idiom |
Adds an optional measured-origin field; absent until a pointer sample lands |
Field absent ⇒ consumers see today's payload |
JSDoc on the new field |
A payload assertion with and without a sample |
WindowPosition (src/main/addon/WindowPosition.mjs) |
Its existing mouseout / resize listeners |
One-shot pointer calibration, re-armed by onResize |
observeResize: false ⇒ no calibration, as today |
Config + method docblocks |
A resize re-arms; a second pointer event after calibration adds no listener |
Acceptance Criteria
Out of Scope
Any change to getWindowAt or outerRect semantics; #18058's frame-origin decision; the DevTools panel's own size as a reportable quantity (no web API exposes it, and the fix does not need it); the drag dwell timer and drop-zone rendering; the stray console.log at src/manager/Window.mjs:146, which is a separate defect-note.
Avoided Traps
Do not replace the symmetric assumption with a different assumption. A left dock and a right dock produce byte-identical inputs to calculateGeometry (both outerWidth − innerWidth = 479), so no clamping, heuristic or side-guess can separate them — the information is not in the payload. Only a measurement carries it. Do not attach a permanent pointermove listener on every window. Do not assume screenX - clientX is exact under browser page zoom: clientX is page CSS px, screenX screen CSS px, so the value must be sanity-bounded against the frame rather than trusted blindly. Do not derive the panel width from outerWidth - innerWidth and attribute it to a guessed side.
Decision Record impact
aligned-with ADR 0029 — no engine host, Group, projection or native-window contract changes. calculateGeometry gains a preferred input; its output contract is unchanged.
Sweeps
- (i) Live latest-open: latest 15 open read 2026-09-09T18:10:32Z (created-desc); no equivalent. Nearest is #18532 (native vessel footprint witness), a different surface.
- (ii) A2A in-flight claims: mailbox scanned this session; open claims are #18478 (@neo-opus-grace) and #18479 (@neo-opus-ada). No claim here.
- (iii) Memory Core:
manager-window-rects-refresh-only-on-position-change is the prior art and is superseded on its engine half by #18077 — re-verified against the tree before filing, which is what established that the resize signal already arrives and moved the diagnosis to the derivation.
- (iv) Own assignments: #18460, #18532, #17918, #16212 — bodies read; no overlap.
- Duplicate:
devtools OR "viewport origin" OR "chrome split" OR calculateGeometry across all states returns #18058 (closed, the predecessor) and nothing open.
Related
Predecessor: #18058 · Unmasked by: #18068 · Signal added by: #18077 · Related: #18303 · #18304
Origin Session ID: 206b8400-7fe8-472e-8018-446e550b784b
Retrieval Hint: "docked DevTools symmetric chrome split phantom side border, viewport origin from screenX minus clientX"
Context
Reported by @tobiu, 2026-09-09, who also specified the required scope: right and bottom docks are both in normal use; left and top are rare. Dragging a native popup back into a Workstation window works correctly — 1.2s dwell, the drop zone fills, the view moves, the popup closes — unless Chrome DevTools is docked to a side. Then dragging in from the right makes drop zones activate while the pointer is still over the DevTools panel.
Measured on his own window, docked right, with a one-line console probe:
{trueViewportX: 64, modelSaysX: 303.5, devtoolsWidth: 479}303.5 − 64 = 239.5 = 479 / 2. The error is exactly half the DevTools width, to the pixel.The Problem
Neo.manager.Window#calculateGeometry(src/manager/Window.mjs:74) derives the viewport origin from the frame origin by splitting the frame/viewport difference across assumed window borders:widthDiff = outerWidth - innerWidth, // Assumption: Side borders are symmetric sideBorder = widthDiff / 2, // Assumption: Bottom border matches side border (common in Windows) bottomBorder = sideBorder, topChrome = heightDiff - bottomBorder;Both assumptions describe OS window borders. A docked DevTools panel is not a border: it consumes
innerWidthon one side whileouterWidthis unchanged. The split then inventswidthDiff / 2of phantom border on each side and subtracts the same amount from the title-bar height.Run through the real function — a 1600×1000 macOS Chrome frame at (100, 50), with the browser's own 87px of top chrome, and the truth computed independently of the model (viewport = frame top + 87, plus the panel only when the panel is on that edge):
The unifying statement, and the reason no case analysis will fix this: the split is only ever right when the entire frame/viewport difference genuinely sits above the viewport. That holds with no DevTools and, coincidentally, with a top dock — the code puts all leftover height into
topChrome, which is correct exactly when the panel really is on top. Every other dock position is wrong.Three consequences worth stating precisely:
The Architectural Reality
src/dashboard/dock/Workspace.mjs:1114observeWindowGeometryarmsobserveMovementandobserveResizefor the host's own first real window binding and for every admitted vessel (#18077 added theresizelistener atsrc/main/addon/WindowPosition.mjs:126). Docking DevTools fireswindow.resize,publishGeometry()sends a freshgetWindowData()snapshot, andmanager.Window#onWindowPositionChangerecomputes. This is not a detection gap.src/manager/DragCoordinator.mjs:1104-1105computeslocalX = screenX - targetWindow.innerRect.x(same shape at:897and:1008). A viewport origin 240px too far right maps every screen point 240px too far left in page space, so a pointer physically over DevTools lands on live page content near the right edge.getWindowAtis innocent.src/manager/Window.mjs:55hit-testsouterRect, which legitimately contains the DevTools strip — it is inside the OS window. The error is purely the page-space mapping.innerRectfor its size are also innocent:DragAffordances#getGeometrySignature(:209) andParticipation#defaultHitTest(:457) usewidth/heightonly, and those are correct.calculateGeometry:99branches onmozInnerScreenX, which publishes the viewport origin directly. Chrome has no such property — but it has an exact measurement, below.screenLeft/screenTopthe frame origin, which is what made this split load-bearing for hit-tests. That ticket is complete and correct; this is the assumption it left standing, now falsified with a real case. This is an unmasking, not a regression, and carries noResolvesfor it.The Fix
For any pointer event,
event.screenX - event.clientXis the viewport's screen-space left origin andevent.screenY - event.clientYits top — by definition, with no assumption about borders, dock side, platform, or menu bar.git grepconfirms nothing in the tree uses this today. A cross-window drag is pointer-driven, so samples are abundant exactly when this matters.src/main/addon/WindowPosition.mjsmeasures it. The addon is already in the mouse-event business (:91registersmouseout). Arm a one-shotpointermovelistener that records the origin and removes itself; re-arm it fromonResize, so a DevTools dock/undock/re-dock recalibrates on the next pointer motion. No poll, no permanent listener.Main#getWindowData(src/Main.mjs:326readswin.neoNativeGeometryEffectsin exactly this shape).calculateGeometryprefers the measured origin when present, alongside the existingmozInnerScreenXbranch, and falls back to today's split when a window has never seen a pointer. Additive: a window with no sample behaves exactly as it does now.Contract Ledger Matrix
Neo.manager.Window#calculateGeometryMouseEvent.screenX/clientXmozInnerScreenXbranch ahead of itMain#getWindowDatapayload (src/Main.mjs:316)neoNativeGeometryEffectsstash idiomWindowPosition(src/main/addon/WindowPosition.mjs)mouseout/resizelistenersonResizeobserveResize: false⇒ no calibration, as todayAcceptance Criteria
calculateGeometryreturns that origin verbatim and deriveschromefrom it. Asserted against all five rows of the table in The Problem — including thetopChromesign for a side dock and the full-height error for a bottom dock. Right and bottom are the required cases (@tobiu, 2026-09-09: both are in normal use); left and top must not regress and fall out of the same measurement for free.calculateGeometryreturns byte-identical output to currentdevfor the same input. The regression arm pins the no-DevTools row — the only configuration that is correct today for a non-coincidental reason.mozInnerScreenXbranch keeps priority over the measured origin; an arm supplies both and asserts the Firefox value wins.onResizere-arms it. A permanently attachedpointermoveon every window is a rejected shape.DragCoordinator's screen→local conversion is proven end to end at the model level: given a DevTools-shaped window report, a screen point over the panel maps outside the viewport andacceptsRemoteDragis not consulted. Mutation-proven — reverting the origin preference reddens it.Out of Scope
Any change to
getWindowAtorouterRectsemantics; #18058's frame-origin decision; the DevTools panel's own size as a reportable quantity (no web API exposes it, and the fix does not need it); the drag dwell timer and drop-zone rendering; the strayconsole.logatsrc/manager/Window.mjs:146, which is a separate defect-note.Avoided Traps
Do not replace the symmetric assumption with a different assumption. A left dock and a right dock produce byte-identical inputs to
calculateGeometry(bothouterWidth − innerWidth = 479), so no clamping, heuristic or side-guess can separate them — the information is not in the payload. Only a measurement carries it. Do not attach a permanentpointermovelistener on every window. Do not assumescreenX - clientXis exact under browser page zoom:clientXis page CSS px,screenXscreen CSS px, so the value must be sanity-bounded against the frame rather than trusted blindly. Do not derive the panel width fromouterWidth - innerWidthand attribute it to a guessed side.Decision Record impact
aligned-with ADR 0029— no engine host, Group, projection or native-window contract changes.calculateGeometrygains a preferred input; its output contract is unchanged.Sweeps
manager-window-rects-refresh-only-on-position-changeis the prior art and is superseded on its engine half by #18077 — re-verified against the tree before filing, which is what established that the resize signal already arrives and moved the diagnosis to the derivation.devtools OR "viewport origin" OR "chrome split" OR calculateGeometryacross all states returns #18058 (closed, the predecessor) and nothing open.Related
Predecessor: #18058 · Unmasked by: #18068 · Signal added by: #18077 · Related: #18303 · #18304
Origin Session ID: 206b8400-7fe8-472e-8018-446e550b784b
Retrieval Hint: "docked DevTools symmetric chrome split phantom side border, viewport origin from screenX minus clientX"