Context
Design authority: two summaries in the engine. Neo.canvas.GraphScene says "a primary-button drag orbits" (src/canvas/GraphScene.mjs:83), and Neo.canvas.Base#onMouseDown says "a button went down on the canvas … so a drag gesture starts here" (src/canvas/Base.mjs:187). Both describe a gesture that starts with a press on the canvas.
Observed on 2026-11-11 in the design read of neomjs/neo-agent-institution#911. The Institution's visual arm the side panel is as wide as the operator drags it widens the Observatory's side panel with a real mouse drag on a splitter that sits beside the canvas. Its re-captured golden showed the graph rotated and one well name gone.
Witness (Institution dev 6f00d3d, engine 0baab546, Chromium, the arm's own gesture: press on the splitter, 200 px left in 8 steps, release):
6 of the 8 button-held mousemove events target the canvas, with a movementX sum of −150 px. The panel resizes one round trip after the pointer moves, so the pointer runs ahead of the splitter onto the canvas. At orbitSpeed 0.006 that is 0.9 rad of yaw.
The pane before the drag and the pane after dragging 200 px left and 200 px back, at the same size again, differ in 21,469 pixels, and the well name "REM digests the backlog before the next cut" is gone. The camera kept the rotation.
Live latest-open + closed sweep: checked latest 20 open (34 open, orange band; #20770..#20694) + closed search (GraphScene orbit drag pointer, Out of Scope read on #19305 and #19261) at 2026-11-11T10:55Z; no equivalent. #19305 leaves the orbit rule out of its own scope and rules nothing about it. No open ticket or epic owns src/canvas (open search GraphScene: only #20695, an examples overview).
A2A in-flight claim sweep: the newest messages across all read states from 10:01Z to 10:47Z on 2026-11-11; no overlapping [lane-claim] or [lane-intent].
MC sweep: not run from this seat. A Fable seat reads no memory rows until the plane carries the fix of neomjs/neo-agent-brain#1580. A Knowledge Base ticket query on the symptom returned no GraphScene ticket.
Own-assignment sweep: 3 open in this repository (#20726, #20682, #20498), none on this surface.
The Problem
GraphScene#updateMouseState orbits on every pointer report that carries the primary button and a movement. It never asks whether the press happened on its own canvas. A press on a neighbouring control that is then dragged across the canvas turns the scene: a splitter, a drag-and-drop item, a text selection that runs over the canvas.
The same report sets camera.touched and clears flightPlan. After such a drag the camera no longer re-fits to a new scene or a resized surface, and a running flight ends.
For the person in front of it: widening a panel beside a graph rotates the graph.
The Architectural Reality
Neo.app.SharedCanvas forwards down, up, moves and leave to renderer.updateMouseState, each with the event's buttons (src/app/SharedCanvas.mjs:372-438).
Neo.canvas.Base#updateMouseState copies buttons from every report into mouse and calls onMouseDown / onMouseUp for down / up (src/canvas/Base.mjs:266-300). mouse.buttons is the state of the device, not of this canvas.
Neo.canvas.GraphScene#updateMouseState (src/canvas/GraphScene.mjs:1371-1383): (mouse.buttons & 1) && (mouse.dx || mouse.dy) adds to camera.yaw and camera.pitch, sets camera.touched and clears flightPlan.
- A
leave resets mouse to idle. The first report after it moves by nothing, and the next one orbits again while a button is held.
- Spec surface:
test/playwright/unit/canvas/PointerInput.spec.mjs (the base's pointer contract) and test/playwright/unit/canvas/GraphScene.spec.mjs (the camera).
The Fix
The orbit belongs to a press the canvas received. Neo.canvas.Base is where "a drag gesture starts here" is written, so the base holds that fact: the buttons whose press reached this canvas and has not ended. It is set in updateMouseState before onMouseDown runs. It ends on up, on leave, and on a report whose buttons no longer carry the button. GraphScene orbits on that state instead of on mouse.buttons.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Neo.canvas.Base#mouse (one new key: the buttons pressed on this canvas) |
The summary of Base#onMouseDown |
Holds a button from its down report until up, leave, or a report without it |
None |
The member's JSDoc, and the summaries of onMouseDown and onMouseUp |
PointerInput.spec.mjs |
Neo.canvas.GraphScene#updateMouseState |
The class summary: "a primary-button drag orbits" |
Orbits only for a primary press this canvas received. A held move without one changes neither the camera nor camera.touched nor flightPlan |
None |
The method summary |
GraphScene.spec.mjs |
Decision Record impact
none
Acceptance Criteria
Out of Scope
- Pointer capture, so that an orbit continues while the pointer is outside the canvas.
- Touch gestures.
- The Institution's splitter. It resizes correctly; a pointer that runs ahead of a splitter is how splitters behave.
Avoided Traps
- Fixing it in the app, by having the canvas host drop
buttons unless it saw the press: every GraphScene consumer has the same neighbours, and each app would write the base's contract again.
- Slowing the test's drag until no move lands on the canvas: the arm turns green and hands still hit it.
- What the rule also did: it carried an orbit back onto the canvas after the pointer had left with the button held. That stops, because the leave ends the press. Pointer capture is the way to keep such a drag, and it is out of scope here.
Related
- Related: #19305, #19261, #20286, neomjs/neo-agent-institution#911, neomjs/neo-agent-institution#505
Ownership: unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 51b4c06b-5ef9-47cf-91bb-c025cafbdbf0
Retrieval Hint: "GraphScene orbit primary button held move without press on canvas splitter drag camera.touched"
Context
Design authority: two summaries in the engine.
Neo.canvas.GraphScenesays "a primary-button drag orbits" (src/canvas/GraphScene.mjs:83), andNeo.canvas.Base#onMouseDownsays "a button went down on the canvas … so a drag gesture starts here" (src/canvas/Base.mjs:187). Both describe a gesture that starts with a press on the canvas.Observed on 2026-11-11 in the design read of neomjs/neo-agent-institution#911. The Institution's visual arm
the side panel is as wide as the operator drags itwidens the Observatory's side panel with a real mouse drag on a splitter that sits beside the canvas. Its re-captured golden showed the graph rotated and one well name gone.Witness (Institution
dev6f00d3d, engine0baab546, Chromium, the arm's own gesture: press on the splitter, 200 px left in 8 steps, release):6 of the 8 button-held
mousemoveevents target the canvas, with amovementXsum of −150 px. The panel resizes one round trip after the pointer moves, so the pointer runs ahead of the splitter onto the canvas. AtorbitSpeed0.006 that is 0.9 rad of yaw.The pane before the drag and the pane after dragging 200 px left and 200 px back, at the same size again, differ in 21,469 pixels, and the well name "REM digests the backlog before the next cut" is gone. The camera kept the rotation.
Live latest-open + closed sweep: checked latest 20 open (34 open, orange band;
#20770..#20694) + closed search (GraphScene orbit drag pointer, Out of Scope read on#19305and#19261) at 2026-11-11T10:55Z; no equivalent.#19305leaves the orbit rule out of its own scope and rules nothing about it. No open ticket or epic ownssrc/canvas(open searchGraphScene: only#20695, an examples overview).A2A in-flight claim sweep: the newest messages across all read states from 10:01Z to 10:47Z on 2026-11-11; no overlapping
[lane-claim]or[lane-intent].MC sweep: not run from this seat. A Fable seat reads no memory rows until the plane carries the fix of neomjs/neo-agent-brain#1580. A Knowledge Base ticket query on the symptom returned no GraphScene ticket.
Own-assignment sweep: 3 open in this repository (
#20726,#20682,#20498), none on this surface.The Problem
GraphScene#updateMouseStateorbits on every pointer report that carries the primary button and a movement. It never asks whether the press happened on its own canvas. A press on a neighbouring control that is then dragged across the canvas turns the scene: a splitter, a drag-and-drop item, a text selection that runs over the canvas.The same report sets
camera.touchedand clearsflightPlan. After such a drag the camera no longer re-fits to a new scene or a resized surface, and a running flight ends.For the person in front of it: widening a panel beside a graph rotates the graph.
The Architectural Reality
Neo.app.SharedCanvasforwardsdown,up, moves andleavetorenderer.updateMouseState, each with the event'sbuttons(src/app/SharedCanvas.mjs:372-438).Neo.canvas.Base#updateMouseStatecopiesbuttonsfrom every report intomouseand callsonMouseDown/onMouseUpfordown/up(src/canvas/Base.mjs:266-300).mouse.buttonsis the state of the device, not of this canvas.Neo.canvas.GraphScene#updateMouseState(src/canvas/GraphScene.mjs:1371-1383):(mouse.buttons & 1) && (mouse.dx || mouse.dy)adds tocamera.yawandcamera.pitch, setscamera.touchedand clearsflightPlan.leaveresetsmouseto idle. The first report after it moves by nothing, and the next one orbits again while a button is held.test/playwright/unit/canvas/PointerInput.spec.mjs(the base's pointer contract) andtest/playwright/unit/canvas/GraphScene.spec.mjs(the camera).The Fix
The orbit belongs to a press the canvas received.
Neo.canvas.Baseis where "a drag gesture starts here" is written, so the base holds that fact: the buttons whose press reached this canvas and has not ended. It is set inupdateMouseStatebeforeonMouseDownruns. It ends onup, onleave, and on a report whosebuttonsno longer carry the button.GraphSceneorbits on that state instead of onmouse.buttons.Contract Ledger Matrix
Neo.canvas.Base#mouse(one new key: the buttons pressed on this canvas)Base#onMouseDowndownreport untilup,leave, or a report without itonMouseDownandonMouseUpPointerInput.spec.mjsNeo.canvas.GraphScene#updateMouseStatecamera.touchednorflightPlanGraphScene.spec.mjsDecision Record impact
noneAcceptance Criteria
buttons: 1and nodown:camera.yaw,camera.pitch,camera.touchedandflightPlanstay as they were. The arm is red ondevbefore the change.up, afterleave, and after a report withbuttons: 0, a later held move without a new press does not orbit.PointerInput.spec.mjswitnesses the base's new key through the same transitions.Out of Scope
Avoided Traps
buttonsunless it saw the press: everyGraphSceneconsumer has the same neighbours, and each app would write the base's contract again.Related
Ownership: unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 51b4c06b-5ef9-47cf-91bb-c025cafbdbf0 Retrieval Hint: "GraphScene orbit primary button held move without press on canvas splitter drag camera.touched"