LearnNewsExamplesServices
Frontmatter
id8155
titleRefactor dashboard.Container to manage detached item lifecycle
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtDec 26, 2025, 4:57 PM
updatedAtDec 26, 2025, 6:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/8155
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 26, 2025, 6:23 PM

Refactor dashboard.Container to manage detached item lifecycle

Closed v11.18.0 enhancementairefactoring
tobiu
tobiu commented on Dec 26, 2025, 4:57 PM

Objective Move the logic for managing detached items (drag-to-window and re-integration) from application-level Viewport Controllers (e.g., AgentOS.view.ViewportController, Colors.view.ViewportController) into the core Neo.dashboard.Container. This will standardize the behavior and significantly improve Developer Experience (DX).

Key Changes

  1. New Configs on Neo.dashboard.Container:

    • detachToNewWindow (Boolean, default true): Enables the drag-to-window feature.
    • popupConfig (Object): Default window features (e.g., {height: 600, width: 800}).
    • popupUrl (String|Function): A default template for the popup URL.
    • detachedItems (Map): Internal state to track items currently in popups.
  2. Per-Item Configuration:

    • Dashboard items (panels) can override the default popupUrl via a custom config (e.g., popupUrl property on the item itself). This is critical for applications like AgentOS where different widgets require different app shells (e.g., swarm uses a canvas-enabled shell).
  3. Lifecycle Management:

    • Implement onDragBoundaryExit in dashboard.Container to handle opening the popup.
    • Implement onDragBoundaryEntry in dashboard.Container to handle closing the popup and re-integrating the item.
    • Handle Neo.currentWorker connect/disconnect events within the container to manage state when windows are closed manually.
  4. Cleanup:

    • Remove the redundant logic from AgentOS and Colors Viewport Controllers.
tobiu added the enhancement label on Dec 26, 2025, 4:57 PM
tobiu added the ai label on Dec 26, 2025, 4:57 PM
tobiu added the refactoring label on Dec 26, 2025, 4:57 PM
tobiu cross-referenced by #8157 on Dec 26, 2025, 5:03 PM
tobiu assigned to @tobiu on Dec 26, 2025, 5:08 PM
tobiu referenced in commit 4ac9f63 - "#8155 dashboard.Container: enhanced logic, updated the AgentOS main dashboard to use it." on Dec 26, 2025, 5:36 PM
tobiu referenced in commit cf8d18d - "#8155 AgentOS.view.StrategyPanel: using the enhanced dashboard logic" on Dec 26, 2025, 6:07 PM
tobiu referenced in commit 1fad668 - "#8155 dashboard.Container: documentation, apps/colors: using the new implementation" on Dec 26, 2025, 6:22 PM
tobiu closed this issue on Dec 26, 2025, 6:23 PM
tobiu cross-referenced by #8156 on Dec 26, 2025, 6:29 PM