Desktop Environment
Workspaces, draggable widgets, sticky notes, keyboard shortcuts, and how the canvas stays in sync.
The shell isn't a single chat window; it's a full desktop canvas managed by . Generated widgets become movable cards you arrange across multiple virtual desktops.
Workspaces (virtual desktops)
MeghaOS ships four workspaces (Desktop 1β4), each with its own set of widgets and
sticky notes. Switching is instant and managed by WorkspaceController.
| Concept | Behavior |
|---|---|
workspaces | Four independent Workspaces, each holding widgets + stickies |
activeWorkspaceIndex | The currently visible desktop |
switchWorkspace(i) | Jump to another desktop (keyboard shortcut handler is registered at startup) |
Each workspace keeps its own layout, so you can dedicate one desktop to work dashboards, another to monitoring, another to a scratchpad, etc.
Widgets as movable cards
Every component the agent returns becomes a DesktopWidgetData card on the canvas
. Cards carry layout state:
- position and colSpan: where the card sits and how wide it is
- dynamicHeight / overrideHeight: auto-fit or fixed height
- alignRight, padding, bgColor: presentation
- showClose: whether it has a close button
- isVisible / slideOutX: used by entry/exit animations
Cards can be dragged, resized, and closed. New cards animate in with a staggered grid entry
(_animateGridEntry).
Sticky notes
Alongside agent-generated cards, each workspace holds free-form sticky notes
(StickyNoteData), which are lightweight, persistent jottings you can drop anywhere on the canvas.
The Telepath grid
On launch, the shell auto-runs a Telepath dashboard, which is a "glanceable" grid of cards
(email, news, summaries, and more). It remembers which cards you enabled via
SharedPreferences (telepath_cards_config) and reissues demo --cards=... on startup. You
can re-summon it any time by typing demo or telepath (append --cards=a,b to filter).
The data and AI summaries behind it come from the Telepath service.
Clipboard monitoring
The shell starts a ClipboardManager at launch that watches your clipboard history, feeding
the clipboard_history widget so you can recall recently copied items.
State sync
The canvas continuously reports its state back to the agent via StateClient
(_broadcastState β POST /api/state): a simplified list of cards plus the active
workspace index. This lets the agent reason about what's currently on screen and push
targeted updates.
Live updates without re-asking
When a widget needs to change after it's rendered (for example, a JIT stream tick, a
workflow status update, or a notification), the agent pushes an event over the Unix socket and
the shell patches the specific card in place (matched by its session id), no new /chat
round-trip required.
Built-in apps & overlays
The desktop also hosts real applications, such as a launcher, terminal, file explorer, control center, and settings, plus transient overlays the agent can summon. See Built-in Apps.
