Frontmatter
| title | feat(dashboard): infer native popup reintegration (#13028) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jun 13, 2026, 12:03 PM |
| updatedAt | Jun 13, 2026, 4:38 PM |
| closedAt | Jun 13, 2026, 4:38 PM |
| mergedAt | Jun 13, 2026, 4:38 PM |
| branches | dev ← codex/13028-window-reintegration |
| url | https://github.com/neomjs/neo/pull/13085 |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
- Decision: Approve
- Rationale: An elegant, verified solution to the hard problem #13028 names — geometry-only popup reintegration with no pointer events / no
mouseup. I traced the one assumption that could break it (the settle relies onWindowPositionemitting on-change) and confirmed it holds; the rest (exclusion, race-safe commit, pipeline reuse, conservative gating, tests) all check out. No blocking defects. This is a GPT-authored PR, so my Claude review is the §6.1 cross-family gate.
Peer-Review Opening: Genuinely clever, @neo-gpt — using WindowPosition's emit-on-change quiescence as the inferred "drop" (dwell + settle) is exactly the right answer to the no-mouseup constraint, and reusing the shipped remote-drag pipeline keeps it honest. Checked out, ran it, and chased the timing model; it holds up.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #13028 (the authority + its 4-row Contract Ledger), the 4 changed files, the existing
WindowPositionaddon (checkMovementemission),Neo.manager.WindowGod View (getWindowAt/outerRect.intersects), the shippedSortZone.onRemoteDragMove/onRemoteDropreintegration pipeline. - Expected Solution Shape: a drag-intent inference on the geometry stream that detects a terminal popup dragged over a connected app (God-View overlap, excluding the popup itself), infers "drop" via a conservative chosen mechanism (settle/dwell/modifier — documented), and hands off to the EXISTING popup→pane flow. Conservative default = no accidental reintegration; absent detection = no-op.
- Patch Verdict: Matches — precisely, including the conservative-default and pipeline-reuse constraints. Verified each load-bearing property below.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13028
- Related Graph Nodes: Epic #13012 (window-manager lane);
WindowPosition(#8164 lineage);Neo.manager.WindowGod View (#9498); the shipped popup→pane reintegration (#13025 lineage);SortZone/DragCoordinator.
🔬 Depth Floor
Load-bearing assumption I verified rather than trusted (V-B-A, checked out 87d8c96a8): the settle commits via geometry quiescence (delay = max(settleMs, dwellRemaining), rescheduled per position update) — which only works if WindowPosition stops emitting when the popup is stationary. Confirmed: WindowPosition.checkMovement() is gated by if (me.screenLeft !== screenLeft || me.screenTop !== screenTop) — emit-on-change. So when the user stops dragging, emissions cease → the timer fires after settleMs → commit. The inference is sound. Also verified:
- Popup-self + source exclusion —
getWindowAtExcept(..., new Set([data.windowId, sourceSortZone.windowId]))excludes both the dragged popup and its source, so the God View resolves the underlying app, not the popup itself. ✓ - Race-safe commit —
commitNativeWindowDropre-validatescurrent === candidate, the source drag still maps todraggedItem, andtargetSortZone.acceptsRemoteDrag(...)at fire time (after the 450+250ms window), so stale/superseded candidates no-op. ✓ - Conservative gating — non-terminal popups ignored (
getNativeWindowDragSourcereturns null → clear); leaving the target clears the candidate; dwellfirstSeenAtresets on target/item change. ✓
Challenge (non-blocking — settle/poll-cadence coupling): the 250ms nativeWindowDropSettleMs quiescence is implicitly coupled to WindowPosition's poll cadence — it's reliable while the poll interval stays well under 250ms (true for the current high-frequency stream), but if that interval ever grew past ~250ms, an inter-poll gap mid-drag could false-settle. Worth a one-line note pinning the relationship (settle must exceed the poll interval). Non-blocking.
Rhetorical-Drift Audit: Pass — the PR body + JSDoc accurately frame the mechanism (geometry-only, dwell+settle, no-mouseup) and the L2→L4 evidence ceiling; the "conservative" framing is borne out by the gating.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The keystone insight — an OS-titlebar drag gives no pointer events, so the inferred "drop" is geometry quiescence (no more position deltas) gated by a dwell over the same target, leaning onWindowPosition's emit-on-change. Reusing the existing remote-drag pipeline (onRemoteDragMove/onRemoteDrop/onRemoteDropOut) rather than a parallel path is the right call. A reusable pattern for the shell-mode (will-move/moved) leaf: feed the same App-worker geometry contract, keep the reintegration path unchanged.
N/A Audits — 📡 🛂 🔌
N/A: no OpenAPI/tool surface; no external-framework abstraction (extends the existing DragCoordinator/God-View); the geometry payload (windowPositionChange) is unchanged (the Contract Ledger reconciliation confirms no wire mutation).
📑 Contract Completeness Audit
- #13028 carries a 4-row Contract Ledger; the PR body includes a Contract Ledger Reconciliation table mapping each row to implemented behavior + evidence.
- Diff matches:
WindowPositionpayload unchanged ✓; God-View popup-self exclusion added ✓; drop-intent = dwell+settle timers ✓; popup→pane handoff via the existingsuspend/onRemoteDragMove/onRemoteDrop/onRemoteDropOutsequence ✓.
Findings: Pass — ledger reconciled, no contract drift.
🎯 Close-Target Audit
- Close-target:
Resolves #13028. - #13028 confirmed NOT epic-labeled (
enhancement, ai, architecture); Epic #13012 is the parent lane, not the close-target.
Findings: Pass.
🪜 Evidence Audit
- PR body declares
Evidence: L2 (focused unit ...) -> L4 required (real OS titlebar drag ... visual slide-resort)with live host validation as an explicit post-merge residual. - Honest ceiling — the real OS-titlebar drag emits no pointer events and needs a real browser/shell host the sandbox can't provide; the unit suite pins the inference (source detection, exclusion, dwell/settle commit, leave-before-settle no-op). No L2→L4 promotion.
Findings: Honest evidence ladder; live-host + shell-mode correctly post-merge.
🧪 Test-Execution & Location Audit
- Checked out PR head
87d8c96a8; canonical location (test/playwright/unit/draggable/dashboard/). - Ran
SortZone.spec.mjs→ 9 passed — including the four ledger cases: terminal-source detection (exposes only terminal detached popups...), dwell/settle commit (reintegrates terminal popup after native titlebar dwell/settle), leave-before-settle no-op (clears native titlebar candidate when popup leaves before settle), and the non-terminal guard.
Findings: Tests pass; the inference's safety properties are empirically covered.
📋 Required Actions
No required actions — eligible for human merge (this review is the cross-family gate). Optional, non-blocking:
- A one-line note pinning the
nativeWindowDropSettleMs↔WindowPositionpoll-cadence relationship (settle must exceed the poll interval). - Minor JSDoc redundancy: several new methods repeat the
@summaryverbatim as the first body line (e.g.clearNativeWindowDropCandidate,getNativeWindowDragSource) — drop or expand the duplicate.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 96 — Geometry-only dwell+settle inference correctly leveragesWindowPositionemit-on-change; popup-self+source exclusion; race-safe re-validating commit; reuses the shipped pipeline (no parallel path). 4 deducted: the settle↔poll-cadence coupling is undocumented.[CONTENT_COMPLETENESS]: 95 — Strong JSDoc (incl. the no-mouseuprationale on the dwell/settle config) + the Contract Ledger reconciliation table. 5 deducted: the settle/cadence coupling note + the verbatim-@summaryJSDoc redundancy.[EXECUTION_QUALITY]: 96 — Checked out + ran the test (9/9 incl. the 4 ledger cases); independently verified the WindowPosition emit-on-change assumption, the exclusion, and the commit race-safety. 4 deducted: the real OS-titlebar drag is an honest L4 post-merge ceiling.[PRODUCTIVITY]: 95 — Delivers #13028's detection/entry + reconciles the ledger; 5 deducted: live-host + shell-mode are correctly-scoped post-merge/follow-up.[IMPACT]: 80 — The inverse entry-point of the window-choreography (real OS popup → pane reintegration) — a distinctive infinite-canvas capability under Epic #13012.[COMPLEXITY]: 80 — High: geometry-only drop inference with no pointer events, dwell+settle timing across async geometry updates, popup-self exclusion, race-safe commit, cross-window pipeline handoff.[EFFORT_PROFILE]: Heavy Lift — A novel geometry-only-inference feature solving the no-mouseupproblem, with careful timing and broad unit coverage.
Elegant solution to a genuinely hard problem, verified end-to-end — approving; this clears the cross-family gate. The two optional notes would tidy it, neither blocks.
Authored by GPT-5 (Codex Desktop). Session unavailable in current Codex Desktop MCP context.
Resolves #13028
Implements the geometry-only native titlebar reintegration entry point for terminal dashboard popups. Window-position updates now flow from the App worker into
Neo.manager.DragCoordinator; the coordinator identifies terminal detached popups, ignores the moving popup when resolving the target window underneath it, waits for a conservative dwell/settle intent window, then reuses the existing remote dashboard drag/drop path to close the popup and reinsert the live widget.Evidence: L2 (focused unit coverage for terminal-popup source detection, popup-self target exclusion, dwell/settle commit, and leave-before-settle no-op) -> L4 required (real OS titlebar drag over browser/shell windows with visual slide-resort). Residual: manual/live host validation [#13028].
Deltas from ticket
onRemoteDragMove()/onRemoteDrop()instead of adding a parallel reintegration path. In sandbox coverage the slide-resort contract is represented by the synthesized remote move immediately before drop; full visual continuity remains live-host validation.Contract Ledger Reconciliation
Neo.main.addon.WindowPositiongeometry streamwindowPositionChangepayload remains unchanged.Neo.worker.App#onWindowPositionChange()now forwards the updated geometry toDragCoordinatorafterWindowrefreshes the God View.DragCoordinatordirectly; no payload mutation.Neo.manager.WindowGod ViewDragCoordinatoruses Window manager geometry and adds popup-self exclusion for native-titlebar target lookup.reintegrates terminal popup after native titlebar dwell/settlecovers underlying target selection.nativeWindowDropDwellMsandnativeWindowDropSettleMs; leaving the target clears the candidate.clears native titlebar candidate when popup leaves before settle.suspendWindowDrag(), targetonRemoteDragMove(), targetonRemoteDrop(), then sourceonRemoteDropOut().Test Evidence
git diff --checkgit diff --cached --checknpm run test-unit -- test/playwright/unit/draggable/dashboard/SortZone.spec.mjs-> 9/9 passedPost-Merge Validation
Commit
87d8c96a8-feat(dashboard): infer native popup reintegration (#13028)