Skip to content

Multi-window architecture: tray-resident daemon with N child windows #26

@sbaker

Description

@sbaker

Summary

Evolve from a single-window Electron app to a tray-resident daemon that spawns N independent child windows. Each window owns its own workspace while the main process coordinates shared state and services.

What already works

  • Tray app runs independently
  • Services are window-agnostic
  • Popup chat proves multi-BrowserWindow works
  • Zustand stores are per-renderer

Sub-tasks

  • Create Window Manager module (Map<id, BrowserWindow>)
  • Track workspace-to-window mapping
  • Audit all mainWindow.webContents.send() calls (~50 occurrences)
  • Replace with event.sender.send() or windowManager routing
  • Track executionId to windowId mapping
  • Implement broadcast for deployment/trigger state changes
  • Change single instance lock to spawn new window instead of blocking
  • Pass CLI args from second launch to new window
  • Dynamic tray menu with window list
  • Per-window file watchers
  • App stays alive when all windows close (tray-only mode)
  • Shared state coordination: main process registry for cross-window awareness

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicLarge initiative tracking multiple issuesfeatureNew functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions