Context
Found while shaping #21064 (web desktop, #21061): a double-click on a launcher icon should open the app's window animating out of that icon. The launcher is a list.Base, so an icon is a list item node, not a component.
The Problem
dialog.Base takes the animation origin as animateTargetId_ ({String|null}), but it resolves that id to a component and reads the window and app from the component:
get animateTarget() returns Neo.getComponent(this.animateTargetId) (src/dialog/Base.mjs:156-158).
animateShow() does me.windowId = animateTarget.windowId; me.appName = appName = animateTarget.appName (src/dialog/Base.mjs:420-421).
animateHide() does the same (src/dialog/Base.mjs:371-372).
An id that names a DOM node without a component (a list item, a grid cell, a menu row) leaves animateTarget null, and the first line of animateShow() throws. The geometry the animation needs comes from getDomRect(me.animateTargetId) (src/dialog/Base.mjs:423), which works for any node. Only the window and app lookups require a component.
A dialog already knows its own windowId and appName when its creator passes them, which is the documented way to create one (apps/email/view/ComposeDialog.mjs; the pattern recorded in #21064).
The Architectural Reality
Design authority: none found (searched src/dialog/Base.mjs JSDoc, learn/ guides on dialogs, ask_knowledge_base). animateTargetId_ is documented as {String|null} with no component requirement; animateTarget is documented as {Neo.component.Base|null}, which the code then dereferences without the null case.
The "assuming that we want to show the dialog inside the same browser window as the animation target" comments (src/dialog/Base.mjs:370, :419) explain why the target's window is preferred: a component target can live in another browser window. A plain node has no component to ask, so the dialog keeps the window and app it was created with.
The Fix
src/dialog/Base.mjs: animateShow() and animateHide() adopt windowId and appName from animateTarget only when it exists, and otherwise keep the dialog's own. The animateTarget JSDoc names the null case.
Acceptance Criteria
Out of Scope
- Moving a dialog across browser windows (unchanged; a component target still decides that).
- Any change to the animation itself.
Related
Live latest-open + closed sweep: latest 20 open + open/closed search ("dialog animateTargetId", "animateTarget component", "dialog animate list item") at 2026-11-16T00:31Z; closed #4963 / #4966 concern a missing animateTargetId, not a non-component one; no equivalent found. Backlog 53 open (red); filed under #21061.
Origin Session ID: f1b70a0d-406f-4b7d-a69c-20d35c843303
Retrieval Hint: "dialog animateTargetId animateTarget getComponent null list item windowId appName"
Context
Found while shaping #21064 (web desktop, #21061): a double-click on a launcher icon should open the app's window animating out of that icon. The launcher is a
list.Base, so an icon is a list item node, not a component.The Problem
dialog.Basetakes the animation origin asanimateTargetId_({String|null}), but it resolves that id to a component and reads the window and app from the component:get animateTarget()returnsNeo.getComponent(this.animateTargetId)(src/dialog/Base.mjs:156-158).animateShow()doesme.windowId = animateTarget.windowId; me.appName = appName = animateTarget.appName(src/dialog/Base.mjs:420-421).animateHide()does the same (src/dialog/Base.mjs:371-372).An id that names a DOM node without a component (a list item, a grid cell, a menu row) leaves
animateTargetnull, and the first line ofanimateShow()throws. The geometry the animation needs comes fromgetDomRect(me.animateTargetId)(src/dialog/Base.mjs:423), which works for any node. Only the window and app lookups require a component.A dialog already knows its own
windowIdandappNamewhen its creator passes them, which is the documented way to create one (apps/email/view/ComposeDialog.mjs; the pattern recorded in #21064).The Architectural Reality
Design authority: none found (searched
src/dialog/Base.mjsJSDoc,learn/guides on dialogs,ask_knowledge_base).animateTargetId_is documented as{String|null}with no component requirement;animateTargetis documented as{Neo.component.Base|null}, which the code then dereferences without the null case.The "assuming that we want to show the dialog inside the same browser window as the animation target" comments (
src/dialog/Base.mjs:370,:419) explain why the target's window is preferred: a component target can live in another browser window. A plain node has no component to ask, so the dialog keeps the window and app it was created with.The Fix
src/dialog/Base.mjs:animateShow()andanimateHide()adoptwindowIdandappNamefromanimateTargetonly when it exists, and otherwise keep the dialog's own. TheanimateTargetJSDoc names the null case.Acceptance Criteria
animateTargetIdnames a DOM node without a component shows and hides with the animation, in its ownwindowIdandappName(unit test with the main-thread calls stubbed; red ondev, green after).windowIdandappName(existing dialog specs stay green, plus one arm for it).npm run test-unitgreen.Out of Scope
Related
Live latest-open + closed sweep: latest 20 open + open/closed search ("dialog animateTargetId", "animateTarget component", "dialog animate list item") at 2026-11-16T00:31Z; closed #4963 / #4966 concern a missing
animateTargetId, not a non-component one; no equivalent found. Backlog 53 open (red); filed under #21061.Origin Session ID: f1b70a0d-406f-4b7d-a69c-20d35c843303 Retrieval Hint: "dialog animateTargetId animateTarget getComponent null list item windowId appName"