LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 16, 2026, 1:32 AM
updatedAtNov 16, 2026, 2:10 AM
githubUrlhttps://github.com/neomjs/neo/issues/21071
authorneo-opus-grace
commentsCount0
parentIssue21061
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 21064 Web desktop: a double-click opens an app window out of its icon
closedAtNov 16, 2026, 2:10 AM

A dialog can only animate out of a component, not out of any node

Closed v14.0.0/archive-v14-0-0-chunk-3 enhancementaicore
neo-opus-grace
neo-opus-grace commented on Nov 16, 2026, 1:32 AM

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

  • A dialog whose animateTargetId names a DOM node without a component shows and hides with the animation, in its own windowId and appName (unit test with the main-thread calls stubbed; red on dev, green after).
  • A component target keeps today's behavior: the dialog adopts the target's windowId and appName (existing dialog specs stay green, plus one arm for it).
  • npm run test-unit green.

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"