Galaxy Shell / docs
Docs / Interface and features

Workspaces on several outputs

openspec/specs/multi-output-workspaces/spec.md · Edit on GitHub ↗

On this page

Workspaces on several outputs

Purpose

Lets each connected output show its own workspace, with a protected move path, per-output chats and bars, and a lease that keeps the compositor safe when the core goes away. This spec holds the landed behavior of the feature.

Requirements

Requirement: Only the protected host moves a workspace

The system SHALL let only the protected host move a workspace to another output, through /api/workspace-output and the protected workspace-menu panel (right click on a bottom bar tab). Full text: section Binding contract (from AGENTS.md).

Scenario: Menu move

  • WHEN the user right clicks a bottom bar tab and picks an output in the protected workspace-menu
  • THEN the protected host calls /api/workspace-output and the workspace moves

Requirement: No agent path reaches the move routes

The system MUST NOT let any agent tool, scheduled turn, generated HTML or isolated plugin panel reach the workspace output routes or the workspace-menu panel id. Full text: section Binding contract (from AGENTS.md).

Scenario: Agent tries the route

  • WHEN an agent tool, scheduled turn, generated HTML or isolated plugin panel tries the route or the panel id
  • THEN it is not reached

Requirement: The feature is always on

The system SHALL have no settings toggle for workspaces on several outputs: the core always renews the lease workspace_outputs on a compositor that reports capabilities.workspaceOutputs and capabilities.outputChats, and the lease end (the core goes away) is the version-skew safety. Full text: section Binding contract (from AGENTS.md).

Scenario: Capable compositor

  • WHEN the compositor reports both capabilities
  • THEN the core renews the lease with no setting involved

Requirement: A new empty Canvas workspace and one bar per extra output

The core SHALL open a new empty Canvas workspace on an extra output that shows nothing and has no saved or replug pair. The Electron host SHALL open one protected bottom bar per extra output that shows a workspace, declared from the bottom-bar template with output only on capabilities.outputBars; the other HUD surfaces stay on the primary output. Full text: section Binding contract (from AGENTS.md).

Scenario: Empty extra output

  • WHEN an extra output shows nothing and has no saved or replug pair
  • THEN the core opens a new empty Canvas workspace there

Requirement: Shared Canvas workspaces and focus_only resends

With a live workspace_outputs lease and capabilities.sharedCanvas, the core SHALL renew the lease shared_workspaces so a Canvas workspace can show on several outputs, one camera per output. Resends of workspace by the core (reconnect, unlock, login restore, rollback) MUST carry focus_only and never open a view. Full text: section Binding contract (from AGENTS.md).

Scenario: Resend after reconnect

  • WHEN the core resends workspace after a reconnect
  • THEN the command carries focus_only and opens no view

Requirement: Opening and taking off a shared view

A selection SHALL open a shared Canvas workspace on the focus output. The menu and the bottom bar SHALL offer "Abrir também em N" to open it on one more output, and "Tirar de N" SHALL take it off that output only, through /api/workspace-output with from. Full text: section Binding contract (from AGENTS.md).

Scenario: Take off one output

  • WHEN the user picks "Tirar de N" for a workspace shown on several outputs
  • THEN the workspace leaves output N only

Requirement: Grid sharing needs sharedGrid and every holder

A Grid workspace SHALL show on several outputs only when the compositor reports capabilities.sharedGrid: the core adds grid: true to the renewal, a Grid shares only while every live holder of the lease named it, and a renewal without it collapses the Grid views, also while locked. Full text: section Binding contract (from AGENTS.md).

Scenario: Renewal without grid

  • WHEN a renewal arrives without grid: true
  • THEN the Grid views collapse, also while locked

Requirement: One formation size, independent cameras and an output chat per Grid view

A shared Grid workspace SHALL keep one formation size, each view SHALL start fitted, and each monitor SHALL have an independent user pan and zoom. Every Grid view SHALL float its own output chat (the snapshot key gridViews). Full text: section Binding contract (from AGENTS.md).

Scenario: Pan on one monitor

  • WHEN the user pans or zooms a Grid view on one monitor
  • THEN the view on the other monitor keeps its own pan and zoom

Requirement: No agent path opens, closes or moves a view

The system MUST NOT let any agent tool, scheduled turn, generated HTML or isolated plugin panel open, close or move a view of a shared workspace. An approval shows only in the chat of the agent view. Full text: section Binding contract (from AGENTS.md).

Scenario: Approval with two Grid views

  • WHEN a Grid workspace has several views and an approval is pending
  • THEN the approval shows only in the chat of the agent view

Requirement: Saved assignments and the login restore

window-session.json SHALL save primaryWorkspace, workspaceOutputs by connector name (a workspace can repeat) and views per Canvas workspace at version 1, and the core MUST validate every field on load. The login restore keeps its order and the leases are renewed only after it ends. Then the outputs step runs as a replug move, under the normal refusals, after the unlock when locked. Full text: section Binding contract (from AGENTS.md).

Scenario: Login restore

  • WHEN the login restore ends
  • THEN the core renews the leases, then opens each saved pair whose connector is connected

Requirement: The login restore restores cameras and focus

After opening the saved pairs, the core SHALL restore each view camera (camera with output, only after a state proof of capabilities.viewCamera) and give the saved active workspace the focus with focus_only. The replug memory brings a shared view back on its connector for the session. Full text: section Binding contract (from AGENTS.md).

Scenario: Camera without the proof

  • WHEN the state does not prove capabilities.viewCamera
  • THEN the core sends no camera with output
  • AND the saved active workspace still gets the focus with focus_only

Requirement: No route or agent reads the saved assignments

The system MUST NOT let any route, agent tool, MCP entry, scheduled turn, generated HTML or plugin panel read or write the saved output assignments. Full text: section Binding contract (from AGENTS.md).

Scenario: Plugin reads assignments

  • WHEN a plugin panel tries to read the assignments
  • THEN it has no route to them

Requirement: One workspace per output and one output per workspace

Each output SHALL show at most one workspace, and the primary output always shows one. A workspace shows on one output, except a shared Canvas workspace (capabilities.sharedCanvas) or a shared Grid workspace (capabilities.sharedGrid), which can show on several outputs. Nothing swaps. A move that would leave the primary with none is refused (no_other_workspace). Full text: section Binding contract (from AGENTS.md).

Scenario: Move off the primary

  • WHEN a move would take the only workspace off the primary and no other workspace is free
  • THEN the move is refused with no_other_workspace

Scenario: Shared Canvas workspace

  • WHEN a Canvas workspace shows on two outputs under a live shared_workspaces lease
  • THEN each output keeps its own camera

Requirement: A selection does not empty an output

A selection of a workspace that another output shows SHALL move only the focus to that output and pull no workspace off it, except a shared Canvas workspace: a selection opens it on the focus output. The core opens a new empty Canvas workspace on an extra output that shows nothing and has no saved or replug pair. Full text: section Binding contract (from AGENTS.md).

Scenario: Select a workspace on another monitor

  • WHEN the user selects a workspace that another output shows
  • THEN the focus moves to that output and no workspace is pulled off it

Scenario: Select a shared Canvas workspace

  • WHEN the user selects a shared Canvas workspace
  • THEN it opens on the focus output

Requirement: The lease and its grace time

The compositor SHALL start with the lease off, so every extra output shows its shared grid and the behavior is that of the compositor before the feature. When the last holder connection closes the 60 s grace time keeps every assignment, and at its end the compositor clears them. Off is refused while locked, and since 2026-11-03 the core never sends off. Full text: section The lease.

Scenario: Core goes away

  • WHEN the last holder connection closes
  • THEN assignments stay for the grace time and are cleared at its end

Requirement: Renewal order of the lease

The core SHALL renew the lease only after the login restore ends, after checking capabilities.workspaceOutputs and capabilities.outputChats from state; a failed renewal is retried every 2 s, and an older compositor without a capability gets no renewal. Behavior depends on the lease, not on the static capability. Full text: section The lease.

Scenario: Compositor without outputChats

  • WHEN the compositor reports only workspaceOutputs
  • THEN the core does not renew the lease

Requirement: Protected menu move

Only the protected workspace-menu panel SHALL send a menu move, through a protected route with the launch cookie. Isolated plugins MUST NOT bind a bar declaration or the workspace-menu declaration, and generated HTML cannot call the routes. Full text: section Security and the protected-host boundary.

Scenario: Forged route call

  • WHEN a request without the launch cookie calls the workspace output route
  • THEN it is refused

Requirement: The compositor never applies a workspace change by itself

The compositor SHALL NOT apply a workspace change by itself: it queues an input request and the core decides. Window content never reaches the web; the bar gets only workspace ids and connector names. Full text: section Security and the protected-host boundary.

Scenario: Change queued

  • WHEN the compositor sees a request to change a workspace
  • THEN it queues an input request for the core

Requirement: Output chats are protected host windows

An output chat SHALL be a protected host window: only the Electron main process asks for its token with the host main key, the core builds its declaration from its own template, and its inline responses stay in opaque iframes. A capture of an extra output goes only to the composer of that output chat, after the user sees it. Full text: section Security and the protected-host boundary.

Scenario: Chat token

  • WHEN a page asks for an output chat token with the launch key
  • THEN only the host main key is accepted

Requirement: Saved assignments match by connector name

The saved assignments SHALL match a monitor by connector name only, and the record MUST keep no EDID or monitor identity. Full text: section Security and the protected-host boundary.

