Context
@tobiu, 2026-09-26: in the Fleet Manager's Electron shell, neither dragging a tab out of the window nor the tab header's pop-out action opens a window. Both work in apps/workstation in Chrome.
The cause is a gap between two contracts that each look correct on their own:
- The engine.
Neo.Main.windowOpen (src/Main.mjs) opens a same-origin popup at about:blank first. It writes the child's one-time route into the blank realm's sessionStorage, then calls location.replace() onto the real URL. Without this, the child's getWindowData() handshake races the write. The staging landed on 2026-07-19 in #15573.
- The shell. ADR 0034 §2.3.2 lets
setWindowOpenHandler allow "only same-origin harness URLs (an explicit origin/path allowlist)", and neomjs/neo-agent-institution's harness/contentPolicy.mjs#isHarnessDocumentUrl implements exactly that. about:blank is not on the list, so the shell denies it. window.open returns null, and windowOpen resolves false. Every vessel admission then refuses by design, silently.
The ADR's falsifier sends a widened window allowlist here first: "it never … widens the window allowlist … as a leaf-local decision".
The Problem
§2.2 C3 names Neo.Main.windowOpen as the owner of the popup's window.open. §2.3.2 then admits only the popup's final document, not the realm the owner actually opens. The shell's own smoke still passes because its popup probe calls window.open(APP_URL) with the final URL and never takes the staged path. It was proven on 2026-07-10, nine days before the staging existed.
The Architectural Reality
learn/agentos/decisions/0034-electron-shell-architecture.md §2.2 C3 (the popup row) and §2.3.2 (the fail-closed window policy).
src/Main.mjs#windowOpen: window.open(stagedUrl ? 'about:blank' : url, …), then the sessionStorage route write, then location.replace(stagedUrl).
harness/main.mjs#configureWebContents (Institution dev@4ce50eb): setWindowOpenHandler → isHarnessDocumentUrl, and will-navigate → isHarnessDocumentUrl. isTrustedIpcSender also requires a harness document, so the preload's capabilities refuse an about:blank sender.
Measured on Electron 43.1.0 (the shell's pin), with a minimal mirror of the shell's handlers and the real contentPolicy.mjs:
- With today's policy:
open-handler url=about:blank → deny, window.open → null.
- With
about:blank admitted: will-navigate fires for the opener's location.replace and admits the widget document, and the child's sessionStorage holds the staged route.
- A staged realm replaced onto
https://example.com/ is prevented by will-navigate and stays blank.
The Fix
Amend §2.3.2, and point the §2.2 C3 popup row at it:
- The window policy admits exactly one realm that is not a document:
about:blank, the staging realm Neo.Main.windowOpen opens before a same-origin popup's route-bearing navigation.
- That realm carries no content of its own. The preload's capabilities refuse it, because §2.3.4 validates the sender document.
- Its only exit is
will-navigate onto an allowlisted document, which is unchanged.
- Name the coupling explicitly: the shell's popup admission follows the engine's staging contract, so a change to either one re-reads the other.
Acceptance Criteria
Out of Scope
- The shell change itself:
isHarnessPopupUrl, the handler swap, and the smoke going through Neo.Main.windowOpen. That is neomjs/neo-agent-institution#229.
- Changing the engine's staging. It fixes a real handshake race, and the shell adapts to the engine contract, not the reverse.
Avoided Traps
- Skipping the staging for Electron in the engine. That reintroduces the connected-but-authority-less popup (
#15573), and it puts shell policy inside the Body.
- Admitting every
about: URL. Only about:blank is the staging realm. about:srcdoc and variants of about:blank with a fragment or query stay denied.
Decision Record impact
amends ADR 0034 §2.3.2, plus the §2.2 C3 popup row.
Related
#15573 introduced the staging (feat(dashboard): embody live tear-out vessels).
#19228 / #19233 are precedent §2.3 amendments for the same shell.
Sweeps: live latest-open sweep over neo + Institution at 2026-09-26T07:24Z (no equivalent); gh search issues --owner neomjs "about:blank" and "tear-out shell" (closed engine tickets only); the MC rationale sweep found no prior decision on admitting about:blank. The A2A in-flight sweep shows only @neo-fable-clio's lane offer for this defect, accepted by me.
Origin Session ID: 81d1894c-d8fd-4192-8350-42e32eb0101e
Retrieval Hint: "shell setWindowOpenHandler denies the engine's about:blank staged popup"
Context
@tobiu, 2026-09-26: in the Fleet Manager's Electron shell, neither dragging a tab out of the window nor the tab header's pop-out action opens a window. Both work in
apps/workstationin Chrome.The cause is a gap between two contracts that each look correct on their own:
Neo.Main.windowOpen(src/Main.mjs) opens a same-origin popup atabout:blankfirst. It writes the child's one-time route into the blank realm'ssessionStorage, then callslocation.replace()onto the real URL. Without this, the child'sgetWindowData()handshake races the write. The staging landed on 2026-07-19 in#15573.setWindowOpenHandlerallow "only same-origin harness URLs (an explicit origin/path allowlist)", and neomjs/neo-agent-institution'sharness/contentPolicy.mjs#isHarnessDocumentUrlimplements exactly that.about:blankis not on the list, so the shell denies it.window.openreturnsnull, andwindowOpenresolvesfalse. Every vessel admission then refuses by design, silently.The ADR's falsifier sends a widened window allowlist here first: "it never … widens the window allowlist … as a leaf-local decision".
The Problem
§2.2 C3 names
Neo.Main.windowOpenas the owner of the popup'swindow.open. §2.3.2 then admits only the popup's final document, not the realm the owner actually opens. The shell's own smoke still passes because its popup probe callswindow.open(APP_URL)with the final URL and never takes the staged path. It was proven on 2026-07-10, nine days before the staging existed.The Architectural Reality
learn/agentos/decisions/0034-electron-shell-architecture.md§2.2 C3 (the popup row) and §2.3.2 (the fail-closed window policy).src/Main.mjs#windowOpen:window.open(stagedUrl ? 'about:blank' : url, …), then thesessionStorageroute write, thenlocation.replace(stagedUrl).harness/main.mjs#configureWebContents(Institution dev@4ce50eb):setWindowOpenHandler→isHarnessDocumentUrl, andwill-navigate→isHarnessDocumentUrl.isTrustedIpcSenderalso requires a harness document, so the preload's capabilities refuse anabout:blanksender.Measured on Electron 43.1.0 (the shell's pin), with a minimal mirror of the shell's handlers and the real
contentPolicy.mjs:open-handler url=about:blank → deny,window.open → null.about:blankadmitted:will-navigatefires for the opener'slocation.replaceand admits the widget document, and the child'ssessionStorageholds the staged route.https://example.com/is prevented bywill-navigateand stays blank.The Fix
Amend §2.3.2, and point the §2.2 C3 popup row at it:
about:blank, the staging realmNeo.Main.windowOpenopens before a same-origin popup's route-bearing navigation.will-navigateonto an allowlisted document, which is unchanged.Acceptance Criteria
about:blankstaging admission and its three bounds: no content, capability-refused, and awill-navigate-only exit.window.openopens is the staging realm, and points at §2.3.2.Out of Scope
isHarnessPopupUrl, the handler swap, and the smoke going throughNeo.Main.windowOpen. That is neomjs/neo-agent-institution#229.Avoided Traps
#15573), and it puts shell policy inside the Body.about:URL. Onlyabout:blankis the staging realm.about:srcdocand variants ofabout:blankwith a fragment or query stay denied.Decision Record impact
amends ADR 0034§2.3.2, plus the §2.2 C3 popup row.Related
#15573introduced the staging (feat(dashboard): embody live tear-out vessels).#19228/#19233are precedent §2.3 amendments for the same shell.Sweeps: live latest-open sweep over neo + Institution at 2026-09-26T07:24Z (no equivalent);
gh search issues --owner neomjs "about:blank"and"tear-out shell"(closed engine tickets only); the MC rationale sweep found no prior decision on admittingabout:blank. The A2A in-flight sweep shows only @neo-fable-clio's lane offer for this defect, accepted by me.Origin Session ID: 81d1894c-d8fd-4192-8350-42e32eb0101e Retrieval Hint: "shell setWindowOpenHandler denies the engine's about:blank staged popup"