Context and problem
This is the already-planned keyboard-host phase of #15614. At dev d7e91ec544, examples/dashboard/crossWindow/DemoBWorkspace.mjs remains 3,440 lines after the gesture phase. Its keyboard routing, target enumeration, preview and directional-focus policy form a coherent block of approximately 360 lines inside the composition owner. The aim is a smaller, readable host with unchanged behavior, not another command implementation.
Architectural reality and prescription
The Engine's src/dashboard/dock/interaction/KeyboardCommands.mjs already owns the cycle and terminal machine. Demo B owns the policy connecting it to live windows, documents, previews and announcements. Prescription checked: examples/dashboard/crossWindow/DemoBCrossWindowGesture.mjs — the existing state-free registered prototype mixin is the matching composition mechanism; moving this policy into Engine KeyboardCommands would promote demo-specific window names and three-host assumptions.
Create sibling DemoBKeyboardHost.mjs as a registered Neo.core.Base mixin. Extract these existing host methods: announceKeyboardOutcome, onDockHostKeyDown, resolveFocusedDockItem, resolveDockWorkspaceId, enumerateKeyboardTargets, setKeyboardTargetHighlight, commitKeyboardTransfer, focusNamedWindow, focusDockWorkspaceWindow. Preserve their public/wrappable host entry points. Methods needing Demo B's static IDs/grammar use small host facades passing those values to the extracted implementation, as the gesture phase already does; do not import the host back into the mixin.
Keep the command factory call, listener registration, command instance, origin-window field, highlight generation, maps, pane references and destruction on the host. Internal cross-calls must resolve current host methods. There is no additional controller instance, event listener, state owner or lifecycle.
The earlier TopologyLibrary candidate is rejected for this behavior-preserving phase: its cloned reads and refused invalid writes change the plain holder's contract. Transient libraries or mirrored collection state would add complexity. The parent retains the larger host/lifecycle and perspective work.
Contract Ledger
| Surface |
Authority |
Required behavior |
Failure/lifetime boundary |
Docs |
Evidence |
| Keyboard host entry points |
Current DemoBWorkspace methods 703–1052 and constructor callbacks 601–612 |
Names, arguments, promises and dynamic method replacement remain callable on the same workspace |
Same absent-focus and main-only detach refusals |
Mixin JSDoc + facade references |
Existing identity/routing tests plus callback-replacement control |
| Highlight and announcements |
Current setKeyboardTargetHighlight, announceKeyboardOutcome |
Same shared preview payload, generation fence and every live announcement region |
Late geometry cannot paint over clear/new target/destruction |
Existing method JSDoc |
Existing delayed-highlight and three-window controls |
| Commit and focus |
Current commitKeyboardTransfer, focusDockWorkspaceWindow, focusNamedWindow |
Same Group commit/projection ordering and directional Main call |
Same Boolean focus refusal and unknown-item result |
Existing method JSDoc |
Unit controls + native keyboard journeys |
| Ownership |
Existing host constructor/destructor and Neo.setupClass mixins |
Host retains every collaborator and state; extracted methods execute with host this |
No new construction/destruction/listener path |
Class summary |
Source diff, focused/full unit suites and native journeys |
Acceptance Criteria
Scope and avoided traps
No TopologyLibrary adoption, Workspace superclass swap, new controller, new keyboard grammar, new window behavior, or automatic persistence. This leaf does not close #15614 or certify its final 1,500-line target; remaining host/lifecycle decomposition stays there. The keyboard phase is independent of that ownership mapping and can proceed without changing it.
Decision Record impact: aligned with the existing composition boundary of neomjs/neo#adr:docking-design; no amendment.
Structure-map gate: N/A, existing Body example role; sibling-file-lift beside the gesture mixin.
Ownership: Sophie, immediate implementation of the current owned decomposition stream; not offered as an unclaimed contributor leaf.
Live latest-open + closed sweep: latest 20 created-descending open issues and closed search "DemoB keyboard" checked 2026-11-06T21:56Z; #15250, #15485 and #15517 retain delivered keyboard semantics, no extraction duplicate. Their Out of Scope sections were read. Recent all-status A2A showed no competing claim. MC problem-noun sweep returned unrelated initialization records; parent conversation/source govern this read. Own-assignment sweep: two open tickets (#9553, #6611), neither this surface.
Related: #15614; #20478; #20479; #15250; #15485; #15517.
Origin Session ID: 7367b697-abdc-4e46-963d-5c57378b3551
Retrieval Hint: DemoBWorkspace keyboard host decomposition dynamic facade directional focus highlight generation
Context and problem
This is the already-planned keyboard-host phase of #15614. At dev
d7e91ec544,examples/dashboard/crossWindow/DemoBWorkspace.mjsremains 3,440 lines after the gesture phase. Its keyboard routing, target enumeration, preview and directional-focus policy form a coherent block of approximately 360 lines inside the composition owner. The aim is a smaller, readable host with unchanged behavior, not another command implementation.Architectural reality and prescription
The Engine's
src/dashboard/dock/interaction/KeyboardCommands.mjsalready owns the cycle and terminal machine. Demo B owns the policy connecting it to live windows, documents, previews and announcements. Prescription checked:examples/dashboard/crossWindow/DemoBCrossWindowGesture.mjs— the existing state-free registered prototype mixin is the matching composition mechanism; moving this policy into Engine KeyboardCommands would promote demo-specific window names and three-host assumptions.Create sibling
DemoBKeyboardHost.mjsas a registeredNeo.core.Basemixin. Extract these existing host methods:announceKeyboardOutcome,onDockHostKeyDown,resolveFocusedDockItem,resolveDockWorkspaceId,enumerateKeyboardTargets,setKeyboardTargetHighlight,commitKeyboardTransfer,focusNamedWindow,focusDockWorkspaceWindow. Preserve their public/wrappable host entry points. Methods needing Demo B's static IDs/grammar use small host facades passing those values to the extracted implementation, as the gesture phase already does; do not import the host back into the mixin.Keep the command factory call, listener registration, command instance, origin-window field, highlight generation, maps, pane references and destruction on the host. Internal cross-calls must resolve current host methods. There is no additional controller instance, event listener, state owner or lifecycle.
The earlier TopologyLibrary candidate is rejected for this behavior-preserving phase: its cloned reads and refused invalid writes change the plain holder's contract. Transient libraries or mirrored collection state would add complexity. The parent retains the larger host/lifecycle and perspective work.
Contract Ledger
setKeyboardTargetHighlight,announceKeyboardOutcomecommitKeyboardTransfer,focusDockWorkspaceWindow,focusNamedWindowNeo.setupClassmixinsthisAcceptance Criteria
Scope and avoided traps
No TopologyLibrary adoption, Workspace superclass swap, new controller, new keyboard grammar, new window behavior, or automatic persistence. This leaf does not close #15614 or certify its final 1,500-line target; remaining host/lifecycle decomposition stays there. The keyboard phase is independent of that ownership mapping and can proceed without changing it.
Decision Record impact: aligned with the existing composition boundary of
neomjs/neo#adr:docking-design; no amendment. Structure-map gate: N/A, existing Body example role; sibling-file-lift beside the gesture mixin. Ownership: Sophie, immediate implementation of the current owned decomposition stream; not offered as an unclaimed contributor leaf.Live latest-open + closed sweep: latest 20 created-descending open issues and closed search "DemoB keyboard" checked 2026-11-06T21:56Z; #15250, #15485 and #15517 retain delivered keyboard semantics, no extraction duplicate. Their Out of Scope sections were read. Recent all-status A2A showed no competing claim. MC problem-noun sweep returned unrelated initialization records; parent conversation/source govern this read. Own-assignment sweep: two open tickets (#9553, #6611), neither this surface.
Related: #15614; #20478; #20479; #15250; #15485; #15517.
Origin Session ID: 7367b697-abdc-4e46-963d-5c57378b3551 Retrieval Hint: DemoBWorkspace keyboard host decomposition dynamic facade directional focus highlight generation