for the multi-window scope, it would be nice to have a separated focus history for each connected window.
so, the history should become an object with windowId props which then contain the current arrays.
closing a browser window should clear the related history.
Implementation intake — Euclid, 2026-11-05
The original outcome remains valid. The current source drops the DOM event envelope's windowId at manager.DomEvent.fire before calling Focus; the shared worker's global config and a component's current window are not substitutes for that event origin. worker.App.removePort already identifies the final live port of a window and owns immediate window retirement. The date picker is the only production reader of pending focusout state outside Focus.
| Target surface |
Authority |
Behavior / edge cases |
Docs |
Evidence |
Focus.history |
Original issue |
Object keyed by originating window ID, with a bounded newest-first array per window. Focus moves read only their window's previous path. |
Config/method JSDoc |
Same-window controls and interleaved two-window histories |
Focus.pendingFocusOut |
Existing focus settlement contract |
Pending out/in pairing and stale-timer fencing are per window; a sibling's focusin cannot consume another window's pending leave. |
Config/method JSDoc |
Interleaved focus events, supersession and close-before-timer controls |
DomEvent.fire → Focus |
Current Main-to-App message envelope |
Forward the supplied event windowId; never infer it from the logical path or singleton config. |
Dispatch docs |
Production dispatcher test |
App.removePort → Focus cleanup |
Existing final-port retirement boundary |
Clear only the departed window's state when its final live port is removed. A per-app disconnect, remaining port or stale port must preserve live-window state. |
Cleanup JSDoc |
Real App worker lifecycle tests |
DateSelector.triggerVdomUpdate |
Existing focus-restoration guard |
Read pending focusout only for the selector's current window. |
Method docs |
Date focus-restoration control and existing picker/focus coverage |
Classification: valid-as-written outcome, prescription sharpened for the current dispatcher, pending pairing and final-port lifecycle. Created 2024-11-22; retained no auto close is historical parked metadata, not proof of currency. Current source and the isolated two-window history probe establish that this remains unimplemented; live reference/successor search found no resolving PR. No new user configuration is required. Original author prose and human assignment are preserved.
Implementation handoff — 2026-11-05
Delivered in PR #20305. Julia approved the exact head f47becdf18f09a349695818da857ddd15dcfbdc2 with no required actions. Human-merged on 2026-11-05 at 12:00 UTC as 408ff47e2a012aabe19b076317eb35c986cf4d22; #6128 is closed as completed.
Merged-dev continuity passed: 30 focused unit tests (Focus, Picker, DateSelector focus and departed-window retirement) and the real-browser two-document SharedWorker journey (1 passed, 10.7s). The resident checkout is clean on dev at that merge. Detailed red-first, full-unit, real-worker and browser evidence remains in the PR.
for the multi-window scope, it would be nice to have a separated focus history for each connected window.
so, the history should become an object with
windowIdprops which then contain the current arrays.closing a browser window should clear the related history.
Implementation intake — Euclid, 2026-11-05
The original outcome remains valid. The current source drops the DOM event envelope's
windowIdatmanager.DomEvent.firebefore calling Focus; the shared worker's global config and a component's current window are not substitutes for that event origin.worker.App.removePortalready identifies the final live port of a window and owns immediate window retirement. The date picker is the only production reader of pending focusout state outside Focus.Focus.historyFocus.pendingFocusOutDomEvent.fire→ FocuswindowId; never infer it from the logical path or singleton config.App.removePort→ Focus cleanupDateSelector.triggerVdomUpdateClassification: valid-as-written outcome, prescription sharpened for the current dispatcher, pending pairing and final-port lifecycle. Created 2024-11-22; retained
no auto closeis historical parked metadata, not proof of currency. Current source and the isolated two-window history probe establish that this remains unimplemented; live reference/successor search found no resolving PR. No new user configuration is required. Original author prose and human assignment are preserved.Implementation handoff — 2026-11-05
Delivered in PR #20305. Julia approved the exact head
f47becdf18f09a349695818da857ddd15dcfbdc2with no required actions. Human-merged on 2026-11-05 at 12:00 UTC as408ff47e2a012aabe19b076317eb35c986cf4d22; #6128 is closed as completed.Merged-
devcontinuity passed: 30 focused unit tests (Focus, Picker, DateSelector focus and departed-window retirement) and the real-browser two-document SharedWorker journey (1 passed, 10.7s). The resident checkout is clean ondevat that merge. Detailed red-first, full-unit, real-worker and browser evidence remains in the PR.