Scenario: Different monitor on the same port

  • WHEN another monitor is on the saved connector at the next login
  • THEN it gets the saved workspace

Status

Doc status: partly landed. Landed: phases 1 to 4 and 6 (persistence, restore; 2026-11-02 and 2026-11-03), always on. Not landed: replug memory across a core restart. Dropped 2026-11-04: workspace drag (phase 5). Phase 7 is a live check with the user, not verified here. Header still says proposed. Checked 2026-11-10.

Purpose and scope

In scope

  • A shown workspace per output, with a move rule, a selection rule and a return rule, and the output that has the keyboard focus.
  • One chat window per output that shows a workspace, for the conversation of that workspace (one chat per workspace, as today).
  • Every layout on an extra output, including Canvas with its own camera and the floating chat of that output.
  • The drag of a workspace button from the protected bottom bar to an output, tracked by a compositor grab.
  • A protected menu on the workspace button as the path without a drag.
  • The data model, keys, focus, layouts, bars, overview, transitions, glass, the lock, the lease, persistence, hot unplug, agent tools, security, version skew, tests and phases for that model.

Out of scope

  • Dragging windows between overview cards. Rejected by the owner.
  • The HUD on an extra output: no top bar, no bottom bar, no quick settings, no notifications, no tray menu and no HUD plugin panel there (the user's "exceto HUD", open question 10).
  • The overview on an extra output. It stays on the primary output and shows every workspace.
  • Concurrent turns. The core keeps one turn at a time, as today (open question 11).
  • A native UI in Smithay. The drag feedback uses compositing and effects only (see W7).
  • Moving a workspace by an agent tool, a scheduled turn or generated HTML.

Known limits

  • The wallpaper parallax (openspec/specs/hex-crystals-wallpaper/spec.md, phase 2) follows only the camera of the Canvas workspace of the primary output. The extra outputs show the parallax of the primary output through the scaled wallpaper copy; a pan on a Canvas workspace of an extra output moves no crystal.

  • No keyboard path moves a workspace between outputs in these phases. The bars take no keyboard focus, and the menu opens with a right click. Open question 5 offers a key.

  • Phases 1 to 5 keep the assignments only in the compositor. The end of the lease grace time clears them (see The lease). Phase 6 saves them: since 2026-11-03 window-session.json keeps them for the next login (W11, As built (phase 6)). The match is by connector name only: a different monitor on the same port gets the saved workspace at the next login.

  • The compositor checks that a press on the bottom bar is held, but it does not check which tab the press is on. The protected host names the workspace. A host bug can move another workspace; the user moves it back. Passing the tab x and checking it was rejected: the tabs animate their widths (W6).

Model

Terms

  • Shown workspace. The workspace that an output draws. The primary output always has one. An extra output has one or none.
  • Shared grid. The grid of an extra output that shows no workspace. This is the static area of today.
  • Primary workspace. The workspace that the primary output shows.
  • Focus output. The output that has the keyboard focus. A press on a window or a chat window of an output changes it. The bars and the panels do not change it.
  • Focused workspace. The workspace that the focus output shows, or the primary workspace when the focus output shows no workspace. It is the active conversation of the core.
  • Output chat. The chat window of an output that shows a workspace. It shows the conversation of that workspace. The primary output always has one. An extra output that shows its shared grid has none.

Rules

Decision W1: one workspace per output, one output per workspace. Recommended: each output shows at most one workspace, and each workspace shows on at most one output. The primary output always shows one. Reason: a workspace has one grid, one camera and one set of window sizes, so it cannot draw on two outputs at once. Alternative: mirror one workspace on two outputs; rejected, because a client has one size.

Decision W2 (history, reversed on 2026-11-03, see Decision of 2026-11-03): an extra output without a workspace keeps its shared grid. Recommended: an extra output starts with no workspace and shows its shared grid, as today. Reason: nothing regresses with the setting off, at each login and after each hotplug. Alternative: an extra output always shows a workspace, a new empty conversation if needed; rejected, because it creates conversations as a side effect.

Decision W3: independent outputs (answered by the user). Each output shows its own workspace, as in i3 and Sway. Nothing swaps.

The move rule (a drop or the menu): output X takes workspace W.

W before X showed before Result
on no output V or the shared grid X shows W. V shows on no output.
on extra output Y V or the shared grid X shows W. V shows on no output. Y shows its shared grid.
on the primary output, X is an extra output V or the shared grid X shows W. V shows on no output. The primary shows the most recently opened workspace that no output showed before the move (see The primary pick). With none, the move is refused (no_other_workspace): the primary always shows one.
on extra output Y, X is the primary V The primary shows W. V shows on no output. Y shows its shared grid.
on X any Nothing changes.

The workspace that X showed before never goes to another output.

The primary pick. The most recently opened workspace is the open conversation with the latest lastOpenedAt, else its createdAt when lastOpenedAt is missing, as the memory policy reads it (memory-policy.js:145). A tie goes to the workspace that comes first in the workspace order (openConversations of the core, which the core sends as the workspace_order ids). V, the workspace that X showed before, is not a candidate. Reason: V on the primary output would be the swap that the user rejected, because V would go from X to the primary output as a side effect of the move.

The selection rule (a tab click, Super+1..9, an overview card, a new workspace):

  • W shows on an output: the focus moves to that output. No output changes its workspace. The keyboard goes to the most recently focused window of W, or to the chat when W has no window.
  • W shows on no output: the focus output shows W, and its old workspace shows on no output. One caller puts W on the primary output and moves the focus there instead: a selection by a scheduled turn.

The step rule (Super+Left/Right, the bar wheel, the three-finger swipe; answer to open question 9): the step changes the workspace of the focus output. The core picks the next or previous workspace in the workspace order from the focused workspace, and skips every workspace that another output shows. It does not wrap, as today (workspace-navigation.js:358-367). It then sends a plain workspace {W}: W shows on no output, so the selection rule puts W on the focus output. With no free workspace, the step does nothing. The bar wheel uses the session route select of a tab click today (createWorkspaceWheel, vendor/interface/host/workspace-zoom.js:637); phase 4 adds a field step: "next" | "previous" to that protected route, and the core applies the step rule. Until phase 4 the wheel is a tab click selection. On the primary output the step keeps its slide and its interactive swipe. On an extra output it is a cut (Transitions and glass). The core check of an interactive swipe (workspace-navigation.js:376-388: fromWorkspace equals active and the primary workspace) stays: the compositor starts the interactive swipe only with the focus on the primary output, so there active is the primary workspace.

The mechanism of the scheduled exception is one optional key on the existing command: workspace {workspace, primary: true}. When W shows on no output, the primary output shows W, its old workspace shows on no output, and focus_output becomes the primary output. When W shows on an extra output, primary changes nothing and the selection rule applies: the focus moves to that output, and no output changes its workspace. Without a live lease, primary changes nothing, because the rule of 6d54d19 already puts W on the primary output. Command uses deny_unknown_fields (desktop.rs:45), so the core sends the key only when the snapshot has capabilities.workspaceOutputs. The core sets it only for a selection by a scheduled turn. Reason: a scheduled turn runs with no user at the keyboard, so it does not take over the output that the user looks at last.

Reason: the user asked for independent outputs, so a selection must not pull a workspace off the other monitor. Alternative: the swap of the first version; rejected by the user.

Decision W4: the return path. Recommended: the protected menu of the button has "Tirar de HDMI-A-1" (take off HDMI-A-1). W then shows on no output, and HDMI-A-1 shows its shared grid. A drop on the same output does nothing. Reason: one explicit action empties an output, and no gesture does it by accident. A selection never empties an output either. Alternative: a drop of the button on the bottom bar empties the output; rejected, because the bar is on the primary output, so the drop target would be ambiguous.

Decision W5: windows follow their workspace. Recommended: a window of workspace W shows on the output that shows W, at the cells or the canvas rectangle of W. A window has a home: a workspace, or the shared grid of one extra output (Slot::Extra). Rules:

  • The core bind of a window to W changes its home to W. When W shows on an extra output, the window moves there. When W shows on the primary output or on no output, bind keeps meta.output, as today, so a window of a shared grid stays a shared window (W2). The output that draws the window follows shown_slot.
  • A new window opens on the output under the pointer (choose_output). It joins the workspace that output shows, or the shared grid of that output when it shows none. The core keeps that choice: WorkspaceWindows.observe (workspaces.js:50, called from smithay.js:1349) binds an unbound window to active today, which would move the window back to the focused workspace. Under a live lease it binds an unbound window to its parent's workspace, else to window.workspace, the choice of the compositor. A window of a shared grid (shared: true) keeps the rule of today (its parent's workspace, else active): its bind keeps meta.output, so it stays shared (W5). Node test: a new window on an extra output that shows a workspace keeps that workspace, and a new shared window stays shared. Without a live lease it keeps the rule of today. open_application of a turn still binds its window to the workspace of the turn on purpose, and that bind wins by the rule above.
  • Super+Shift+Left/Right and a title bar drag across outputs move a window into the workspace that the target output shows, or onto its shared grid. A window that reaches the primary output joins the primary workspace, as today. These are user actions, so a window can change its workspace this way.
  • Dialogs follow their parent, as today.
  • The windows of the shared grid of X stay on that grid while X shows a workspace. They are hidden, and they show again when X shows its shared grid. See open question 4.

Data model

