LearnNewsExamplesServices
Frontmatter
id8038
titleRefactor AgentOS Strategy View into StrategyPanel
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtDec 6, 2025, 7:50 PM
updatedAtDec 6, 2025, 9:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/8038
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 6, 2025, 9:37 PM

Refactor AgentOS Strategy View into StrategyPanel

Closed v11.17.0 enhancementairefactoring
tobiu
tobiu commented on Dec 6, 2025, 7:50 PM

Extract the inline Strategy view from apps/agentos/view/Viewport.mjs into a new file apps/agentos/view/StrategyPanel.mjs.

Requirements:

  1. New Class: AgentOS.view.StrategyPanel extending Neo.container.Panel.
  2. Dashboard Container: The main item of this panel should be a Neo.dashboard.Container.
  3. Horizontal Layout: The dashboard should be configured to display items horizontally (e.g., layout: {ntype: 'hbox', align: 'stretch'}).
  4. Cards: Implement the 3 current KPI cards (Velocity, Active Epics, Uptime) as child Panels within the Dashboard.
  5. Drag & Drop: Enable drag & drop for these cards (horizontal resorting) and allow dragging them out to popups.
    • Duplicate the DD logic from ViewportController.mjs into a new StrategyPanelController.mjs for now.
  6. SCSS: Refactor the SCSS to move specific strategy styles into resources/scss/theme-cyberpunk/apps/agentos/StrategyPanel.scss.

Current Implementation: The strategy view is currently an inline items config in Viewport.mjs.

Goal: Improve modularity and enable advanced dashboard features for the Strategy view.

tobiu added the enhancement label on Dec 6, 2025, 7:50 PM
tobiu added the ai label on Dec 6, 2025, 7:50 PM
tobiu added the refactoring label on Dec 6, 2025, 7:50 PM
tobiu assigned to @tobiu on Dec 6, 2025, 7:50 PM
tobiu referenced in commit fce09c9 - "Refactor AgentOS Strategy View into StrategyPanel #8038" on Dec 6, 2025, 9:35 PM
tobiu
tobiu Dec 6, 2025, 9:36 PM

Input from Gemini 2.5 pro:

✦ Refactoring and enhancement of the AgentOS Strategy View is complete.

Key Changes:

  1. Architecture & Modularization:

    • Extracted the inline Strategy view from Viewport.mjs into a new dedicated class: AgentOS.view.StrategyPanel.
    • Created a dedicated controller AgentOS.view.StrategyPanelController to handle window management and drag-and-drop logic, mirroring the patterns established in ViewportController.
  2. Dashboard & Layout:

    • Implemented Neo.dashboard.Container as the core of the StrategyPanel, configured with an hbox layout to display KPI cards horizontally.
    • Converted the 3 KPI cards (Velocity, Active Epics, Uptime) into child Neo.container.Panel instances.
  3. Drag & Drop Functionality:

    • Enabled full drag-and-drop support for the KPI cards.
    • Internal: Cards can be reordered horizontally within the dashboard.
    • External: Cards can be dragged out of the main window to spawn separate popup windows (using the neo-draggable headers).
    • Re-integration: Closing a popup or dragging it back seamlessly returns the widget to its original position in the dashboard.
  4. UI & Theming (Cyberpunk):

    • Refactored SCSS into a dedicated structure file: resources/scss/src/apps/agentos/StrategyPanel.scss.
    • Design Update: Moved KPI "Topics" (Velocity, etc.) to the panel headers to serve as drag handles.
    • Visual Polish: Implemented a "monolithic card" aesthetic where the panel header and body share a background color (--agent-bg-panel) to create an "elevated" look against the dark dashboard background. This was achieved by setting internal body backgrounds to transparent and applying styles to the wrapper.
    • Cleaned up legacy styles in Viewport.scss to prevent conflicts.

Files Created/Modified:

  • apps/agentos/view/StrategyPanel.mjs (New)
  • apps/agentos/view/StrategyPanelController.mjs (New)
  • apps/agentos/view/Viewport.mjs (Updated)
  • resources/scss/src/apps/agentos/StrategyPanel.scss (New)
  • resources/scss/src/apps/agentos/Viewport.scss (Updated)
tobiu closed this issue on Dec 6, 2025, 9:37 PM