LearnNewsExamplesServices
Frontmatter
id8143
titleFix StrategyPanelController re-integration logic on window close
stateClosed
labels
bugai
assigneestobiu
createdAtDec 19, 2025, 2:31 PM
updatedAtDec 19, 2025, 2:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/8143
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 19, 2025, 2:44 PM

Fix StrategyPanelController re-integration logic on window close

Closed v11.17.0 bugai
tobiu
tobiu commented on Dec 19, 2025, 2:31 PM

The StrategyPanelController fails to re-integrate widgets into the dashboard when a popup window is closed manually (without dragging it back).

Problem: When a widget is dragged out, onDragBoundaryExit sets #isWindowDragging to true. If the user drops the window (ending the drag operation), the SortZone correctly resets its internal state, but the StrategyPanelController does NOT receive a notification to reset its #isWindowDragging flag.

Consequently, when onWindowDisconnect fires (e.g., user closes the popup), the controller sees me.#isWindowDragging as true and opts out of re-integration:

if (me.#isWindowDragging || me.#isReintegrating) {
    me.#isWindowDragging = false; // It resets here, but skips logic
    return
}

Proposed Solution:

  1. Expose onDragEnd in Controller: Listen to the dragEnd event from the SortZone (or dragZone) in the StrategyPanelController.
  2. Reset State: Inside this handler, explicitly set #isWindowDragging = false.

This ensures that once the drag operation concludes, the controller is ready to handle a subsequent window close event by re-inserting the widget into the dashboard.

Files to Modify:

  • apps/agentos/view/StrategyPanelController.mjs
  • (Potentially) apps/agentos/view/StrategyPanel.mjs (to attach the listener)
tobiu added the bug label on Dec 19, 2025, 2:31 PM
tobiu added the ai label on Dec 19, 2025, 2:31 PM
tobiu assigned to @tobiu on Dec 19, 2025, 2:34 PM
tobiu closed this issue on Dec 19, 2025, 2:44 PM