Compositor

  • Desktop.workspace: u32 keeps its name and becomes the primary workspace only.
  • New Desktop.shown: BTreeMap<u32, u32>: the workspace that each extra output shows, by the id of Slot::Extra(id). A missing entry means the shared grid. W1 is an invariant of every write.
  • New Desktop.focus_output: Slot. While the lease is live (The lease), a press on an output (on a window, on its output chat or on its wallpaper), a new window that takes the keyboard, a selection, a step, Super+Shift+Left/Right of the focused window and a move of the focused workspace (W3) change it. The unplug of the focus output sets the primary output. The bars and the panels do not change it.
  • New Desktop.chat_of: BTreeMap<Slot, Window> (phase 2): the output chat of each output (W8). Slot gets PartialOrd, Ord, Hash (outputs.rs:21). A chat declaration names its output; the primary chat has no output.
  • New Desktop.workspace_outputs: canvas::Lease (see The lease).
  • WindowMeta.output keeps its type and becomes the home: Primary means the window lives in meta.workspace; Extra(id) means the shared grid of that output.
  • GridKey keeps its two kinds. GridKey::Workspace(W) is the grid of W wherever W shows.

One function for the output of a window

shown_slot(&self, window) -> Option<Slot> gives the output that draws the window now, or None:

  • An output chat: its output, while that output shows a workspace, else None.
  • Any other shell window: Primary.
  • Home Extra(id): Extra(id) when that output shows no workspace, else None (hidden, W5).
  • Home Primary: the output that shows meta.workspace, else None.

Two helpers replace on_secondary (outputs.rs:380): shared(window) (the home is a shared grid) and on_extra(window) (shown_slot is an extra output). focused_workspace() gives the focused workspace from focus_output. Every consumer below calls these functions and no consumer reads meta.output directly.

Site What on_secondary or desktop.workspace means there New rule
home_grid (tiling.rs:73) The grid of a window: the extra output, or the active workspace for a shell window. An output chat: the grid of the workspace that its output shows (the chat is a tile of that workspace, D2 of the tiling spec). A workspace window: GridKey::Workspace(meta.workspace). A shared window: GridKey::Extra(id).
grid_of (tiling.rs:136) Tiles now only on the active workspace. Tiles when shown_slot is Some and the layout of its workspace is Grid.
grid_area (tiling.rs:53) Workspace grid = primary content area. The primary content area when W is the primary workspace; the whole extra output when W shows there.
grid_placement (tiling.rs:287-306) grid.retain(&ids) with members from grid_of. ids keeps the output chat of the output that shows the workspace, so the chat cells move with the workspace (W8). While the output chat of an extra output is not bound yet, its cells stay reserved and show the wallpaper.
extra_presentations (outputs.rs:385), extra_windows (outputs.rs:631) Windows whose home is that extra output. Windows with shown_slot == Some(slot).
visible_window (desktop.rs:1152-1160) "An extra output is a static area": always visible. A shared window: visible when its output shows no workspace. A workspace window on an extra output: visible by the zoom and layout rules of its own workspace, never by the primary presentation.
target() (desktop.rs:1261-1271) A primary window of an inactive workspace is refused. Refused when shown_slot is None.
set_app_maximized (desktop.rs:1854-1867) Grid or Canvas of the primary layout, or "no presentation" on an extra output. Branch on the layout of the workspace that the window shows on. Only a shared window keeps the "no presentation" branch.
Command::Bind (desktop.rs:1653-1688) Keeps meta.output. W5: moves to the extra output only when the target workspace shows there.
App picker (desktop.rs:1004), focus layout (layout.rs:318, 344), desktop.rs:1329 Not on an extra output. The output of the workspace: the focus layout and its presentations run per output, with the output chat of that output.
Alt+Tab (input.rs:583) Skips extra outputs. Windows with shown_slot == Some(focus_output) that are not shared.
pointer_on_secondary (input.rs:242) The pointer is on an extra output, where no overview or transition runs. Unchanged meaning: still true for every extra output.
state.rs:490, 751; drm.rs:230 Primary windows for focus and frame callbacks. shown_slot == Some(Primary).
toggle_grid_layout (tiling.rs:691-716) The active workspace. The focused workspace.
canvas_fills, canvas_focused (canvas_mode.rs:1190-1198) The active workspace, not on an extra output. The focused workspace, on the output that shows it (phase 3 for an extra output).
workspace_elements (scene.rs:1344) The geometry of the first output. The geometry is a parameter: the output that shows the workspace, or the primary output.

The uses of desktop.workspace

Phase 1 sorts each of the about 77 uses into one of three classes, with one test per class:

  • Primary workspace (keeps desktop.workspace): select_workspace, the slide and depth transitions and the interactive swipe (thumbnail_motion.rs), the overview, the snapshot field workspace, frame callbacks of the primary output.
  • Workspace of an output: the layout pass per output, grid_area, the home grid of each output chat, the focus layout and its presentations (layout.rs), the scene of each output, the 32 uses in canvas_mode.rs (the camera of each output, and the chat placement on a canvas, which phase 1 sorts again after the chat change of the parallel session lands). Phase 1 sorts the canvas uses here and keeps a Canvas workspace on the primary output (an internal rule with no refusal text, which no user path reaches before phase 4): a selection that would put a Canvas workspace on an extra output puts it on the primary output and moves the focus there, and a workspace_output of a Canvas workspace to an extra output does nothing; phase 3 draws the camera on an extra output and removes that rule.
  • Focused workspace: the keyboard actions (Super+T, Super+Shift+T, Super+F, Super+G, the maximize), Alt+Tab, canvas_fills, canvas_focused, the snapshot field focusedWorkspace.

Core

  • store.state.active is the focused workspace. desktop.activeWorkspace (desktop-client.js:60, 142) stays equal to it. Each output chat shows the conversation of the workspace of its output, not active (W8).
  • A turn, its tool calls and its approvals belong to the conversation of the turn, as today. Today that conversation is active, because a turn blocks every selection. With two output chats the focus can move to the other output during a turn, so phase 1 makes the turn code read the conversation of the turn, never active.
  • New desktop.primaryWorkspace: the snapshot field workspace.
  • The core reads the layout of a workspace from workspaceLayouts by id, not from the top-level layout and requestedLayout, which keep their meaning: the primary workspace.

Core sites that read "secondary"

Decision: a workspace window on an extra output reports output: "secondary" and its outputName, because output means the output that shows the window now. A new boolean shared tells a window of a shared grid. Each site below reads shared instead of output === "secondary", and gets one Node test.

Site Today New rule
desktop-client.js:153 (setWorkspace wait) Waits for state.workspace === active and no visible non-secondary window of another workspace. Under a live lease, waits until active shows on an output (workspace === active or an outputs[].workspace === active), not for focusedWorkspace === active. A visible window is fine when it is shared or its workspace shows on an output. Without a live lease, the wait of today. See The focus during a selection.
desktop-client.js:555 (agent window action) Refuses a window of another workspace unless it is secondary. Refuses a window of a workspace other than the workspace of the turn, unless it is shared. The workspace of the turn can show on any output.
smithay.js:830 (grid action) Same as above. Same as above.
desktop.js:334 (canvasWindow) A canvas window of the active workspace, not secondary. Not shared, workspace is the workspace of the turn, and the layout of that workspace (from workspaceLayouts) is Canvas.
desktop.js:345 (onCanvasBase) Not shell, not secondary, on a canvas base. Not shell, not shared, on a canvas base.
desktop.js:395 (sameGrid) Secondary windows share a grid by output. Shared windows share a grid by outputName; other windows by workspace.
desktop.js:779 (arrange_windows) Windows of the active workspace, not secondary. Windows of the workspace of the turn that are not shared, on whatever output shows it.
workspaces.js:50 (observe) Binds an unbound window to active. Under a live lease: its parent's workspace, else window.workspace; a shared window keeps the rule of today (W5).
memory-policy.js:185-196 (protectedWorkspaces) active, state.workspace, activeWorkspace. Also every outputs[].workspace.
window-session.js:30 (placement) Saves no cells for a secondary window. Saves no cells for a shared window. A workspace window on an extra output keeps its cells: the grid is 6 x 4 on every output.
window-session.js:61 (canvasField) Saves no canvas rectangle for a secondary window. Same with shared.

Core reads of the active workspace

Phase 1 adds desktop.turnWorkspace: the conversation id of the turn that runs (turn.conversation, server.js:303), set when the turn starts and cleared when it ends, or null. desktop.agentWorkspace() gives turnWorkspace when it is set, else activeWorkspace. Every agent tool handler reads agentWorkspace(), never activeWorkspace. Each read of the core sorts into one class, with one Node test per class:

Class Sites Rule
Turn workspace (agentWorkspace()) desktop.js:186 (held windows of an agent layout), desktop.js:315 (canvasBase), desktop.js:335 (canvasWindow), desktop.js:781 (arrange_windows), desktop-client.js:341 (the open_application wait), desktop-client.js:487 and :557 (agent window actions), smithay.js:832 (grid action) The workspace of the turn, wherever it shows.
Focused workspace (activeWorkspace) smithay.js:1349 (observe, only without a live lease; see W5), the chat page (/api/state until phase 2) activeWorkspace, which follows focusedWorkspace under a live lease (W8).
Shown workspaces memory-policy.js:185-196 (protectedWorkspaces) The set gets every outputs[].workspace too, so the core never proposes to close a window that shows on an extra output.
Reconnect and unlock resend smithay.js:1180 and :1306 (workspace: this.activeWorkspace || 1) Unchanged: the core sends active. Under a live lease the selection rule then only moves the focus when active shows on an extra output, so nothing moves between outputs. A new connection has no live lease yet (The lease), so the rule of 6d54d19 applies there.
Login restore window-session.js:280, :440, :462 Unchanged in phases 1 to 5: the core renews the lease only after the restore ends (The lease), so the restore runs with the rule of 6d54d19. Phase 6 (built on 2026-11-03) keeps that order and adds an outputs step after the restore, under the leases (W11, As built (phase 6)).

