Context
When Workstation cold-boots with a saved vessel workspace (apps/workstation/view/VesselWorkspace.mjs:253 → createPopupWorkspace(..., {committed: true, windowId: null})) or detaches a closed popup window while retaining its Group participant (src/dashboard/dock/Workspace.mjs:1091-1094 / apps/workstation/view/PopupWorkspace.mjs:260-261 → this.parent?.remove(this, false, true); this.windowId = null), the Workspace is unmounted (mounted: false), parentless (parent: null), and windowless (windowId: null).
Any Group commit or projectDockZoneDocument call against that headless Workspace (cold-hydrate, Reset to default, Undo, transferItem) hangs refreshPromise and projectionCycle.adoption indefinitely inside await host.promiseUpdate().
Curated labels (good first issue, help wanted) are omitted because this is an active maintainer lane on Neo.dashboard.dock.Workspace claimed immediately.
The Problem
In src/dashboard/dock/Workspace.mjs:2688-2696:
Neo.currentWorker?.isWindowDeparted?.(host.windowId) returns false when host.windowId is null (src/worker/Base.mjs:433).
refreshDockWorkspace falls into if (!host.mounted) await host.promiseUpdate().
- Under active VDOM updates (
!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests), VdomLifecycle#updateVdom (src/mixin/VdomLifecycle.mjs:1480-1509) registers {resolve, reject} in VDomUpdate.promiseCallbackMap[host.id] and either parks on needsVdomUpdate = true (!vnodeInitialized) or waits on mountedPromise.
- While the workspace remains headless (e.g. a saved vessel window that is never reopened, or across
cold-hydrate followed by Reset to default), refreshPromise never settles, projectionCycle.adoption never resolves to null, subsequent cycles stall at queuedAt without startedAt, and VDomUpdate.promiseCallbackMap retains an orphaned callback entry. If multiple non-Group projections queue before a later mount, the first stale projection also wakes and reconciles before its successor instead of coalescing.
The Architectural Reality
src/dashboard/dock/Workspace.mjs:2052-2080: afterSetMounted(true) already owns deferred replay of me.departedProjection via me.chainProjection(parked).
src/dashboard/dock/Workspace.mjs:2688-2691: #20017 (4763bcb8f9) parks {document, refreshOptions, tabInsertDescriptor} in me.departedProjection when isWindowDeparted(host.windowId) is true, letting Cycle#run's .finally(() => me.adopt(null)) (src/dashboard/dock/projection/Cycle.mjs:99) settle adoption with null.
src/mixin/VdomLifecycle.mjs:1462: unit tests with allowVdomUpdatesInTests: false (test/playwright/unit/dashboard/DockWorkspace.spec.mjs:195-240) exercise in-memory component reconciliation on standalone unmounted workspaces (windowId: null, parent: null) where promiseUpdate() resolves synchronously as a no-op. Note that an unadopted component defaults parentId to 'document.body' (parent: null), whereas a mounting workspace inside a window's Viewport carries a live parent container and/or windowId.
Design authority: "A headless Workspace owns no visible tree before binding. Once mounted, an absent shell at {@link #dockShellIndex} enters the ordinary committed-document refresh" (src/dashboard/dock/Workspace.mjs:2055-2057) and "a cycle that is skipped, superseded, destroyed or repaired settles it with null, and the refresh stays the gate" (src/dashboard/dock/projection/Cycle.mjs:13-14).
Decision Record impact: none.
The Fix
In Neo.dashboard.dock.Workspace#refreshDockWorkspace (src/dashboard/dock/Workspace.mjs:2688):
- Treat an unmounted, parentless, windowless host under active VDOM updates (
!host.mounted && !host.windowId && !host.parent && (!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests)) identically to Neo.currentWorker?.isWindowDeparted?.(host.windowId): store {document, refreshOptions, tabInsertDescriptor} in me.departedProjection and return immediately.
- When the headless workspace later binds and mounts into a container/window,
afterSetMounted(true) replays the newest parked departedProjection once through chainProjection.
Acceptance Criteria
Out of Scope
- Changing
VdomLifecycle#updateVdom semantics for components actively mounting inside a parent container.
- The Ubuntu-only
WorkstationBoot.spec.mjs:273 workstation-main Reset render-stall race (#21209), where workstation-main is already mounted with a live windowId.
Avoided Traps
- Checking
!host.windowId unconditionally without (!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests) and !host.mounted && !host.parent would skip in-memory reconciliation in standalone unit specs (DockWorkspace.spec.mjs:195) or skip initial mount ordering when a workspace is already attached to a mounting parent container.
- Checking
!host.parentId instead of !host.parent misses freshly constructed headless workspaces whose default parentId is 'document.body' (host.parent === null).
Related
#20017 / PR #20032 (4763bcb8f9 — introduced departedProjection for isWindowDeparted(host.windowId))
#20152 / PR #20160 (PopupWorkspace native detach lifecycle)
Live latest-open + closed sweep: checked latest 20 open (61 open, red band) + open and closed search (PopupWorkspace OR departedProjection OR refreshDockWorkspace, Out of Scope / Avoided Traps read on #20017, #20025, #20029) at 2026-11-20T14:35Z; no equivalent or prior exclusion found.
A2A in-flight sweep: checked latest 30 messages (status: 'all') at 2026-11-20T14:35Z; no competing claim.
MC sweep: "PopupWorkspace cold boot windowId null promiseUpdate hangs refreshPromise headless Workspace", 5 results, no prior decision found.
Own-assignment sweep: 1 open (#21555, PR #21556 approved at merge gate), none overlapping.
Structure-map: N/A (src/dashboard/dock/ engine fix; no ai/ or .agents/skills/ touch).
Origin Session ID: 1a9e9c90-1e66-4bcd-831a-57506f77a88b
Retrieval Hint: "PopupWorkspace cold boot windowId null refreshDockWorkspace promiseUpdate hangs departedProjection"
Authored by Maryam (Gemini 4 Carbon, Antigravity). Session 1a9e9c90-1e66-4bcd-831a-57506f77a88b. 🧭
Context
When
Workstationcold-boots with a saved vessel workspace (apps/workstation/view/VesselWorkspace.mjs:253→createPopupWorkspace(..., {committed: true, windowId: null})) or detaches a closed popup window while retaining its Group participant (src/dashboard/dock/Workspace.mjs:1091-1094/apps/workstation/view/PopupWorkspace.mjs:260-261→this.parent?.remove(this, false, true); this.windowId = null), theWorkspaceis unmounted (mounted: false), parentless (parent: null), and windowless (windowId: null).Any Group commit or
projectDockZoneDocumentcall against that headlessWorkspace(cold-hydrate,Reset to default,Undo,transferItem) hangsrefreshPromiseandprojectionCycle.adoptionindefinitely insideawait host.promiseUpdate().Curated labels (
good first issue,help wanted) are omitted because this is an active maintainer lane onNeo.dashboard.dock.Workspaceclaimed immediately.The Problem
In
src/dashboard/dock/Workspace.mjs:2688-2696:Neo.currentWorker?.isWindowDeparted?.(host.windowId)returnsfalsewhenhost.windowIdisnull(src/worker/Base.mjs:433).refreshDockWorkspacefalls intoif (!host.mounted) await host.promiseUpdate().!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests),VdomLifecycle#updateVdom(src/mixin/VdomLifecycle.mjs:1480-1509) registers{resolve, reject}inVDomUpdate.promiseCallbackMap[host.id]and either parks onneedsVdomUpdate = true(!vnodeInitialized) or waits onmountedPromise.cold-hydratefollowed byReset to default),refreshPromisenever settles,projectionCycle.adoptionnever resolves tonull, subsequent cycles stall atqueuedAtwithoutstartedAt, andVDomUpdate.promiseCallbackMapretains an orphaned callback entry. If multiple non-Group projections queue before a later mount, the first stale projection also wakes and reconciles before its successor instead of coalescing.The Architectural Reality
src/dashboard/dock/Workspace.mjs:2052-2080:afterSetMounted(true)already owns deferred replay ofme.departedProjectionviame.chainProjection(parked).src/dashboard/dock/Workspace.mjs:2688-2691:#20017(4763bcb8f9) parks{document, refreshOptions, tabInsertDescriptor}inme.departedProjectionwhenisWindowDeparted(host.windowId)is true, lettingCycle#run's.finally(() => me.adopt(null))(src/dashboard/dock/projection/Cycle.mjs:99) settleadoptionwithnull.src/mixin/VdomLifecycle.mjs:1462: unit tests withallowVdomUpdatesInTests: false(test/playwright/unit/dashboard/DockWorkspace.spec.mjs:195-240) exercise in-memory component reconciliation on standalone unmounted workspaces (windowId: null,parent: null) wherepromiseUpdate()resolves synchronously as a no-op. Note that an unadopted component defaultsparentIdto'document.body'(parent: null), whereas a mounting workspace inside a window'sViewportcarries a liveparentcontainer and/orwindowId.Design authority: "A headless Workspace owns no visible tree before binding. Once mounted, an absent shell at
{@link #dockShellIndex}enters the ordinary committed-document refresh" (src/dashboard/dock/Workspace.mjs:2055-2057) and "a cycle that is skipped, superseded, destroyed or repaired settles it withnull, and the refresh stays the gate" (src/dashboard/dock/projection/Cycle.mjs:13-14).Decision Record impact: none.
The Fix
In
Neo.dashboard.dock.Workspace#refreshDockWorkspace(src/dashboard/dock/Workspace.mjs:2688):!host.mounted && !host.windowId && !host.parent && (!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests)) identically toNeo.currentWorker?.isWindowDeparted?.(host.windowId): store{document, refreshOptions, tabInsertDescriptor}inme.departedProjectionand return immediately.afterSetMounted(true)replays the newest parkeddepartedProjectiononce throughchainProjection.Acceptance Criteria
projectDockZoneDocumenton an unmounted headlessNeo.dashboard.dock.Workspace(windowId: null,parent: null,allowVdomUpdatesInTests: true) settlesrefreshPromiseand resolvesprojectionCycle.adoptiontonullwithout registering callbacks inVDomUpdateor projecting premature shells while headless.projectDockZoneDocumentcommits coalesce intodepartedProjection, and subsequent container binding + mount (bindAndMount) projects the latest committed document once.DockWorkspace(parent.remove(workspace, false, true); workspace.windowId = null), committing a new document while detached, and remounting into a successor container projects the updated document cleanly.DockWorkspaceFirstProjection.spec.mjsandDockWorkspace.spec.mjs, including standaloneallowVdomUpdatesInTests: falsereconciliation) pass.Out of Scope
VdomLifecycle#updateVdomsemantics for components actively mounting inside a parent container.WorkstationBoot.spec.mjs:273workstation-mainReset render-stall race (#21209), whereworkstation-mainis already mounted with a livewindowId.Avoided Traps
!host.windowIdunconditionally without(!Neo.config.unitTestMode || Neo.config.allowVdomUpdatesInTests)and!host.mounted && !host.parentwould skip in-memory reconciliation in standalone unit specs (DockWorkspace.spec.mjs:195) or skip initial mount ordering when a workspace is already attached to a mounting parent container.!host.parentIdinstead of!host.parentmisses freshly constructed headless workspaces whose defaultparentIdis'document.body'(host.parent === null).Related
#20017/ PR#20032(4763bcb8f9— introduceddepartedProjectionforisWindowDeparted(host.windowId))#20152/ PR#20160(PopupWorkspacenative detach lifecycle)Live latest-open + closed sweep: checked latest 20 open (61 open, red band) + open and closed search (
PopupWorkspace OR departedProjection OR refreshDockWorkspace, Out of Scope / Avoided Traps read on#20017,#20025,#20029) at 2026-11-20T14:35Z; no equivalent or prior exclusion found. A2A in-flight sweep: checked latest 30 messages (status: 'all') at 2026-11-20T14:35Z; no competing claim. MC sweep:"PopupWorkspace cold boot windowId null promiseUpdate hangs refreshPromise headless Workspace", 5 results, no prior decision found. Own-assignment sweep: 1 open (#21555, PR#21556approved at merge gate), none overlapping. Structure-map: N/A (src/dashboard/dock/engine fix; noai/or.agents/skills/touch).Origin Session ID: 1a9e9c90-1e66-4bcd-831a-57506f77a88b Retrieval Hint: "PopupWorkspace cold boot windowId null refreshDockWorkspace promiseUpdate hangs departedProjection"
Authored by Maryam (Gemini 4 Carbon, Antigravity). Session 1a9e9c90-1e66-4bcd-831a-57506f77a88b. 🧭