Archive and create

  • A new workspace (the session route create) is a selection of a workspace that no output shows: the focus output shows it (W3).
  • The compositor clears a shown entry whose workspace leaves the workspace order (workspace_order): that output shows its shared grid again, as for W4. When it was the focus output, the focus output becomes the primary output, and active follows (W8).
  • archiveConversation (conversations.js:50) picks the next active when the archived workspace was active. Under a live lease it skips the workspaces that another output shows. With none free, it creates a new conversation, as it does today with no open conversation left. The pick is then a selection by the rule of W3.
  • Unarchive (unarchive) is a selection of a workspace that no output shows.
  • Tests (Node): an archive of a workspace on an extra output, an archive of the focused workspace that skips the shown workspaces, a create with the focus on an extra output. (Rust): a workspace_order without a shown id clears that entry and moves the focus.

The focus during a selection

A press on another output can change focus_output and focusedWorkspace while a selection waits, or while a selection block holds. setWorkspace therefore never compares focusedWorkspace with active, and it never sends workspace a second time:

  • setWorkspace(W) sends one workspace {W} command and waits until W shows on an output. The compositor moves the focus to the output of W when it applies the command. A press after that is the newer input of the user and wins.
  • When the wait ends and focusedWorkspace differs from W, the selection still ends with active = W. Then active follows focusedWorkspace (W8), so the last press decides active.
  • The login restore (window-session.js:285, 295) uses the same wait.

A focus change never changes the conversation of an output chat, because each output chat shows the workspace of its own output. So active can follow focusedWorkspace also while a block holds. Only a selection or a step, which changes the workspace of an output, waits for the block, as today.

Tests (Node, synthetic compositor): a press on another output during the wait of setWorkspace, then the selection ends with no timeout and no second workspace command, and active follows the new focusedWorkspace after the selection; a press on another output during a turn, then active follows at once, the turn keeps its conversation, and its tool calls act on the workspace of the turn.

The lease

The lease follows canvas::Lease (canvas.rs:618-663), as a second instance of the same type.

  • The compositor starts with the lease off. With the lease off, every extra output shows its shared grid, focus_output is the primary output, workspace behaves as at 6d54d19, and the compositor queues no workspace_drop request.
  • The command workspace_outputs_enabled {enabled}. On adds the connection to the holders and clears the grace time. On is accepted while locked: allowed_while_locked gets WorkspaceOutputsEnabled {enabled: true} only.
  • Off clears every assignment: each extra output shows its shared grid, each workspace on an extra output shows on no output, its windows keep their workspace, and the focus output becomes the primary output. Off is refused while locked ("Session is locked"). Since 2026-11-03 the core never sends off: the lease ends only with the grace time below. (History: until then the setting off sent it, set workspaceOutputsOffAfterUnlock to send it again after the unlock and cleared the replug memory, W12.)
  • When the last holder connection closes, the grace time (crate::canvas::GRACE, 60 s) starts. A renewal within it keeps every assignment. At its end (expired, from the control timer, also while locked) the compositor applies the off rule. While locked, no output shows content, so the change shows at the unlock.
  • When the lease loses its last holder, a running drag grab is cancelled and nothing moves.
  • One predicate decides every new rule: live = enabled && holders non-empty. The grace time is enabled && holders empty && !expired. It keeps the shown map, so the windows and the output chat of a workspace on an extra output keep drawing there and the windows of its shared grid stay hidden (shown_slot, grid_of, grid_area, visible_window and target() read the map). Every rule of input and focus uses the rule of 6d54d19 while live is false:
    • focus_output becomes the primary output when live becomes false, and a press on an extra output does not change it. focusedWorkspace is the primary workspace.
    • Alt+Tab skips the windows on extra outputs, as today.
    • Super+T, Super+Shift+T, Super+F, Super+G and the keyboard actions act on the primary workspace. The client maximize branches on the layout of the workspace of its window, as in the Data model, because that is a rule of drawing.
    • workspace {W} uses the rule of 6d54d19: the primary shows W, and an extra output that showed W shows its shared grid. So an older core that connects in the grace time gets the behavior it expects.
    • The compositor queues no workspace_drop and refuses workspace_drag and workspace_output with disabled.
    • A renewal makes live true again. focus_output stays the primary output until the next press, selection or new window.
  • The core renews the lease after each connect, always since 2026-11-03 (before, only while the setting was on), and only after the login restore ends: it asks for state, checks capabilities.workspaceOutputs and capabilities.outputChats, then sends workspace_outputs_enabled {enabled: true}. The core asks for both capabilities from phase 1. A compositor of phase 1 reports only workspaceOutputs, so a core of phase 1 never makes the lease live in a real session, and the primary chat never shows a workspace other than the one of the primary output before the output chats of phase 2 exist. The phase 1 Node tests use a synthetic compositor that reports both capabilities. An older compositor ends the connection on an unknown command, so the capability check comes first. A failed renewal is tried again every 2 s on the same connection, and each try checks the capabilities again. The core sends no workspace command on a new connection before the renewal settles, other than the connect resend, which goes after a state query of that connection and runs with no live lease, so with the rule of 6d54d19.
  • Behavior depends on the lease, not on the static capability: a compositor with the capability and no lease behaves as at 6d54d19.
  • At the end of the grace time the core is not connected, so it does nothing then. At its next connect it reads outputs[].workspace (all null) and focusedWorkspace (the primary workspace), and active follows (W8). The host closes each output chat of an extra output, because no extra output shows a workspace.

Tests (Rust): the lease on, off, off while locked refused, the grace state (after the last holder closes: the shown map unchanged, focus_output the primary output, focusedWorkspace the primary workspace, a press on an extra output keeps focus_output, Alt+Tab skips extra outputs, Super+T acts on the primary workspace, the shared windows of an output with a workspace stay hidden, and the new rules again after a renewal), renewal while locked, grace start only at the last holder, renewal within grace, expiry clears the assignments, expiry while locked, the grab cancel at the loss of the last holder, workspace with the old rule in grace, no workspace_drop queued in grace. Tests (Node): the renewal order (state, capabilities, command), the retry every 2 s, no renewal on a compositor without either capability (also with workspaceOutputs only), no renewal before the login restore ends, and since 2026-11-03 no off from the core and no route to turn it off. (History: no renewal with the setting off, off after the unlock.)

The chat

Decision W8: one chat per workspace, shown on the output of that workspace (answered by the user). The user asked for "chat proprio" and then said "continua sendo um chat só por workspace". Every workspace already has its own conversation. A workspace on an extra output is a separate workspace with its own conversation, and its chat window shows on that output. A turn, its tool calls, its approvals and a scheduled turn act on the workspace of their conversation, wherever that workspace shows, as today. What is new is only the routing to the chat window of the right output and the keyboard focus.

The chat windows:

  • Each output that shows a workspace has one output chat (Terms). The primary output always has one: the chat of today, which now shows the primary workspace. An extra output that shows its shared grid has none.
  • The host creates an output chat for connector N when the host snapshot wm.workspaceOutputs.outputs[] has an entry {name: N, workspace} with a workspace, and the compositor reports capabilities.outputChats. It loads the same protected chat page with the fragment #output=N.
  • Declaration (window layers, The window link): the host asks for a token with POST /host-window {surface: "chat", output: N, token} and the host main key. The core builds the declaration from its chat template and adds output: N. No agent tool, generated HTML or trusted page declares an output chat. The compositor binds it as role chat on output N. The singleton rule of the chat becomes one chat per output: a second chat for the same output gets "Only one window for this role", and an output that is not a connected extra output gets the new typed refusal "Unknown output". The primary chat declares no output, as today. Every chat declares paints_workspaces: true, and the compositor tags the paint marker per chat window.
  • Destruction: when output N shows its shared grid again (W4, a move away, the end of the lease), or when N is unplugged, the host closes the output chat of N and calls /host-window-forget. There is no keep-alive. A close of an output chat never quits the host; only a close of the primary chat does, as today. The runtime repair of window layers applies to each output chat: an output chat that does not bind is created again.
  • Until the output chat of N binds, the workspace on N draws without a chat, and its chat cells show the wallpaper.

Routing in the core:

  • The chat page reads /api/state?output=N, and the primary chat reads /api/state with no output. The core answers with the conversation of the workspace that output shows. The primary chat shows the primary workspace, which is active when the lease is off, so nothing changes with the setting off.
  • /api/send, /api/retry, the voice send, the approval answers and the tool permission dialogs name the conversation of the page. The core refuses when that conversation no longer shows on the output of the page, with the text of today: "A conversa mudou. Tente novamente." Else it acts on that conversation, as today.
  • The core keeps one turn at a time (turn, server.js:303), as today. A send from one output chat while a turn runs in another conversation gets the refusal of today for a send during a turn (open question 11).
  • Streaming: each output chat shows the stream of its own conversation. A conversation shows in at most one chat window, because a workspace shows on at most one output (W1).
  • Approvals stay in their conversation (c.approval). They show in the output chat that shows that conversation. focusChat (server.js:332) raises the output chat of the output that shows the conversation of the turn, and shows that chat when it is hidden only for an approval (the chat model of the parallel change).
  • isBlocked stays as today: a turn, a model selection, a change and an account login block every selection, step and move, on every output. A focus change is not a selection: active follows focusedWorkspace at once, also during a block, because no output chat changes its conversation with the focus. When focusedWorkspace differs from store.state.active, the core sets active to it, calls markOpened(next, previous.active) (workspace-navigation.js:239), saves the store and announces the selection. It sends no workspace command.
  • "Mostrar ao agente": the composer of an output chat captures the focused window of its own output. Phase 2 adds the capture of a named output to the compositor and removes the refusal of window-capture.js:79 for a window on that output. The capture goes to the conversation of that chat.
  • Voice: one recording at a time on the device, as today. The recording belongs to the chat that started it, and its send names the conversation of that chat.
  • Pinned surfaces are stored per conversation (surface-pins.js), so they show beside the chat that shows their conversation.
  • A scheduled turn runs in its conversation, as today. When its workspace shows on no output, its selection puts it on the primary output (W3, workspace {workspace, primary: true}). It never moves a workspace between outputs.

The keyboard:

  • A Super tap acts on the output chat of the focus output: it gives it the keyboard, or on a canvas it shows or hides it (the chat model of the parallel change). The focus output does not change. Without a live lease, this is the chat of today.
  • A press on an output chat gives it the keyboard and makes its output the focus output.

Glass and the chat visibility:

  • Chat glass regions: each output chat reports its own regions through /api/desktop-chat-glass-regions {regions, output?}, up to sixteen per chat, with the rules of today (web panels). The compositor keeps one set per output chat (ChatGlassRegions {regions, output?}). /api/desktop-chat-glass {glass, output?} is the same. The protected setting chatBlur applies to every chat.
  • The chat on a canvas: each output chat has its own visible or hidden state, with the model of the parallel change (centered, hidden by default, a Super tap toggles it). The route and the command of that change get an optional output. Only the protected host of that chat shows or hides it; the core and the host show a hidden chat only for an approval. The visibility is not saved (W11).
  • Without output, each route and each command acts on the primary chat, as today. The core sends output only with capabilities.outputChats, because Command uses deny_unknown_fields.

The cells: in the Grid layout each output chat is a tile of the workspace that its output shows (D2 of the tiling spec). The chat cells move with the workspace, so the grid comes back unchanged when the workspace returns to another output.

Memory: each extra output that shows a workspace adds one Chromium renderer for its output chat. Phase 2 measures it on the live layout (one extra output) and records the number. The renderer ends when the output chat closes.

Reason: the user asked for a complete workspace with its own chat on each monitor, and one chat per workspace. Alternative: one chat on the primary output that follows the focus (the earlier W8); replaced by the answer of the user.

Keyboard and focus

Keys Behavior with the lease on
Super+1..9, Super+0 Select that workspace (W3): focus its output, or show it on the focus output.
Super+Left/Right, the bar wheel, the three-finger swipe Step the workspace of the focus output (the step rule of W3; answer to open question 9). They skip the workspaces that another output shows. On the primary output they keep the slide and the interactive swipe. On an extra output the step is a cut; the compositor runs no thumbnail motion there and queues workspace_previous or workspace_next at the end of a swipe. The swipe neighbors of the compositor on the primary output skip the workspaces on extra outputs. The bar wheel changes in phase 4.
Super+S Opens the overview on the primary output. A card click is a selection (W3).
Super tap Acts on the output chat of the focus output (W8): the keyboard, or on a canvas the visibility of that chat. The focus output does not change.
Super+Shift+Left/Right Moves the focused window to the output on that side (W5). The focus output follows the window. Unchanged keys.
Super+Ctrl+Shift+Left/Right No binding in these phases. Free in the compositor today (grid_shortcut and output_side_shortcut both refuse it). See open question 5.
Alt+Tab Cycles the windows of the focused workspace on the focus output. It never crosses outputs. Windows of shared grids stay out, as today.
Super+L Locks every output, as today.
Grid keys (zoom, fill, move, resize, float) Act on the grid of the focused window, as today.
Super+T, Super+Shift+T, Super+F and Super+G on a canvas, the client maximize Act on the focused workspace, on the output that shows it. Phase 1 changes toggle_grid_layout, canvas_fills, canvas_focused and set_app_maximized, which act on the primary workspace today. A switch to Canvas on an extra output works from phase 3.

Focus rules:

  • A press gives the keyboard to the window under the pointer on any output, as today, and makes that output the focus output. A press on an output chat does the same.
  • A selection and a step move the focus as W3 says. A move moves the focus only when the moved workspace had it (The drop).
  • A new window takes the keyboard on its own output, as today, and makes that output the focus output.

Layouts on an extra output

Decision W9: a workspace keeps its layout on an extra output, with its output chat. Recommended:

  • Grid. The grid of the workspace covers the whole extra output, because there is no bar there. The grid is 6 x 4 cells on every output (D1), so each cell rectangle carries over without change. Windows get the new pixel sizes. The output chat takes the chat cells (W8).
  • Focus. The presentations of Focus place the output chat of that output, as on the primary output.
  • Monocle, Pair, Floating. They draw as on the primary output, with the output chat.
  • Canvas (phase 3). The workspace brings its own camera: the camera projects into the extra output, the fit viewport (fit_viewport, canvas.rs:266) is the whole extra output, because the floating chat reserves no strip, and pan, Super+scroll, pinch and the double click on empty canvas act on the camera of the workspace under the pointer. The downscale cache and the preferred fractional scale of canvasSharpZoom apply per output. The canvas lease, the agent limits and the lock gates apply unchanged.

Order and dependency of Canvas: Canvas on an extra output needs the data model of phase 1 (the camera uses are sorted per output there) and the output chat of phase 2 (the floating chat of that output is that chat). So it is phase 3, before the first visible step (phase 4). No user path reaches an extra output before phase 4, so no user ever meets a Canvas refusal. Until phase 3 the compositor kept a Canvas workspace on the primary output by an internal rule with no refusal code; phase 3 removed the rule. The replug memory (W12) and the login restore (W11) treat a Canvas workspace as any other workspace.

As built (phase 3, 2026-11-02):

  • The compositor reports capabilities.outputCanvas. The internal rule (canvas_bound) is removed: workspace and workspace_output move a Canvas workspace, also in Focus over a Canvas base, as any other workspace.
  • The camera of a workspace projects into the output that shows it. The canvas content area of a workspace is workspace_grid_area: the whole extra output, or the content area of the primary output. The fit viewport is that area with the 12 px margin (fit_viewport), because the floating chat reserves no strip.
  • A move between outputs keeps the camera and the canvas rectangles. carry_workspaces moves no window of a Canvas base: the canvas units stay, and the layout pass parks the windows at the anchor of the new output.
  • Input routed by the pointer output (pointer_canvas): Super+scroll, pinch, the two-finger pan, the left drag on empty canvas, the Super+middle drag, the double click on empty canvas and the settle act on the Canvas workspace of the output under the pointer. The primary output keeps its gates (the overview and a workspace transition); an extra output has neither. One camera animation runs at a time: a new animation of another workspace first puts the running one at its target. An animation drops the camera gestures only on the output that shows its workspace, and only an animation of the primary workspace holds the pointer of the primary output. The title-bar drag and the Super+Alt drag move a canvas window in canvas units of its own workspace, on any output (the drop takes a tile of the visible area since 2026-11-11, an edge snap before).
  • The keys act on the focused workspace: Super+Shift+T, Super+G (row), Super+F, the zoom keys and fit all. Super+Shift+T waits only for a camera animation of that workspace. When a hidden chat or another change takes the keys away, the focus repair gives them to a window of the focus output first, and to a window of another output only when the focus output has none; the focus output stays. A client maximize or fullscreen of a window on an extra Canvas workspace toggles the camera fit of that workspace; fullscreen also hides its chat.
  • The output chat is the floating chat of a Canvas workspace on its extra output: centered on that output, hidden or shown per workspace (the same dock_collapsed field as the primary chat). A Super tap queues the request; the core sends focus_chat {output}, which shows a hidden chat and gives it the keyboard, or hides a shown one. chat_dock {state, output} hides or shows it, and is refused with "Workspace is not in Canvas" when the workspace of that output is not in Canvas. While the overview of the primary output is open, chat_dock and focus_chat with the name of an extra output are refused with "The overview is open", as for the primary chat, although the overview does not cover that output; a refused focus_chat moves neither the keys nor the focus output. The chat glass (chat_glass with output) blurs the dock of that chat while it draws at its dock size; the chat regions do not apply there, as for the primary chat in Canvas.
  • The scene of an extra output draws canvas windows through the camera, cropped to the canvas content area of their workspace and culled outside it, with their popups. The downscale cache and the preferred fractional scale of canvasSharpZoom read the placements of every output; the overview of the primary output turns off only the primary output.
  • Each typed command has one target, recorded here: canvas_fit, canvas_restore, canvas_move and agent_window act on the workspace of the window, on any output. camera (set, restore) and canvas_arrange keep the primary workspace, because the core sends them for the login restore and arrange_windows, which phase 3 keeps on the primary workspace. The canvas lease, canvasSharpZoom, the agent limits (user_active, rate_limited) and the lock gates are unchanged and apply on every output.
  • Core: /api/chat-dock takes output (a connector name). setChatDock refuses an unknown output ("Unknown output") and, for an extra output, a compositor without outputCanvas ("Canvas on an extra output is unavailable"), a lease that is not live ("Workspaces on several outputs are unavailable right now"; "... are off" until 2026-11-03) and a locked session ("Session is locked"), all before transport; the name of the primary output stays the primary dock. The approval path expands the hidden chat of the output that shows the conversation of the turn, only with outputCanvas. canvasFitted reads the workspace of the window, so an agent fit or expand on an extra Canvas workspace confirms. The workspace_on_output refusals of arrange_windows and open_application stay, because canvas_arrange and the placement of the core still read the primary workspace; window_action move and fit already target the workspace of the window. Under a live lease an agent window_action focus, expand or restore of a canvas window of another workspace is refused with workspace_on_output (canvasOnOutput), because it would move the camera and the keys of the Canvas workspace of another conversation.
  • Not in phase 3: the replug memory (phase 4), the login restore of a Canvas workspace on an extra output (phase 6), a UI path to an extra output (phase 4).

Reason: the layout belongs to the workspace, and the user asked for a complete workspace on the other monitor. This answers open question 6 of canvas windows: the extra output gets no viewport of its own; a workspace that shows there brings its camera. Alternative: convert a Canvas workspace to Grid on an extra output; rejected, because it changes the layout of the user as a side effect.

Bars

Decision W10 (amended on 2026-11-03: each extra output gets the bottom bar, see Decision of 2026-11-03): the bars stay on the primary output and show where each workspace is (answered by the user, the HUD exception). The user excepted the HUD from the abilities of monitor 2 ("exceto HUD"), so the extra output gets no bar (open question 3, answered; see open question 10 for the reading).

  • The top bar and the bottom bar stay on the primary output only, as today. So do quick settings, notifications, the tray menu, the workspace-menu panel and the HUD plugin panels.
  • A bottom bar tab of a workspace that shows on an extra output gets a small monitor badge with the position of that output (2 for the first extra output from the left). Its tooltip names the connector, for example "Em HDMI-A-1". The bar of an extra output leaves off a badge whose number is its own output, also on a shared workspace (since 2026-11-10); a badge that names another output stays. The active pill marks the focused workspace; the workspace of each other output gets a quieter mark.
  • A top bar dot of a workspace on an extra output gets a ring style. It stays a selection (W3).
  • The tab order stays the conversation order. The tabs do not regroup by output.
  • The bottom bar reads the host snapshot wm. It gets wm.workspaceOutputs {enabled, outputs: [{name, position, workspace}], primary, focused, refusal}. The host also reads outputs[].workspace from it to create and close the output chats (W8).
  • The top bar reads barState. It gets only wm.workspaceOutputs {shown: [{workspace, position}]} for the rings.

Reason: the user starts the drag in the bottom bar, so the bottom bar must show the result, and the user excepted the HUD from the extra output.

Overview, previews and planes

  • The overview stays on the primary output, with every open workspace as a card, also the workspaces on extra outputs.
  • A card of a workspace on an extra output gets the same monitor badge as the tab (web, in the protected host). A card click is a selection (W3): it moves the focus to that output.
  • The live plane and the PNG preview of a workspace on an extra output render with the geometry of that output (its aspect ratio), from scene::workspace_elements with the geometry parameter. That output already draws it live, so the plane adds only one offscreen render at 10 Hz or less while the overview shows it.
  • The overview has no drag of any kind, and the workspace drag does not start from it.

Transitions and glass

  • The slide and depth transitions stay on the primary output. Their planes never include a workspace that shows on an extra output.
  • An extra output changes its workspace with a cut: a selection, a step, a move. A short crossfade is a later polish item, never required. Reduced motion always cuts.
  • A move that changes the primary workspace runs the normal slide on the primary output and a cut on the extra output.
  • The bar glass of the primary bar stays on the primary output. Since 2026-11-10 the bottom bar of an extra output has its own bar glass, drawn on its own output (web panels, The bar of an extra output). The chat glass of each output chat draws on its own output (W8). The ghost has no glass.

Lock

  • The lock covers every output, as today. No output shows workspace content while locked (lock screen).
  • workspace_drag, workspace_output and workspace_outputs_enabled {enabled: false} are refused while locked. Only workspace_outputs_enabled {enabled: true} is in allowed_while_locked, so a core that restarts behind the lock keeps the assignments. The workspace command keeps its lock rule of today.
  • The lock cancels a running drag. Nothing moves.
  • The assignments and the focus output stay through the lock, and the unlock shows them again.
  • An output that is plugged in while locked gets its lock surface, as today, and starts with its shared grid and no workspace. No content shows until the unlock.
  • An output chat stays under the lock surface of its output, as every window does. The lock covers the composer of each chat.
  • The core keeps the pairs that it could not apply while locked (the replug memory of W12 and, since phase 6, the outputs step of the login restore) and sends them after the unlock, under the normal refusals.

Tests: (Rust) each command above refused while locked and the renewal accepted; a drag cancelled by the lock; an output plugged in while locked gets a lock surface and no workspace; the assignments the same after the unlock. (Node) a remembered pair for a connector plugged in while locked is sent after the unlock; a restore pair refused by the lock is sent after the unlock; off while locked is sent again after the unlock.

Persistence and the login restore

Decision W11: save the assignments by connector name. Recommended:

  • window-session.json gets two additive fields: workspaceOutputs: [{workspace, output}], where output is a connector name such as HDMI-A-1, and primaryWorkspace. The record stays at version 1. An older core drops the fields at its first save, as it drops the canvas fields.

  • The new core saves the windows of a workspace on an extra output as windows of that workspace, with their cells. It reads shared, not output === "secondary", to skip shared grid windows.

  • The login restore runs as today: it shows each saved workspace on the primary output, opens and binds its windows. Then it shows primaryWorkspace on the primary output, sends workspace_output for each saved pair whose connector is connected and whose workspace is still open, and selects the saved active workspace last, which moves the focus to its output (W3). A missing connector and a closed workspace are skipped, not errors. The host then creates the output chats from the snapshot (W8).

  • The visibility of an output chat on a canvas is not saved. Each output chat starts hidden on a canvas, as the chat model of the parallel change does. The collapsed docks of window-session.json (window-session.js:85-93, 375-393) follow that change, not this spec.

Reason: an output ID changes at each start, a connector name does not. Alternative: no persistence, each login starts with every extra output on its shared grid.

As built (phase 6, 2026-11-03, with phase 5 of one workspace list, one camera per monitor):

  • The record stays at version 1 and gets primaryWorkspace and workspaceOutputs: [{workspace, output}] (one entry per extra output that shows a workspace, by connector name, at most 16, one workspace per connector; a workspace can repeat on several connectors since the shared views). The load validates each field on its own (exact keys, a workspace id from 1 to 2^32-1, a valid connector name of at most 64 characters from [A-Za-z0-9._-], no repeated connector, the size); a malformed field only loses itself and never blocks the restore. An older core ignores and then drops both fields at its first save.
  • Deviation from the order of W11, resolved by the safest reading: the lease section says that the core renews the leases only after the restore ends, so the restore cannot send workspace_output (a compositor refuses it with disabled without a live lease). The restore therefore runs as before (every saved workspace on the primary output, the active one last) and leaves a plan in memory (WindowSession.outputPlan). The outputs step (WorkspaceNavigation.restoreOutputs, web-shell/core/workspace-navigation.js) runs the plan once the workspace_outputs lease of that connection is live, and the shared_workspaces lease too on a compositor with sharedCanvas, with no lock, selection block, replug move or restore: (1) when the saved active workspace goes to a connected extra output, the saved primaryWorkspace shows on the primary output (workspace with primary and focus_only); (2) each saved pair whose connector is connected, whose workspace is open and whose output shows nothing yet goes as a replug move (workspace_output, the normal refusal function, no refusal on the tab), and a pair whose workspace another output shows goes only when that workspace can show on several outputs (W1); (3) the camera of each saved view (shared-workspace-cameras.md, phase 5); (4) the saved active workspace gets the focus on its output (workspace with focus_only), or goes to the primary output when it shows on no output. A missing connector and a closed workspace are skipped. A passing refusal (busy, restoring, locked, invalid_primary), a lock or a lost connection keeps the rest of the plan for a later snapshot, so a pair refused while locked goes after the unlock. A new compositor instance or a compositor without workspaceOutputs and outputChats drops the plan.
  • The saved active workspace is the active conversation of the store at the start of the restore; the record keeps no output for it. A shared active workspace gets the focus on its lowest-order view.
  • The saved assignments (review round 1, C1). A save writes the compositor snapshot, and the outputs plan runs only after the leases go live, so the first save after the restore would have lost the saved pairs, the extra view cameras and the saved primary workspace before the plan ran. Each save therefore merges what this login has not applied (keep, mergedPairs, mergedViews and mergedPrimary in web-shell/core/window-session.js):
    • Pairs: the live pairs, then each saved pair of an output that shows no workspace now (not connected, or connected and free). An output that shows a workspace writes that workspace, and its saved pair leaves for good, so a pair that the plan applied and a workspace that the user showed there are the live ones. A user move or a "Tirar de N" (moveWorkspace without replug) drops the saved pairs of its target, of the output that it leaves and of each output that showed the workspace before. A missing connector never drops a pair: it applies at a later login, never in the middle of a session (see the connector set below). A saved pair whose connector is the primary output of this login is skipped by the plan and stays saved.
    • Views: a saved view that the plan has not handled yet wins over a live view on the same output. Once handled, the live view wins, and a saved view with no live view stays only on a connector that is not connected or that keeps its saved pair.
    • primaryWorkspace: the saved one while step 1 has not run and no user change happened, and while the live primary workspace is one that a kept pair still sends to an extra output (the next login then shows the saved one on the primary output); else the live one. It stays in the immediate save class: a primary switch is a user-paced selection, not a per-frame change, and an immediate write keeps the file right on a crash.
    • A core restart in the same login (the instance is claimed, so it makes no plan) starts from the file and keeps what the earlier core kept.
  • The plan stores the extra connectors connected when it was made; a connector leaves the set at its first disconnect, so a monitor plugged in later, or replugged while the plan waits for an unlock, takes no saved pair in this session (review round 1, W1). The plan ends once its runs have stopped on a passing refusal (busy, restoring, invalid_primary) for 30 s while the session is unlocked and connected (outputPlanRefusalTime, review round 2; round 1 counted 20 runs, which depended on the poll rate). A run that ends locked or disconnected restarts the clock, so pairs wait for the unlock.
  • The user epoch (review round 1, W2). A selection, a user move, a replug move of the replug memory and a focus output change that no step of the core made move desktop.userOutputEpoch; the plan records it. Once it moved, steps 1 and 4 go, step 2 still opens a pair only on an output that shows nothing, and step 3 restores the camera only of a view that the plan opened or whose camera did not move since the plan was made.
  • A lock or a lost connection between the steps, before each camera and in the catch of steps 3 and 4 keeps the rest of the plan (review round 1, W3).
  • restoreViewCamera without the viewCamera proof logs once per core.
  • Review round 2:
    • A user move or "Tirar de N" also takes its outputs out of the live plan (pending pairs, pending views and the pairs the plan opened), so a plan that waits on a passing refusal never reopens a workspace on an output that the user changed, nor restores its old camera (M1).
    • The compositor moves the focus output for workspace (also with focus_only) and for workspace_output of the focused workspace (desktop.rs workspace_command, workspace_outputs.rs workspace_output_command), and its state answer can come in a later snapshot than the reply. A snapshot during a step of the core (a plan run, a selection, a move, the login restore) and the first snapshot after it only take the focus output as the new base, so the plan's own steps move no user epoch. The state answers and the replies share one ordered socket, so the first snapshot after a reply shows its effect (M2).
    • With no user epoch, a view that showed when the plan was made keeps its camera when that camera moved since (a pan or a zoom in the compositor alone), and step 4 goes only while the primary output shows the workspace the plan left there (expectedPrimary: the one at plan time, or the saved primary after step 1), which catches a Super+arrow switch in the compositor alone (L3). Until step 3 handles a view, mergedViews writes its saved camera, so for a short time the file can hold a saved camera that step 3 then skips; the next save writes the live one.
    • A user move or "Tirar de N" of workspace X also drops the saved pairs of X (and their views) on connectors that are not connected: the user chose where X goes (L1).
    • A user selection writes the live primary workspace (forgetPrimary), also when a kept pair would otherwise keep the saved one (L2).
  • Not built: the replug memory across a core restart (W12, the second half of phase 6). The memory still lives in the core only. The plan is in memory too, so a core restart during the outputs step (or while it waits for the unlock) loses the steps that did not run in this login, but the file keeps their pairs and views for the next login (the merge above).
  • Remaining risk of connector-name matching: a different monitor on the same port gets the saved workspace at the next login, because the record keeps only the connector name. The record keeps no EDID or monitor identity. A possible follow-up is to save the monitor identity with each pair and skip a pair whose identity differs.
  • Tests: web-shell/test/output-persistence.test.js (save, load validation, the b236a34 loader round trip, the restore that opens no pair, the outputs step with its order, a missing connector, a closed workspace, a single-view workspace on another output, the lease wait, the lock and the unlock, a lock during the primary switch, the plan dropped by a new instance or an older compositor, the boundary scan; since review round 1 the saves while the plan waits and in its middle, a core restart after an interrupted plan, the live output and the user change after the plan, the kept primary workspace, the connector set, the refusal bound, the user epoch and what moves it, a lock during the cameras and during the final selection, the single log without viewCamera; since review round 2 a user change of an output while the plan waits, a late focus answer of a plan step, a pan and a primary switch in the compositor alone, the kept pairs of a moved workspace on a missing connector, the primary workspace after a user selection and the time bound).

Agent tools and desktop_state

  • desktop_state reports, for each output, workspace (the shown workspace id, or null), and the top-level focusedWorkspace. Each window reports shared (true for a window of a shared grid). output and outputName keep their meaning: the output that shows the window now.
  • No agent tool moves a workspace between outputs. The agent cannot send workspace_output or workspace_drag, and no tool action maps to them. A scheduled turn cannot either (W8).
  • Agent tools act on the workspace of the conversation of the turn, as today, wherever that workspace shows (W8). Today that workspace is store.state.active; from phase 1 the core reads the conversation of the turn, because the focus can move to another output during a turn. open_application binds the new window to it, so W5 moves the window to the output that shows it. arrange_windows arranges it on its output only from the phase that gives the compositor layout and canvas_arrange commands a workspace: in phase 1 these commands act on the workspace of the primary output, so under a live lease the core refuses an agent arrange_windows (grid, tile and row) with workspace_on_output when the workspace of the turn is not the workspace of the primary output (state.workspace). Window actions on a window of another workspace are refused, also when that workspace shows on an extra output; windows of shared grids stay allowed, as today.
  • Phase 1 limit: the placement of open_application (smithay.js placeApplication) reads the layout of the primary output and can send it a presentation or a layout. So under a live lease an agent open_application is refused with workspace_on_output when the turn workspace is not the workspace of the primary output, as arrange_windows is. The phase that gives the placement a workspace removes this refusal.
  • window_action send_to_output (agent) is refused with workspace_on_output when the move would put the window in a workspace other than the workspace of the turn: when the target output shows another workspace, or when the window belongs to another workspace. It still moves windows between the workspace of the turn and a shared grid. Reason: these moves would move a window into the workspace of another conversation.
  • This refusal is core-side, before the command, as the agent tool refuses first today (noAgentWindow, desktop.js:723-724, and wrongLayout, desktop.js:321). The core reads outputs[].workspace and windows[].shared from the snapshot. With an older compositor (no capability) or no lease, no extra output shows a workspace, so the refusal never triggers. With an older core in the grace time, the refusal is missing; the cost is one window in another workspace, which the user moves back (see Version skew).
  • Window actions on a window of the workspace of the turn on an extra output act on that grid or canvas, with the same refusals: held windows, shell windows, the lock, and the canvas limits of phase 7 of canvas windows. The compositor target() accepts such a window, because it shows.

Security and the protected-host boundary

  • Only the protected bottom bar starts a drag, and only the protected workspace-menu panel sends a menu move. Both use protected routes with the launch cookie, as /api/overview-planes does.
  • The compositor checks, on its own side, that a drag starts from a held press on a bound bar window with edge bottom of the registered host client. A forged route call without that press gets no_press or not_bar.
  • Generated HTML runs in opaque iframes without the token and cannot call the routes. Isolated plugins of web-panels.json have no route to the bar and cannot bind a bar declaration or the workspace-menu declaration. No plugin starts a drag or moves a workspace.
  • The compositor never applies a drop by itself: it queues an input request, and the core decides, as for every other workspace change.
  • Window content never reaches the web: the ghost is drawn by the compositor, and the bar gets only workspace ids and connector names.
  • The saved assignments (W11) match a monitor by connector name only. A different monitor on the same port gets the saved workspace at the next login; the record keeps no EDID or monitor identity. Saving the monitor identity is a possible follow-up.
  • An output chat is a protected host window, as the primary chat. Only the Electron main process asks for its token with the host main key, and the core builds its declaration from its own template (W8). Its inline responses stay in opaque iframes. The capture of an extra output goes only to the composer of the output chat of that output, after the user sees it, as today.
  • These rules bind the agent tools and generated HTML. They are advisory against a prompt-injected agent that uses execute_command, which runs as the user (self-maintenance, "What a job can still reach").

Negative tests:

  • Phase 2 (Rust): a chat declaration with output from a client that is not the host is refused; a second chat for the same output gets "Only one window for this role"; an output that names no connected extra output gets "Unknown output". (Node): /host-window with output refuses the launch key and accepts only the host main key; /api/state?output=N and /api/send with a conversation refuse a request without the launch cookie.
  • Phase 4 (Node): /api/workspace-output (and /api/workspace-outputs-enabled until its removal on 2026-11-03) refuse a request without the launch cookie, and a request from the origin of an isolated plugin and of generated HTML. No agent tool name and no tool action reaches workspace_output. A scheduled turn cannot call it.
  • Phase 5 (Node): /api/workspace-drag gets the same three refusals. (Rust): a workspace_drag while a press is held on a forged bar declaration (a window of another client, or an isolated plugin that tries to declare bar) gets not_bar; a held press on the top bar gets not_bar.

Typed commands, snapshot and capability

Name Kind From Notes
capabilities.workspaceOutputs snapshot compositor The compositor understands the lease, workspace_output, the workspace rules and the snapshot fields below (phase 1).
capabilities.outputChats snapshot compositor The compositor binds one chat per output and takes output on the chat commands (phase 2). From phase 1 the core renews the lease only when the snapshot has both capabilities (The lease).
capabilities.outputCanvas snapshot compositor Canvas draws on an extra output (phase 3). A compositor without it keeps a Canvas workspace on the primary output by its internal rule (W9), and the core sends chat_dock with the name of an extra output only with it.
window_declare chat with output command core (host connection) Optional connector name. One chat per output. Refusals: "Only one window for this role", "Unknown output".
chat_glass_regions, chat_glass and the chat visibility command with output command core Optional connector name; without it, the primary chat, as today. Sent only with capabilities.outputChats.
workspace_outputs_enabled {enabled} command core The lease. Only enabled: true is allowed while locked.
workspace_output {workspace, output, primary?} command core output is a connector name or null. primary as in The drop. Refusals: no_output, unknown_workspace, no_other_workspace, invalid_primary, locked, disabled.
workspace {workspace, animate?, primary?} command core Unchanged name. A selection that changes only the focus, or that changes an extra output, runs no transition: the compositor calls workspace_transitions.workspace_command only when the primary workspace changes, and animate applies only then. Under a live lease, the selection rule of W3; in the grace time and with no lease, the rule of 6d54d19. The new optional key primary: true puts a workspace that no output shows on the primary output and moves the focus there (W3); only a scheduled selection sets it. The core sends primary only with capabilities.workspaceOutputs, because Command uses deny_unknown_fields.
workspace_drag {workspace} command core Starts the grab. Refusals in "Start handshake".
workspace_drop {generation, workspace, output} input request compositor Queued only under a live lease. Acknowledged with acknowledge_input.
outputs[].workspace snapshot compositor Shown workspace id, or null.
focusedWorkspace snapshot compositor The focused workspace.
windows[].shared snapshot compositor True for a window of a shared grid.

Changes to validState in phase 1: outputs[].workspace (null or a safe integer of 1 or more), windows[].shared (boolean when present), focusedWorkspace (a safe integer when present). In phase 5: the input request kind workspace_drop with the exact keys generation, kind, output, workspace, workspace a safe integer of 1 or more and output a string of 256 characters or less. Tests: each valid shape, each invalid shape throws, and an unknown key on workspace_drop throws.

Protected routes: /api/workspace-drag, /api/workspace-output (the setting workspaceOutputs with /api/workspace-outputs-enabled is history since 2026-11-03); the field step on the session route select (the bar wheel); the key output on /host-window (host main key only), /api/state, /api/desktop-chat-glass-regions, /api/desktop-chat-glass and the chat visibility route. No agent tool and no generated HTML reads or changes them.

Version skew and rollback

  • The compositor starts with the lease off and shows no workspace on an extra output. Only workspace_outputs_enabled turns it on, and only a new core sends it, after each connect, on a compositor with both capabilities (see The lease).
  • A new compositor with an older core: no lease, so the behavior equals 6d54d19.
  • A new core with an older compositor: no capability, so the core sends no new command and no new key, refuses the routes with unsupported, and the host shows no badge, no drag and no menu.
  • An older host with a new core: no drag, no menu and no output chat. A tab click is still a selection (W3). A workspace on an extra output then draws without a chat, and its chat cells show the wallpaper. The rollback order below avoids it.
  • A new core with a compositor of phase 1 (no capabilities.outputChats): the core does not renew the lease, so the behavior equals 6d54d19.
  • An older core during the grace time can connect:
    • its validState accepts outputs[].workspace, windows[].shared and focusedWorkspace, because it ignores extra keys of the top level, of windows and of outputs (verified at smithay.js:199-349);
    • it never gets a workspace_drop request, because the compositor queues none without a live holder and cancels the grab when the lease loses its last holder; an unknown kind would make it throw "Invalid Smithay input requests" and disconnect;
    • its workspace command gets the rule of 6d54d19, so its setWorkspace wait ends;
    • it sends no wm.workspaceOutputs, so a new host closes the output chats; the workspace on the extra output draws without a chat until the grace time ends;
    • it reads a workspace window on an extra output as a shared window. Its window-session save drops those windows from the record, and its agent send_to_output has no workspace_on_output refusal. That costs only their saved cells at the next login (best effort), or one window in another workspace. The rollback order below avoids it.
  • Rollback order, also for the persistent plan of host and core maintenance (self-maintenance): since 2026-11-03 there is no setting to turn off first. Roll back the host, the core and the compositor together, or rely on the lease end: an older core does not renew the lease (it reads no saved setting, because the new core dropped it, so its default is off), and the compositor applies the off rule at the end of the grace time, 60 s after the new core goes away. (History: turn the setting off first, then roll back.) The first save of a new core drops the workspaceOutputs key from state.json: an expected hash change in a before/after comparison of the profile, not data loss. A rollback core reads the missing key as off, renews no lease, and the leases end through the 60 s grace.
  • Phase 3, a new core with a compositor of phase 2 (no capabilities.outputCanvas): the core refuses /api/chat-dock for an extra output ("Canvas on an extra output is unavailable"), the approval path expands no hidden chat of an extra output, and the compositor keeps a Canvas workspace on the primary output by its internal rule. Handled, with Node tests.
  • Phase 3, a core of phase 2 with a compositor of phase 3 under a live lease: the compositor can show a Canvas workspace on an extra output, but the old canvasFitted reads state.workspace, so an agent fit or expand of a window of that workspace reports "not confirmed" although the camera moved, and the old core sends no chat_dock with an output. Roll back the core and the compositor together (the setting that could stay off is gone since 2026-11-03).
  • Phase 4, a new host with an older core: the host needs the new core for the wheel under a live lease and for the menu. A core of phase 2 or 3 under a live lease sends wm.workspaceOutputs with enabled, so the new host sends select {step}, which that core answers with "Argumentos inválidos.", and offers the right click, but that core has no /api/workspace-menu or /api/workspace-output, so the menu shows an error. Without a live lease the wheel sends select {id} and works with an older core. Roll back the host and the core together (the setting off was the other path until 2026-11-03).
  • No new check in scripts/check-host-skew.py is needed: the lease covers the skew.

Performance

  • An extra output that shows a workspace draws the same kind of elements as a shared grid today, plus its output chat. No added cost when still.
  • Each output chat is one more Chromium renderer while its output shows a workspace (W8). Phase 2 measures it.
  • The ghost is one offscreen render at 10 Hz or less during a drag, and nothing after it.
  • The dim is one quad per output during a drag.
  • A move configures every window of the moved workspace with new sizes. Clients take the new size at their own speed, and the existing clip rule covers the gap.

Binding contract (from AGENTS.md)

This section holds, word for word, the rule that AGENTS.md kept for this feature until 2026-11-10, when AGENTS.md was reduced to the short invariants (openspec/changes/audit-2026-11-10/design.md, F10). It binds exactly as AGENTS.md does; AGENTS.md keeps the short invariant and points here. Change both in the same commit.

  • Workspaces on several outputs (openspec/specs/multi-output-workspaces/spec.md, phase 4): only the protected host moves a workspace to another output, through /api/workspace-output and the protected workspace-menu panel (a right click on a bottom bar tab). Since 2026-11-03 the feature has no settings toggle: the core always renews the lease workspace_outputs on a compositor that reports capabilities.workspaceOutputs and capabilities.outputChats, and the lease end (the core goes away) is the version-skew safety (the user: "remover opcao de mostrar workspace em outros monitores, ela deve ser ativo sempre, nao uma feature flag"). No agent tool, scheduled turn, generated HTML or isolated plugin panel reaches these routes or the panel id. Since 2026-11-03 (openspec/changes/multi-output-workspaces/design.md, Decision of 2026-11-03) the core opens a new empty Canvas workspace on an extra output that shows nothing and has no saved or replug pair, and the Electron host opens one protected bottom bar per extra output that shows a workspace, declared by the core from the bottom-bar template with output only on capabilities.outputBars; the other HUD surfaces stay on the primary output. Since phase 2 of openspec/specs/shared-workspace-cameras/spec.md the core also renews the lease shared_workspaces (on the connection of a live workspace_outputs lease and only with capabilities.sharedCanvas), and a Canvas workspace can then show on several outputs, one camera per output: a selection opens it on the focus output, the menu and the bottom bar open it on one more output ("Abrir também em N") and "Tirar de N" takes it off that output only (/api/workspace-output with from). The resends of workspace by the core (the reconnect, the unlock, the login restore, a rollback) carry focus_only and never open a view. Since phase 4 of that spec a Grid workspace can show on several outputs too, only when the compositor reports capabilities.sharedGrid: the core then adds grid: true to the renewal (a Grid shares only while every live holder of the lease named it, and a renewal without it collapses the Grid views, also while locked), the formation keeps one size and each view starts fitted, with independent user pan and zoom per monitor since the later decision of 2026-11-03 in that spec, every Grid view floats its own output chat (the snapshot key gridViews), and an approval shows only in the chat of the agent view. No agent tool, scheduled turn, generated HTML or isolated plugin panel opens, closes or moves a view. Since phase 5 of openspec/specs/shared-workspace-cameras/spec.md (with phase 6 of openspec/specs/multi-output-workspaces/spec.md, W11) window-session.json also saves primaryWorkspace, workspaceOutputs: [{workspace, output}] by connector name (a workspace can repeat) and views: [{output, x, y, zoom}] of each Canvas workspace, at version 1; the core validates every field on load. The login restore keeps its order and the rule that the leases are renewed only after it ends; then the core's outputs step opens each saved pair whose connector is connected (as a replug move, under the normal refusals, after the unlock when locked), restores each view camera (camera with output only after a state proof of capabilities.viewCamera) and gives the saved active workspace the focus with focus_only. The replug memory brings a shared view back on its connector for the session. No route, agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reads or writes these assignments.