Galaxy Shell / docs
Docs / Interface and features

One workspace list, one camera per monitor

openspec/specs/shared-workspace-cameras/spec.md · Edit on GitHub ↗

On this page

One workspace list, one camera per monitor

Purpose

Lets every monitor show the same list of workspaces, each output looking at a shared Canvas or Grid workspace through its own camera, so different monitors show different parts of it.

Requirements

Requirement: Security boundary of views

No agent tool, scheduled turn, generated HTML or isolated plugin panel SHALL open, close or move a view or pan or zoom a camera freely; only the protected bottom bar and the protected workspace-menu panel SHALL open a workspace on an output, and the agent camera actions stay typed and limited. Full text: section Security.

Scenario: Agent asks for a view

  • WHEN an agent tool tries to open or move a view
  • THEN it has no way to; only typed camera actions of the agent view exist

Requirement: One camera per Grid view

A user pan or zoom of a Grid view SHALL store a camera for that (workspace, connector) pair and only that view SHALL use it; zoom in SHALL stop at 1:1, the chat and bars SHALL stay in screen space, and no new model tool, protected setting or route is added. Full text: section Decision of 2026-11-03: independent navigation on Grid views.

Scenario: Pan on the second monitor

  • WHEN the user pans the Grid view of one monitor
  • THEN only that view moves and the other monitor keeps its camera

Requirement: Shareable and single-view workspaces

A shareable workspace (Canvas or Grid) SHALL be able to show on any number of outputs, a single-view workspace (Focus, Monocle, Pair, Floating) on one, and the primary output SHALL always show one workspace; a layout change of a workspace with several views to a single-view layout does nothing from the keys and MUST be refused with workspace_shared from a command. Full text: section Rules.

Scenario: Layout change with two views

  • WHEN a workspace shows on two outputs and a command asks for Focus
  • THEN the compositor refuses with workspace_shared

Requirement: Collapse of views

When a workspace with several views can no longer have them, it SHALL keep its lowest-order view and the other outputs SHALL go back to their static grids, with the state of every view kept for the session. Full text: section Rules.

Scenario: Lease ends

  • WHEN the shared_workspaces lease ends
  • THEN the workspace keeps its lowest-order view and the other outputs return to static grids

Requirement: Camera per view and its seed

The camera, its fit state and the chat visibility SHALL be stored per pair (workspace, connector name); a view that opens SHALL take the stored state of that pair, else the center point and zoom of the lowest-order existing view, else the default camera. Full text: section Rules.

Scenario: Replug

  • WHEN a connector is replugged in the same session
  • THEN its view takes the stored camera back

Requirement: Formation is sized by the primary output

The Grid formation rectangle SHALL be stored on the workspace and sized by the primary output while it shows the workspace; a selection on the primary output, an unplug or a second output opening the workspace MUST NOT resize a window. Full text: section Rules.

Scenario: Second output opens the workspace

  • WHEN a second output opens a Grid workspace
  • THEN no window is resized

Requirement: Windows draw on every output of their workspace

A window SHALL belong to its workspace and draw on every output that shows it, cropped to the content area of each. Full text: section Rules.

Scenario: Two views

  • WHEN two outputs show the same workspace
  • THEN a window draws on both, cropped to each content area

Requirement: Keyboard stays on a window the focus view draws

The keyboard SHALL stay on one window, which the focus view must draw; every path that gives the keys to a window SHALL move the focus output to an output that draws it, so the keys never go to a window that the focus output does not draw. Full text: section Rules.

Scenario: Focus output changes

  • WHEN the focus output changes and the keyboard window is outside the focus view
  • THEN the keys go to the most recently focused window that the focus view draws, else the output chat of the focus output when it shows, else no window

Requirement: Selection opens on the focus output

A selection of a shareable workspace SHALL show it on the focus output, also when another output shows it, and its old workspace SHALL stay on any other output that shows it; a step SHALL skip only single-view workspaces that another output shows, with no wrap. Full text: section Rules.

Scenario: Tab click

  • WHEN the user clicks a workspace tab that another output shows
  • THEN the focus output shows it too

Requirement: Chat of a shared workspace

Every output that shows a workspace SHALL keep its output chat of the same conversation, and an approval SHALL show only in the chat of the agent view; the other chats get "A conversa mudou. Tente novamente." when they answer. Full text: section Rules.

Scenario: Approval on two outputs

  • WHEN an approval is answered from a non-agent-view chat
  • THEN that chat gets the message A conversa mudou. Tente novamente.

Requirement: Agent view

An agent camera action SHALL move only the camera of the agent view (the focus view when it shows the workspace of the turn, else the view on the lowest-order output); the agent MUST NOT open, close or move a view, and send_to_output to an output that shows the same workspace SHALL be refused with same_workspace. Full text: section Rules.

Scenario: Agent fits a window

  • WHEN the agent fits a canvas window
  • THEN only the agent view camera moves

Requirement: Lease and capabilities

The compositor SHALL accept a second view only while the shared_workspaces lease (60 s grace) is live, and the core SHALL renew the lease only when the compositor reports capabilities.sharedCanvas. Full text: section Data model.

Scenario: Older compositor

  • WHEN the compositor lacks sharedCanvas
  • THEN the core keeps one output per workspace

Requirement: Version skew

A core before this spec with a compositor of this spec SHALL not renew the lease, so every workspace returns to one output at most 60 s after the new core leaves; the fallback compositor has neither capability and the core keeps one output per workspace there. Full text: section Version skew and rollback.

Scenario: Old core

  • WHEN an older core connects
  • THEN the lease ends and every workspace is back on one output

Requirement: Lock and views

The lock SHALL cover every output and no view SHALL open, close or move by a command while locked, apart from the accepted exceptions of a lease grace end, an unplug and a renewal without grid. Full text: section Lock, overview, wallpaper and transitions.

Scenario: Open a view while locked

  • WHEN a command opens a view while locked
  • THEN it is refused

Requirement: Overview and wallpaper on the primary output

The overview and the slide and depth transitions SHALL stay on the primary output, and the wallpaper parallax SHALL follow the camera of the primary output only. Full text: section Lock, overview, wallpaper and transitions.

Scenario: Selection on an extra output

  • WHEN a workspace is selected on an extra output
  • THEN it is a cut, with no slide transition

Requirement: Persistence matches by connector

The login restore SHALL open each saved pair whose connector is connected and whose workspace is open, and the record stays at version 1. Full text: section Persistence.

Scenario: Connector absent

  • WHEN a saved connector is not connected at login
  • THEN its pair is not opened

Status

Doc status: current contract. Phases 1 to 5 are built (Canvas, Grid views, persistence) and always on, gated by capabilities and the lease. Header still says proposed. Checked 2026-11-10.

Decision of 2026-11-03: independent navigation on Grid views

The owner clarified: "quero o mesmo grid com uma câmera independente em cada monitor, mostrando partes diferentes dele. pode ajustar?" This replaces S5's prohibition on Grid navigation. The shared formation and one client size per window stay as S3 and S4 define them.

Each Grid view starts with the fitted camera of S5. A user pan or zoom stores a camera for that (workspace, connector) pair and only that view uses it. Super+middle drag pans (Super+left keeps moving a Grid tile), Super+scroll and pinch zoom, and Super+Equal/Minus zoom the keyboard-focus view. Zoom in stops at 1:1, as in Canvas. Super+Ctrl+0 restores 1:1 at the current center; Super+Shift+F restores the full formation fit on that monitor. Empty-space drag and scroll pan too. Ordinary client scrolling is preserved. The chat and bars stay in screen space.

Closing and reopening a view, including a connector replug in the same session, retains its camera. Grid cameras are session state; the existing login camera persistence still covers Canvas only. A keyboard focus of an offscreen Grid window brings it into the focus view without moving another monitor's camera. Lock, overview, pointer grabs and transitions retain their input gates. No new model tool, protected setting or route is added.

Implementation: ViewState.grid_camera and desktop/canvas_mode.rs. Protocol tests exercise a pan on the extra output, a pinch on the primary output, camera keys on the focus output, unchanged client sizes and formation, and closing/reopening a view.

Validation: 724 Rust tests passed with session (35 existing EGL tests ignored); rustfmt, Clippy with warnings denied, the release build and the preparation checks passed. Nested run cb76c331 used two 148 x 456 virtual outputs and two synthetic GTK windows: pan on NESTED-2 shifted both projections by (20, 100), then a keyboard zoom changed only that view from scale 1 to 0.8; NESTED-1 stayed byte-for-byte equal in the placement snapshots. This small nested window proves routing and projection, not normal-size visual quality or physical monitor input. Local evidence: primary-final.png, secondary-final.png, after-pan.json and after-zoom.json in the QA artifact folder for 2026-11-03-grid-cameras, outside Git. The run was stopped and the live core was preserved.

Status and decision record

  • Status: proposed on 2026-11-03, revised the same day after review round 1 (see Review record). Approved on 2026-11-03: to the question whether to approve the recommended defaults of the open questions, the user answered "Aprovar os padrões" ("Approve the defaults"), so every recommended default of this spec applies. Phase 1 (compositor, Canvas only) is built; see As built (phase 1). Phase 2 (core and host, Canvas only) is built; see As built (phase 2). Phase 3 (the Grid coordinate model, no visible change) is built; see As built (phase 3). Phase 4 (the Grid on several outputs, capabilities.sharedGrid) is built, always on (capability plus lease), with the chat floating per view instead of chat cells; see As built (phase 4). Phase 5 (persistence and the replug memory with several views, built together with phase 6 of workspaces on several outputs) is built; see As built (phase 5). It acts only on a compositor with capabilities.sharedCanvas (until 2026-11-03 also only with the protected setting workspaceOutputs on); phase 4 is proven in a nested session with two outputs (see the work log of 2026-11-03), not yet live.
  • Decision of 2026-11-03, no setting: the user said "remover opcao de mostrar workspace em outros monitores, ela deve ser ativo sempre, nao uma feature flag" ("remove the option to show workspaces on other monitors; it must always be active, not a feature flag"). The protected setting workspaceOutputs is removed (see workspaces on several outputs, Status). The core renews shared_workspaces on every connection with a live workspace_outputs lease and capabilities.sharedCanvas; the lease end is the only off. Text below that names the setting is history from before this decision.
  • Base: origin/main 4d76709. The line numbers are those of 4d76709.
  • Relation to other specs: this spec revises decisions W1, W3, W8, W9, W11 and W12 of workspaces on several outputs. Phases 1 to 4 of that spec shipped behind the protected setting workspaceOutputs (removed on 2026-11-03: always on since); its phase 5 (the drag of a tab) and phase 6 (the saved assignments, W11) are a spec and are not built. The Grid part of this spec depends on the next steps of grid on the canvas model, which are a spec too. Until a phase of this spec ships, the contract of those documents stays the current contract.

The user's words (2026-11-03, Portuguese, quoted)

"quero que cada monitor tenha a mesma lista de workspaces, quando abrimos um workspace nele, ele tem sua propria "camera" do mesmo workspace, teria como fazer isso?"

Translation: "I want each monitor to have the same list of workspaces; when we open a workspace on it, it has its own 'camera' of the same workspace. Could that be done?"

The first answer said that Canvas fits this model and the Grid does not, because a window cannot take two cell sizes at once. The user answered:

"faria sentido mas reformulamos a grid para ser uma formação dentro do canvas, de uma olhada"

Translation: "it would make sense, but we reworked the grid to be a formation inside the canvas, take a look." Step 1 of grid on the canvas model draws the Grid through the canvas projection with a locked camera. The user then asked for this spec ("Sim, escrever a spec").

Decision

  • Every output picks its workspace from the same list. A Canvas workspace, and later a Grid workspace, can show on several outputs at once (S1).
  • Each output that shows a workspace looks at it through its own camera: the camera is stored per pair (workspace, output) (S2).
  • Canvas ships first, because it needs no Grid work (phases 1 and 2). The Grid follows as a formation in canvas units, after the next steps of grid on the canvas model (phases 3 and 4, S3 to S5). Focus, Monocle, Pair and Floating keep W1 (S1).
  • A window belongs to its workspace, not to an output. It draws on every output that shows its workspace. The keyboard stays on one window, and that window is always drawn on the focus output (S6).
  • One conversation per workspace, as today. Every output that shows a workspace keeps its own chat window, of that same conversation (S8).
  • No new setting: the model ships as the next phases of workspaceOutputs, with a lease and two capabilities. A core or compositor without them keeps W1 (Version skew).

What this spec changes

Earlier text Where New status
W1: "each output shows at most one workspace, and each workspace shows on at most one output." Mirroring rejected "because a client has one size". multi-output-workspaces.md, Rules Replaced by S1 for Canvas (phase 1) and Grid (phase 4) workspaces. The size objection no longer holds: the window has one size in canvas units, and each camera only projects it. W1 stays for Focus, Monocle, Pair and Floating.
W3 move table: "The workspace that X showed before never goes to another output", the primary pick and no_other_workspace. multi-output-workspaces.md, Rules For a shareable workspace a move is an open on that output (S7): W stays on the outputs that showed it, and the primary pick and no_other_workspace do not apply. A single-view workspace keeps the W3 table.
W3 selection rule: "W shows on an output: the focus moves to that output." Step rule: skips "every workspace that another output shows". multi-output-workspaces.md, Rules For a shareable workspace the selection opens W on the focus output, and the step does not skip it (S7).
W5: "Super+Shift+Left/Right and a title bar drag across outputs move a window into the workspace that the target output shows." multi-output-workspaces.md, Rules Unchanged when the target output shows another workspace. When it shows the same workspace, the window stays in it (S6).
W8: "A conversation shows in at most one chat window, because a workspace shows on at most one output (W1)." The approval path "expands the hidden chat of the output that shows the conversation of the turn". multi-output-workspaces.md, The chat and W9 One conversation can show in several output chats (S8). The approval shows the hidden chat of the agent view only (S9).
W9: "A workspace that shows there brings its own camera." carry_workspaces keeps the camera on a move. dock_collapsed is per workspace. multi-output-workspaces.md, Layouts on an extra output The camera and the chat visibility belong to the view (S2, S8).
W11 (not built): workspaceOutputs: [{workspace, output}], one output per workspace. multi-output-workspaces.md, Persistence Several pairs per workspace, each with its camera (Persistence), built with or after phase 6 of that spec. Built in phase 5, together with that phase 6.
W12: the replug memory keeps one pair (W, connector). multi-output-workspaces.md, Hot unplug Keeps every view of the connector, with its camera. Built in phase 5.
Workspace.camera, Workspace.view, Workspace.dock_collapsed. native/smithay/src/desktop.rs:465-472 Move to the view map (Data model).
Workspace.grid: "The cell placements of this workspace on the primary output." native/smithay/src/desktop.rs:463 Phase 4: the formation in canvas units (S3).
canvas_rect takes only a window whose home is Slot::Primary and reads one camera per workspace. native/smithay/src/desktop/canvas_mode.rs:46-54, 96-98 Reads the camera of a view (Data model). The home rule stays.
"Canvas windows are cropped to the canvas content area of their workspace (the primary content area, or the whole extra output)." openspec/specs/canvas-windows/spec.md, Two monitors (407-412) Cropped to the content area of each output that shows the workspace.
desktop_state: one camera and one chatDock per workspace; one output, outputName and presentation per window; "Workspaces show on the primary output; [...] a workspace can also show on a secondary output". The refusals workspace_on_output and canvasOnOutput assume one output per workspace. web-shell/core/desktop.js:92, 119, 147, 311; web-shell/core/runtime.js (prompt) Additive per-view fields and new texts (S9). A Node test checks the texts, as phase 1 of the earlier spec did.
The AGENTS.md boundaries "Workspaces on several outputs" and "Canvas layout" (phase 5, the chat dock, and phase 7, the agent canvas actions). AGENTS.md Phase 2 adds the view to the chat dock route and the agent view to the agent canvas actions, in its own commit.
Alt+Tab glides the camera of the active workspace to the next window (4d76709). native/smithay/src/input.rs Glides the camera of the focus view only (S6).
The overview planes draw a workspace through its one camera. openspec/specs/canvas-windows/spec.md, phase 2 Through the camera of its primary view, else its lowest-order view (Lock, overview).

These earlier texts stay until the phase that changes them ships. Each phase updates the current contract in its own commit.

Current state (verified at 4d76709)

  • Layout has Floating, Grid, Focus, Monocle, Pair and Canvas (desktop.rs:34-46).
  • The camera, its fit state and the chat visibility live in the workspace: Workspace.camera, Workspace.view and Workspace.dock_collapsed (desktop.rs:455-477). camera_in, mode_in and canvas_workspace read them by workspace id (canvas_mode.rs:36-98).
  • Desktop.shown: BTreeMap<u32, u32> maps each extra output to its workspace (desktop.rs:609). output_workspace(slot) reads it (desktop/workspace_outputs.rs:37), and shown_on(workspace) gives the one output of a workspace. W1 is an invariant of every write.
  • shown_slot(window) -> Option<Slot> gives the one output that draws a window (desktop/workspace_outputs.rs:47-86). focused_workspace() reads the workspace of focus_slot() (desktop/workspace_outputs.rs:88). press_focus_output changes the focus output on a press (desktop/workspace_outputs.rs:102, input.rs:840).
  • workspace_grid_area(workspace) is the whole extra output that shows the workspace, else the content area of the primary output, which excludes the bars (desktop/workspace_outputs.rs:516-521). So two outputs of the same mode have different grid areas.
  • pointer_canvas(pos) routes a camera gesture to the Canvas workspace of the output under the pointer (canvas_mode.rs:104-121). It already reads the output first and the workspace second.
  • A Grid workspace draws through locked_project, the identity projection of a constant camera at zoom 1 (canvas.rs:217-219). The Grid still computes its cells in screen pixels and configures each window at its cell size on each pass (grid on the canvas model, Step 1). A Grid workspace is not Layout::Canvas, and Layout::Canvas needs the canvas lease.
  • The output chats (W8) exist: the host creates one per extra output that shows a workspace, and /api/state?output=N answers with the conversation of the workspace of output N.
  • Not built: the tab drag (phase 5 of the earlier spec) and the saved assignments (W11, phase 6). window-session.json saves one camera per Canvas workspace and no output (web-shell/core/window-session.js:68-95).
  • scripts/nested-qa.py start --outputs 2 gives nested QA two virtual outputs (scripts/nested-qa.py:62, 410).

Model

Terms

  • View. A pair (workspace W, output X) while X shows W. Each view has a camera, a fit state and a chat visibility.
  • Shareable workspace. A workspace whose layout is Canvas (from phase 1) or Grid (from phase 4). Only it can have more than one view.
  • Single-view workspace. Any other workspace: Focus, Monocle, Pair or Floating, also Focus over a Canvas or Grid base. It keeps W1.
  • Order of outputs. The primary output first, then the extra outputs by their position, left to right, then top to bottom. It is computed from the output geometry, not from the id order of Desktop.shown; every "lowest-order" rule of this spec uses it.
  • Focus view. The view of the focus output.
  • Agent view. The view that an agent camera action moves (S9).
  • Formation. The cells of a Grid workspace in canvas units, with the formation rectangle that holds them (S3, phase 4).

Rules

Decision S1: the same list, several views per shareable workspace. Recommended: each output shows exactly one workspace or its static grid (W2, the shared grid of the earlier spec). A shareable workspace can show on any number of outputs; a single-view workspace on one, as W1 says. The primary output always shows one workspace.

  • A selection or a move of a single-view workspace keeps the W3 rules.
  • A layout change of a shareable workspace with more than one view to a single-view layout (Super+T to Focus, arrange_windows or the layout command with Focus, Monocle, Pair or Floating) does nothing from the keys and is refused with the new typed refusal workspace_shared from a command. The user takes the workspace off the other outputs first (the menu, S7). A switch from Canvas to Grid (Super+Shift+T, the layout command or the end of the canvas lease) of a workspace with several views keeps every view since phase 4 when Grids are shared (grid: true on the renewal, capabilities.sharedGrid), and is refused the same way otherwise; Grid to Canvas stays refused, because it computes canvas rectangles from one view. The agent cannot make that switch: the core refuses the grid actions on a Canvas base with grid_layout_only, which is now the gate that keeps the agent from turning a shared Canvas workspace into a Grid. A client maximize request does not change the layout on Canvas (it is the camera fit of phase 6 of canvas windows, on the focus view), and a client fullscreen request on Canvas is real full screen of one output since 2026-11-12: the window covers the output of the focus view (the first output that shows it when the focus view does not), the other views of the workspace do not draw it, and its cameras do not move, so a full screen window draws on one output (canvas-windows, Binding contract). On a Grid with several views it is a per-window zoom over the formation; if the Grid rule of today enters Focus instead, phase 4 refuses it like a layout change, and its tests check which one applies.
  • Collapse: when a workspace with several views can no longer have them (the end of the lease shared_workspaces, the end of the workspace_outputs lease, which already clears every extra output with clear_workspace_outputs (desktop/workspace_outputs.rs:146), or the end of the canvas lease, which turns Canvas workspaces into Grid, while Grids are not shared; since phase 4 also a renewal of the shared_workspaces lease without grid, for the Grid workspaces only, read with the layout after the overview), the workspace keeps its lowest-order view and the other outputs go back to their static grids. The state of every view stays in Desktop.views for the session, pruned by S2, so a later second view takes its camera back.

Reason: the user asked that every monitor have the same list and open a workspace with its own camera. Focus, Monocle and Pair size windows to one content area in screen pixels, so they cannot share. Alternative: let a single-view layout share with a locked camera over the presentation of the first view; rejected, because the client still gets the size of one output and the other view letterboxes it.

Decision S2: one camera per view. Recommended: the camera, its fit target and its previous camera (canvas::View) and the chat visibility are stored per pair (workspace, connector name), so they survive an unplug and a new output id at the next start. A view that opens takes, in this order: the stored state of that pair; else the center point and the zoom of the lowest-order existing view of the workspace, put at the center of the new content area and clamped by the camera clamp; else the default camera of a workspace that turns Canvas. The stored state of a pair goes away when its workspace is archived or deleted, and at the end of the session for a connector that is not connected (the replug memory, W12). Reason: an output id changes at each start, a connector name does not; the center point means the same canvas point on outputs of different sizes, raw numbers do not. Alternative: one camera per output, shared by every workspace on it; rejected, because each workspace has its own canvas units.

Decision S3: the Grid is a formation in the canvas (phase 4). Recommended: a Grid workspace keeps one formation: a formation rectangle in canvas units and its 6 x 4 cells of D1 of the tiling spec. The layout pass configures each window from the formation, not from the area of the output that shows it, so a window keeps one size wherever the workspace shows. Floating windows of a Grid workspace and the Super+F zoom keep their rectangles in the same canvas units. Reason: the size lives in canvas units, and only the projection differs per output. Alternative: a Grid workspace keeps W1; this was the first answer, replaced by the user's reply.

This needs the next steps of grid on the canvas model: the camera stored on every workspace, the cells in canvas units with one rule for who owns the size, and the coordinate model decoupled from the canvas lease. Phase 3 is that work. Without the decoupling, a Grid on several outputs would depend on the setting canvas, which was off by default until 2026-11-03, and on the known-good fallback compositor, which has no Canvas.

Decision S4: who sizes the formation. Recommended: the formation rectangle is stored on the workspace (Workspace.grid, phase 4). While the primary output shows the workspace, the rectangle is the content area of the primary output, bars excluded, so the primary view stays the identity of today. While it does not, the rectangle stays what it was: a selection on the primary output, an unplug or a second output that opens the workspace never resizes a window. The rectangle changes only in two cases: the primary output opens a workspace whose rectangle is not its content area (a workspace that was created on an extra output: its windows take the primary cell sizes once), and a mode or bar change of the output that sized it last. A new workspace that first opens on an extra output takes the whole extra output, as W9 does today. The login restore computes the rectangle again by these rules. Reason: the primary output is the one with the bars and the chat of today and must keep its identity Grid, and no action on one monitor should resize the windows on the other. Alternative: the smallest output that shows the workspace; rejected, because opening it on a small monitor would resize every window on the large one.

Decision S5: the camera of a Grid view (phase 4). Recommended: a Grid view has a locked camera that fits the formation rectangle into the grid area of its output, centered, with the zoom at most 1 (no upscale). On the primary output it is always the identity of today (S4). On the live layout (DP-1 primary and HDMI-A-1, both 1920 x 1080) the formation is the primary content area, so HDMI-A-1 draws it at zoom 1 with an empty band of the bar height. When the formation does not fit, the zoom goes below 1 (at least the camera minimum of 0.1), and the view is as sharp as a canvas below zoom 1: sharp with canvasSharpZoom, scaled from the client buffer without it. No input pans or zooms a Grid camera, as today. Reason: the Grid contract has no pan, and an upscale only blurs. Alternative: a free camera on Grid views (open question 2).

Decision S6: windows on several outputs. Recommended:

  • A window belongs to its workspace (meta.workspace), as today, and its home keeps its meaning: Slot::Primary for a workspace window, Slot::Extra(id) for a window of a shared grid. shown_slot becomes shown_slots: every output that shows its workspace (a shared window: its own output, as today).
  • The window draws on every output of shown_slots where its projection meets the content area, cropped to that area.
  • wl_surface.enter and leave follow the outputs that draw the window. Frame callbacks and wp_presentation feedback come from the output that draws the largest area of the window, ties to the focus output, so a window that draws off the view of one output still gets frames from the other. The preferred integer buffer scale is the largest among those outputs; with canvasSharpZoom the preferred fractional scale is the largest projected scale among the views. The downscale cache is per (window, output).
  • Input: a pointer hit test runs per output through the camera of the view under the pointer. A popup draws next to its parent on every output that draws the parent, and takes input on any of them through that view; its unconstrain rectangle is the content area of the output of the press or key that opened it, else the focus output. Known limit: the popup has one position, so on another view it can be cut at the edge of that output.
  • The keyboard is on one window. The focus view must draw it: when a change of the focus output (a press on the wallpaper or empty canvas of another output, a selection, a step) leaves the keyboard window outside the focus view, the focus repair of W9 gives the keys to the most recently focused window that the focus view draws, else to the output chat of the focus output when it shows, else to no window. A press on a window gives it the keys and makes that output the focus output, as today. Every other path that gives the keys to a window (a new window that maps, an xdg_activation request, the agent focus, expand, restore and open_application fit, and a minimize or move that passes the keys on) moves the focus output to the output that draws that window: the agent view for an agent action (S9), else the focus output when it draws the window, else the lowest-order output that draws it. So the keys never go to a window that the focus output does not draw. Phase 1 tests each path. Alt+Tab cycles the windows of the focused workspace and glides the camera of the focus view only.
  • A title-bar drag and a Super+Alt drag move the window in canvas units of its workspace (since 2026-11-11 the drop takes a tile of the visible area of the view of the press, openspec/specs/canvas-windows/spec.md, Tiles of a dropped window; an edge snap before), with the zoom of the view where the drag started, while the pointer stays on an output that shows the same workspace. Over an output that shows another workspace, the W5 rule of today applies at the release. The other views see the move at once.
  • Super+Shift+Left/Right to an output that shows the same workspace: on Canvas the window moves its canvas rectangle to the center of the target view, keeps its size, and the focus output follows; on a Grid the window stays in its cells and only the focus output moves. To an output that shows another workspace, W5 applies.

Reason: the window has one state; only its projection differs per output. Alternative: draw a window only on the focus output; rejected, because the second monitor would show holes where the windows are.

Decision S7: selection, step and move of a shareable workspace.

  • Selection (a tab click, Super+1..9, an overview card, a new workspace): the focus output shows W, also when another output shows W. Its old workspace stays on any other output that shows it, else it shows on no output. The focus stays on the focus output. Reason: "when we open a workspace on it". The scheduled exception of W3 stays: a scheduled selection of a workspace that shows on no output puts it on the primary output, and one that shows somewhere changes nothing.
  • Step (Super+Left/Right, the bar wheel, the swipe): the next or previous workspace in the workspace order on the focus output, skipping only single-view workspaces that another output shows. No wrap, as today.
  • Move by the protected workspace-menu panel: opens W on the target output and keeps it on the outputs that showed it. The item "Tirar de N" (take off N) stays and puts N back on its static grid. A move to the primary output opens W there, and the old primary workspace shows on no output unless another output shows it. The tab drag, when phase 5 of the earlier spec ships it, follows the same rule.
  • The core keeps deciding every switch, as today: the compositor queues the input request and the core answers with workspace or workspace_output.

Reason: with S1 nothing has to leave an output, so the rules get simpler. Alternative: keep the W3 selection rule (the focus moves to the output that already shows W) and open a second view only by the menu; offered as open question 3.

Decision S8: the chat of a shared workspace. Recommended: every output that shows a workspace keeps its output chat (W8), so two outputs that show W have two chat windows of the same conversation.

  • /api/state?output=N already answers with the conversation of the workspace of N, so both chats show the same messages and the same stream.
  • A send names the conversation of the page, as today. Both chats can send; the core keeps one turn at a time, and a second send during a turn gets the refusal of today.
  • The composer draft, the voice recording and "Mostrar ao agente" belong to the chat window that started them, as today. "Mostrar ao agente" captures the focused window of the output of that chat.
  • An approval shows only in the chat of the agent view (S9; as built in phase 2); the other chats of the conversation get "A conversa mudou. Tente novamente." when they answer, and a second answer gets the refusal of today for an approval that is no longer pending. The core and the host show a hidden chat only for the approval and only on the output of the agent view (S9); the other chats show the approval when the user shows them.
  • On a Canvas workspace the floating chat has its visible or hidden state per view (S2). A Super tap toggles the chat of the focus output only. /api/chat-dock {state, output} already names the output.
  • On a Grid workspace with several views (phase 4) the chat cells of the formation belong to every view: each view draws its own output chat in the chat cells as they project on its output, so the chat of the owner gets the cell size and the chat of another output gets the projected size. Chat windows are host windows, one per output, so each can take its own size. grid_chat becomes per view. (As built in phase 4, a deviation: no chat holds formation cells; each Grid view floats its own output chat, see As built (phase 4).)
  • Pinned surfaces are per conversation, so they show beside each chat of that conversation.

Reason: the host and core already route a chat by output, so the cost is small, and each monitor stays a complete workspace (open question 2 of workspaces on several outputs). Alternative: one chat, on the focus output; offered as open question 4.

Decision S9: the agent view and desktop_state. Recommended: an agent camera action (window_action fit, expand, focus and restore of a canvas window, and open_application with its fit) moves the camera of the agent view: the focus view when the focus output shows the workspace of the turn, else the view of that workspace on the lowest-order output. The agent limits (user_active, rate_limited), the lock gates and the canvas lease apply as today.

  • desktop_state keeps canvasWorkspaces[].camera and chatDock as the home view: the primary view when the primary output shows the workspace, else the view on the lowest-order output, because the core reads them as the primary camera (web-shell/core/wallpaper-camera.js, web-shell/core/window-session.js) and set_camera writes the primary view (changed in review round 1 of phase 1; the first draft said the agent view). Each window's output, outputName, x, y, width, height and presentation are those of the focus output group (S6). The agent view comes from views: canvasWorkspaces[].views: [{output, camera, chatDock}] for a workspace on more than one output, and windows[].views: [{outputName, presentation}] for a window that draws on more than one output. Neither key is sent for a workspace or window on one output, so a core of before phase 1, which checks the exact keys of a canvas workspace, reads the same snapshot. These are positions on outputs that the agent already sees; no window content.
  • window_action send_to_output of a window to an output that shows the same workspace is refused with the new typed refusal same_workspace; the window already shows there.
  • The refusal workspace_on_output of arrange_windows and open_application (they read the primary workspace) stays until the phase that gives those commands a workspace, as W9 records. canvasOnOutput refuses a canvas window of another workspace, as today; the workspace of the turn on several outputs is not "another workspace".
  • The agent never opens, closes or moves a view, as no agent tool moves a workspace today.

Reason: the agent acts for the user who looks at the focus output, and old readers of desktop_state keep working. Alternative: move every view of the workspace; rejected, because it would move the camera of the other monitor under the user.

Data model

Compositor

  • Desktop.shown: BTreeMap<u32, u32> keeps its type. W1 stops being an invariant for shareable workspaces: two keys can hold the same workspace, and an extra output can show the primary workspace. shown_on(workspace) becomes shown_on_all(workspace), in output order.
  • New Desktop.views: BTreeMap<(u32, String), ViewState>, keyed by (workspace, connector name), with camera: Camera, view: canvas::View and dock_collapsed: bool. Workspace.camera, Workspace.view and Workspace.dock_collapsed go away; camera_in(workspace) becomes camera_in(workspace, slot).
  • Phase 4: Workspace.grid holds the formation in canvas units and its rectangle; grid_chat moves to the view.
  • The consumers of the shown_slot table of workspaces on several outputs sort into two groups, with one test each:
    • Per output (take shown_slots): the scene of each output, enter events, frame callbacks and presentation feedback (S6), the preferred scales, the downscale cache, extra_presentations, extra_windows, visible_window, the hit test.
    • Focus output (take the focus output when it is in the set, else the lowest-order output in the set): target(), Alt+Tab, the keyboard actions, set_app_maximized, canvas_fills, canvas_focused, the popup unconstrain fallback.
  • The uses of desktop.workspace in canvas_mode.rs that phase 3 of workspaces on several outputs sorted per output now read the view (workspace, slot), not the workspace.
  • One camera animation runs per view. A new animation of another view first puts the running one at its target, as today across workspaces.
  • New lease shared_workspaces with the 60 s grace of the canvas lease. While it is live, the compositor accepts a second view. When it ends, each workspace keeps its lowest-order view, and the other outputs that showed it go back to their static grids (the collapse of S1), so an older core never meets a shared workspace.

Core

  • The core renews the lease only when the compositor reports capabilities.sharedCanvas (phase 1) and the workspace_outputs lease is live on the same connection (until 2026-11-03 also only with the setting workspaceOutputs on).
  • desktop_state adds the fields of S9. outputs[].workspace already reports the workspace of each output; two outputs can now report the same id.
  • The memory policy protects every workspace that shows on any output, as today.
  • focusedWorkspace and store.state.active follow the focus output, as W8 says.

Persistence

Built with phase 6 of workspaces on several outputs, or in phase 5 of this spec after it.

  • window-session.json: workspaceOutputs: [{workspace, output}] can list a workspace more than once. Each Canvas workspace saves views: [{output, x, y, zoom}] beside its camera; camera stays the camera of the primary view, else the first saved view, so an older core that reads only camera restores one view. An older core that saves the record again drops views; that is accepted. The record stays at version 1, as W11 decided. The formation owner is not saved (S4).
  • The login restore opens each saved pair whose connector is connected and whose workspace is open, restores the camera of each view, then selects the saved active workspace on its output.
  • The replug memory (W12) keeps every view of a connector for the session.

Lock, overview, wallpaper and transitions

  • The lock covers every output, as today. No view opens, closes or moves while locked by a command. Accepted exceptions: the end of the grace time of a lease, an unplug, and (since phase 4) a renewal of the shared_workspaces lease without grid, which the compositor accepts while locked, collapse views behind the lock (S1); nothing draws above the lock surface and input stays on it.
  • The overview stays on the primary output. A card draws its plane through the camera of the primary view of the workspace when there is one, else its lowest-order view, else its stored or default camera.
  • The wallpaper parallax keeps following the camera of the primary output only (Known limits of workspaces on several outputs).
  • The slide and depth transitions stay on the primary output. A selection on an extra output is a cut, as today.

Version skew and rollback

  • capabilities.sharedCanvas (phase 1): the compositor accepts a second view of a Canvas workspace under the lease. capabilities.sharedGrid (phase 4): also of a Grid workspace. The core sends a selection, a step or a move that opens a second view only for a layout that the compositor reports.
  • A core of this spec with a compositor before it: no capability, no lease, W1. Nothing breaks.
  • A core before this spec with a compositor of this spec: the old core does not renew shared_workspaces, so at most 60 s after the new core leaves, every workspace is back on one output (the lease end above).
  • A rollback of the compositor across phase 1 loses the per-view cameras of that session; the camera of each workspace in window-session.json stays.
  • The fallback compositor has neither capability; the core keeps W1 there.
  • scripts/check-host-skew.py gets one check from its read-only state query and the checkout, as for the window layers checks: a checkout whose core sends the lease on a compositor without sharedCanvas is fine (W1); a checkout whose core does not know the lease, on a compositor that reports a live shared_workspaces lease, means stop. The phase marker that the script reads in the checkout is chosen in phase 2. Add it to the maintenance plan of openspec/specs/self-maintenance/spec.md.

Security

Nothing new crosses the protected-host boundary. Only the protected bottom bar and the protected workspace-menu panel open a workspace on an output, as today. No agent tool, scheduled turn, generated HTML or isolated plugin panel opens, closes or moves a view, or pans or zooms a camera freely. The agent camera actions stay typed and limited (S9). The saved views and assignments of phase 5 match a monitor by connector name only, so a different monitor on the same port gets the saved workspace and view at the next login; the record keeps no monitor identity (a possible follow-up). The new desktop_state fields carry only camera positions and placements on outputs, which the agent already reads for one output.

Performance

Each extra view draws its windows once more, through its own camera, and each extra output chat adds one Chromium renderer, as W8 measured. Phase 1 measures the frame time of two views of one Canvas workspace with the windows of a typical session on the live GPU, and the memory of the per-output downscale cache.

Validation plan

  • Phase 1 (Rust, in-process clients over two and three synthetic outputs): a Canvas workspace on two outputs; a camera per view (a pan on one view moves only that view); the camera seed of S2 on outputs of different sizes; shown_slots for each kind of window; enter and leave events, the frame output and the preferred scales; hit tests and popups through each camera; a drag on one view seen on the other; a drag across to an output of another workspace (W5); Super+Shift+Left/Right to the same workspace; the keyboard repair of S6; Alt+Tab on the focus view; the two groups of consumers; workspace_shared for a layout change; the lease ends and the collapse of S1, also at the end of the canvas and workspace_outputs leases; Super+Shift+T refused on a workspace with several views; the focus output that follows each keyboard path of S6; unplug and replug of a connector with its cameras; the lock; the capability.
  • Phase 2 (Node): the rules of S7 for Canvas and single-view workspaces; two output chats of one conversation (stream, send, a second send during a turn, an approval answered from one chat, the hidden chat shown only on the agent view); desktop_state fields and the new refusals; the agent prompt and tool texts; check-host-skew.py.
  • Phase 3: the gates and tests of grid on the canvas model, plus a Grid scene measurement before and after.
  • Phase 4 (Rust and Node): a Grid formation on two outputs of different sizes (one size per window, the rectangle rules of S4: no resize on a selection, an unplug or a second view, one resize when the primary output opens a workspace created on an extra output; the identity on the primary output and the fitted camera of S5 with no upscale); the chat cells per view; Super+F and floating windows in canvas units.
  • Nested QA: scripts/nested-qa.py start --outputs 2 runs one Canvas workspace on both virtual outputs with a pan on each, and from phase 4 a Grid formation on both, with the chat on both. Report it as nested proof only: no real monitors, no gestures and no provider.
  • Live check (needs the user, under coordination.lock): one workspace on DP-1 and HDMI-A-1 with a different camera on each, a drag across the two views, the frame time, and an approval answered from the chat of the extra monitor.

Phases

Phase Content Proof
0 This spec, the dated section of docs/architecture-decisions.md, and the notes in the specs it revises. Review.
1 Compositor, Canvas only: views, shown_slots, the two groups of consumers, enter events, frames, scales, input, the keyboard repair, the per-view chat state, workspace_shared, the lease shared_workspaces, capabilities.sharedCanvas. In-process tests.
2 Core and host, Canvas only: the rules of S7, the chats of S8, the agent view and fields of S9, the new refusals and texts, the AGENTS.md boundaries, check-host-skew.py. First user path. Node tests, nested QA with two outputs, the live check.
3 The next steps of grid on the canvas model, in its own spec revision, with no visible change. Its gates and the scene measurement.
4 The Grid on several outputs: the formation and its rectangle rules, the fitted camera, a floating chat per view (built instead of the chat cells, see As built (phase 4)), capabilities.sharedGrid and grid: true on the renewal. In-process and Node tests, nested QA.
5 Persistence and the replug memory with several views, with or after phase 6 of the earlier spec. Built on 2026-11-03 with that phase 6. Node tests and one in-process test.

As built (phase 1)

Built on 2026-11-03 in the compositor only; the line numbers are those of the phase 1 commit. No core or host change: the core does not renew the lease yet, so the shared session behaves as before.

  • Views (native/smithay/src/desktop/views.rs). Desktop.views is a map keyed by (workspace, connector) of ViewState {camera, view, dock_collapsed}; the Workspace no longer has a camera, a fit target or a dock state, only last_view, the connector of its lowest-order view. A view opens on the first layout pass where its output shows the workspace (sync_views, views.rs:280, called at the start of apply_layout). opening_state gives the S2 seed: under a live lease, a stored pair of that connector comes back; otherwise the new view takes the center point and the zoom of the lowest-order open view, clamped to its own content area, with no fit target and a hidden chat. Without a shared view the state of last_view is carried, which keeps W9 (a move keeps the camera). A view with no stored state starts from the default state, so a Grid workspace (never shared in phase 1) keeps its floating primary chat shown, as openspec/specs/grid-on-canvas/spec.md step 1b says; entering Canvas sets the hidden chat on that view. prune_views (views.rs:321) drops the views of the workspaces that the W3 cleanup forgets, never those of the primary workspace.
  • One view at a time in the code. The compositor has a view override (Compositor.view_override, set by in_view and with_view); every single-view function (the camera, the projection, the clip, the chat state) reads the view of the override when it shows the workspace, else the focus output, else the lowest-order output (lead_slot, views.rs:79). The scene, the extra output presentations, the hit tests, the pointer gestures and the layout pass of each output run under the view of their output. shown_on of earlier phases is now lead_slot, which is the focus output group of S6; shown_slots (views.rs:105) is the per-output group.
  • Lease shared_workspaces_enabled {enabled} (control connection only, desktop.rs:148), a canvas::Lease with the 60 s grace of the other leases. The renewal is accepted while locked, the off command is refused while locked. Desktop::shareable (desktop.rs:803): the lease is live and the layout is Canvas. workspace_output takes an optional from, the connector that a null output takes the workspace off (only with output: null, else no_output); without from a null takes it off every extra output. Opening a second view uses share_on_output (workspace_outputs.rs:490); the focused workspace moves the focus output to the new view, as a move does.
  • Collapse (collapse_views, views.rs:370): at the end of the shared_workspaces, canvas (in disable_canvas) or workspace_outputs lease each workspace keeps its lowest-order view, and the focus output moves to the kept view. (Since phase 4 the end of the canvas lease keeps the views while Grids are shared, and a renewal without grid collapses only the Grid views; see As built (phase 4).)
  • Refusals: refuse_shared (views.rs:399) gives workspace_shared for a layout command other than Canvas, the presentations other than the overview, Pair, Super+T (toggle_grid_layout) and Super+Shift+T (toggle_canvas_layout); the keys do nothing. send_to_output gives same_workspace when the target output draws the window, also when it is the focus output (outputs.rs:637).
  • S6 drawing and input. Both outputs draw a shared window through their own camera; drawn_area and frame_slot (views.rs:428) pick the output of the frame callbacks and presentation feedback (largest drawn area, ties to the focus output, then output order); the DRM primary loop skips windows whose frame output is an extra output (drm.rs:240). sync_view_outputs (views.rs:447), after each Space::refresh, sends wl_surface.enter for each extra output that draws the window and that the Space did not enter, and the leave when it stops. A press hit-tests the window under the camera of the pointer output (hit_in, input_presented, outputs.rs:477) and makes that output the focus output; give_focus moves the focus output to an output that draws the window when the focus output does not. The camera flights, Alt+Tab, the agent fit and the canvas actions move only the lead (focus) view, one flight per view (fly_with, canvas_mode.rs:1251). Super+Shift+Left/Right to an output that shows the same workspace moves the canvas rectangle to the center of that camera (canvas_center_on, canvas_mode.rs:1082) and makes it the focus output.
  • Chat per view: chat_hidden_on(workspace, slot) (canvas_mode.rs:2275); chat_dock and focus_chat with output act on that view; the primary chat reads the primary view.
  • Snapshot: capabilities.sharedCanvas: true; sharedWorkspaces: {enabled, live}; each entry of canvasWorkspaces keeps camera and chatDock of the home view (the primary view when the primary output shows it, else the lowest-order view) and adds views: [{output, camera, chatDock}] in output order only for a workspace on more than one output; a window drawn on several outputs adds views: [{outputName, presentation}]. floatingChat reads the primary view. Every new command key is optional, so an older core is not refused by deny_unknown_fields, and the core validator canvasWorkspace() (web-shell/core/smithay.js) accepts the optional views (2 to 16 entries, exact keys, unique valid output names, the same camera and chat dock checks).
  • Camera animations: a view that closes (the collapse, workspace_output null, the end of the workspace_outputs lease, an unplug) first lands a running animation at its target (land_camera_flight), and an animation whose output no longer shows its workspace while another output does writes nothing, so the surviving view never jumps.
  • A new canvas window takes its free spot, and the camera pans to it, in the layout pass of the focus view (else the lowest-order view); when the focus view is not the lowest-order view (the focus on an extra output, with two or more outputs), the parking anchor of the window can wait one layout pass (round 2 LOW).
  • The views that open in one pass seed in output order. A workspace_order of MAX_WORKSPACES (100) entries prunes no views, because the core sends at most 100 open conversations and a full order can leave out a live workspace.
  • Tests: native/smithay/src/shared_cameras_tests.rs, ten in-process tests over two and three synthetic outputs (the lease off regression and the capability, the camera seed, a Super+scroll on one view, the two groups of consumers and the frame output, the enter events, the hit test and the focus output of a press, the agent fit on the focus view, the refusals and the keys, the collapse at the end of each of the three leases and the stored pair after it, Super+Shift+Right and same_workspace, the chat per view, three outputs and their order, from, unplug and replug with the stored camera, the lock).

Deviations and limits of phase 1:

  • The sharp zoom cache keeps one downscaled texture per window, at the largest scale that any view below zoom 0.35 wants, not one per (window, output). A view at zoom 0.35 or more of the same window draws it live and never stretches that texture (correction of 2026-11-04: it did, which blurred the near monitor).
  • The compositor sends no preferred buffer scale of its own; a client sees the scales through the enter events only.
  • A popup is placed (unconstrained) against the lead view only; the other view draws it through its camera and clips it.
  • A drag on one view is seen on the other one (canvas units), but a drag across to an output of another workspace (W5) is not built, as before this phase; the grab keeps the scale of its press.
  • A workspace with several views accepts only the overview (Super+S) and leaving it as presentations; Chat, Immersive and Sidebar are refused with workspace_shared. During the overview over a shared primary workspace, the extra view keeps drawing Canvas through the saved mode and takes no gestures, and chat_dock on that extra output refuses "The overview is open". The overview planes and the wallpaper camera read the primary view only.
  • A view can collapse while locked: the end of the grace time of a lease or an unplug applies the collapse of S1 also behind the lock. Opening a view is refused while locked; input stays on the lock surface either way.
  • Known cost (review L1, not changed): the hot paths (shown_slots, shown_on_all, lead_slot, the view override) allocate a small vector for each window and each call in the scene, input and layout passes. It is linear in windows times outputs and was not measured as a problem; a later change can cache the shown outputs per pass.
  • Not covered by an in-process test yet (besides the review round 1 tests: the closing view flight, the new window in the focus view, the primary floatingChat, the order pruning): Alt+Tab on the focus view, the keyboard repair after a close, popups through the second camera, a drag seen on the other view. The code paths exist; the nested QA of phase 2 must show them.

Notes for phase 2 (from review round 1 of phase 1)

  • The core sends from on workspace_output and renews the shared_workspaces lease only when capabilities.sharedCanvas is true; an older compositor refuses unknown keys (deny_unknown_fields).
  • The core sends no primary on a move of a Canvas workspace under the lease: share_on_output refuses it with invalid_primary.
  • Every resend of workspace by the core (the reconnect, the unlock, the login restore and a rollback) means focus only and never opens a view: the core must not turn a resend into a workspace_output and must not rely on S7 opening a view from a selection that the user did not make (security L1).
  • The agent view is the focus view in canvasWorkspaces[].views; the top-level camera stays the home view for the wallpaper camera and the login restore.
  • A drag of a window between two views of the same workspace (L5): the grab works in canvas units in the view of its press; a drag that crosses to the other output of the same workspace does not hand the grab to that view in phase 1. Phase 2 decides whether it should, with the W5 drag.

As built (phase 2)

Core and host, Canvas only (2026-11-03):

  • The lease: the core renews shared_workspaces_enabled with the per-output lease, on every connection where that lease is live and the compositor reports capabilities.sharedCanvas, with a 2 s retry. Since 2026-11-03 the core never sends off; the lease ends with the connection and the 60 s grace. At every connect the core queries state first, because the stored capabilities can belong to another build. (History: until 2026-11-03 it renewed only while workspaceOutputs was on, sent the off command after workspace_outputs_enabled false, also on the unlock path, and queried state first only with the setting on.)
  • Focus-only resends: the compositor command workspace takes the optional key focus_only (sent only with sharedCanvas); the core sets it on the reconnect, the unlock, the login restore (window-session.js) and the rollback of a failed move. The snapshot adds focusOutput, because focusedWorkspace alone does not name the output with the keyboard.
  • S7 in the core (web-shell/core/workspace-outputs.js, shareableWorkspace): a Canvas workspace under the live lease is shareable. The step and the swipe skip only single-view workspaces that another output shows; a menu move of a shareable workspace opens it on the target and keeps the other views ("Abrir também em N"), with no primary key; "Tirar de N" sends workspace_output {workspace, output: null, from: N} through /api/workspace-output, which accepts from only with a null output and a valid name. Single-view workspaces keep W3.
  • S8: each output chat of a shared workspace shows the same conversation and stream; one turn at a time. Under the live lease an approval shows in, and is answered from, only the chat of the agent view (approvalChatOutput); the other chat gets "A conversa mudou. Tente novamente." and a second answer gets "No pending approval". When the output chat of the agent view is not bound, the approval falls back to the primary chat. The core expands a hidden chat for an approval, and raises the chat, only on that same output.
  • A bare null take (workspace_output {output: null} with no from) drops every extra view of the workspace; only from takes it off one output.
  • focus_only goes only with a sharedCanvas capability proven by a state answer on this socket (stateSocket in smithay.js, set in consume before update, and the connect reads the state before its first workspace); no lease is needed, because the compositor accepts the key without one: a disconnect forgets the capability, so a rollback to a compositor without it gets no unknown key (W1). (History: until 2026-11-03 it also needed the setting on, and the off of the shared lease went whenever the connection held or tried it, even when the polled sharedWorkspaces was stale.)
  • S9: the agent view is the focus output when it shows the workspace of the turn, else the lowest-order output (the order of the snapshot). desktop_state adds focusOutput, canvasWorkspaces[].views (camera and chat dock per output, only with more than one view) and windows[].views. The compositor refusals same_workspace and workspace_shared reach the tools with Portuguese texts; the prompt and the tool descriptions name them.
  • Host: the workspace menu and the bottom bar tabs offer "Abrir também em N" and "Tirar de N" per output; the bar merges the marks of one workspace shown on several outputs into one mark.
  • Skew: scripts/check-host-skew.py refuses a checkout whose core does not know the lease while the compositor reports it live (openspec/specs/self-maintenance/spec.md).
  • Tests: web-shell/test/shared-cameras.test.js, web-shell/test/shared-cameras-http.test.js, the lease tests in web-shell/test/smithay.test.js, scripts/test/test_check_host_skew.py and a_focus_only_selection_never_opens_a_second_view in native/smithay/src/shared_cameras_tests.rs.

Left for later: the replug memory with several views (phase 5 of the parent spec); a core pre-check for same_workspace (the compositor refusal is mapped instead); host texts for a raw workspace_shared on the host layout routes; nested proof with two outputs.

As built (phase 3)

Built on 2026-11-03 in the compositor only, after the user said "Seguir para o Grid"; the details are in openspec/specs/grid-on-canvas/spec.md, section "Steps 2 to 4 (as built)".

  • Workspace.grid stores the formation rectangle in canvas units and the grid area where it draws (formation, formation_area). S4 is built for the primary output: while it shows the workspace, the formation is its content area, so the primary view is the identity. A workspace that shows nowhere keeps its last formation.
  • Every workspace has a camera (Compositor::workspace_camera): the free camera on Canvas, else the locked camera of S5 (crate::canvas::locked_camera: fit, centered, zoom at most 1), derived from the stored pair. screen_placement draws and hit-tests Grid windows through it.
  • None of it reads the canvas setting or lease.
  • Measured: screen_placement about 147 ns per window before and 209 ns after (release, nine windows); apply_layout unchanged at about 16 us.

Deviations, left for phase 4: on an extra output the formation still follows the whole output (W9), so the S4 freeze off the primary output, the fitted camera below zoom 1, the window sizes from the formation and the floating rectangles in canvas units are not built. No snapshot key and no capability is added. No nested QA ran, because nothing is visible; the in-process Grid tests are the proof.

As built (phase 4)

Built on 2026-11-03 in the compositor and the core; the host is unchanged. Workspaces on several outputs are always on (capability plus lease): no setting, and a Grid shares only on a compositor with capabilities.sharedGrid and a core that names the Grid in its renewal.

  • Version skew. shared_workspaces_enabled takes the optional key grid: true; the core sends it only when the state answer of that connection reports capabilities.sharedGrid. The compositor keeps Desktop.shared_grid, the set of lease holders whose last renewal named grid, and Desktop::grid_shared() is true only while the lease is live and every live holder is in that set; the close of a connection clears its entry. A renewal without grid (a phase 2 or 3 core, or a second holder that does not know the Grid) that turns grid_shared() off collapses the Grid views (S1, collapse_views_where, with the layout after the overview for the active workspace), and Canvas views stay; the lease end clears the set. So an older core never meets a shared Grid, and an older compositor never gets the key.
  • S1 for the Grid: shareable() accepts a Grid workspace only under grid_shared(). On a shared workspace the layout command keeps the same layout (Canvas or Grid) and may go from Canvas to Grid; Super+Shift+T from Canvas to Grid keeps every view and shows the chat on each; Grid to Canvas, Super+T and the other layouts stay refused with workspace_shared. The end of the canvas lease no longer collapses views while the Grid is shared: each Canvas workspace becomes a Grid with every view, each view shows its chat, and the primary output sizes the formation. The core gate grid_layout_only keeps the agent from that switch.
  • S4, the formation (formation_rule, canvas_mode.rs). On a frozen Grid (a Grid under grid_shared(), also the previous layout of the active workspace during the overview) the formation is the primary content area while the primary output shows the workspace; otherwise the stored rectangle stays, and it follows its owner only while the owner shows it; with nothing stored it takes the content area of the lowest-order view. A selection, an unplug or a second view never resizes it; the primary output opening a workspace of an extra output resizes it once. Only the lowest-order view lays out the formation (place_extra_workspace), and carry_workspaces does not carry a frozen Grid.
  • S5, the locked camera per view: formation_areas keeps the area of each slot and workspace_camera reads the one of lead_slot, so each view fits the formation in its own area (locked_camera: centered, zoom at most 1). The extra scene draws non-canvas windows through screen_placement (outputs.rs, extra_presentations_in), and reach_area (grabs.rs) bounds a grab of a frozen Grid window by the formation, also a move: the grab divides the pointer delta by the zoom of the view of the press (WindowGrab::scale) and clamps the window to the formation in canvas units, never to the screen rectangle of the output under the pointer. Floating windows of a frozen Grid keep their offset from the formation origin when it moves (shift_floating, only on a frozen Grid, so a bar or mode change on one output moves no floating window and no carry moves one twice), and dialogs are bounded by it. grid_area of a workspace derives the formation by the rule of S4 instead of reading the last layout pass, so a caller between an output change and the next pass sees the current rectangle.
  • S6: sync_view_outputs sends the enter events of a frozen Grid window to each extra output that draws it, and the leave of a Space output that overlaps its parking location but does not draw it (Compositor.view_left); the enter goes again once that output draws it, because the Space keeps its own record and sends no new enter. Focus fix found by the nested QA: under the live outputs lease, a selection on the focus output that leaves the keyboard window undrawn there repairs the focus (clear_hidden_focus, left_focus_view), only for a window of a workspace with several views or one that just lost a view (Desktop.left_views, set by sync_views); a window of a single-view workspace keeps its keys when the focus output moves to another output, as before.
  • S8, deviation from the spec: no chat holds formation cells. While the Grid is shared every Grid view floats its own output chat at canvas::dock(area) with its own visibility (floating_chat_in), and a new Grid view opens with its chat shown (opening_state; a new Canvas view keeps it hidden), as the Grid of the primary output does since step 1b of openspec/specs/grid-on-canvas/spec.md, and the Super tap and the click outside act on each view. Reason: chat cells sized per view would give the formation a different shape on each output. Without grid_shared() the W9 chat tiles of an extra Grid stay. Visible change on an extra output: while Grids are shared, a Grid there, also with one view, uses the floating chat instead of the W9 chat tile, and its formation keeps its size (the primary content area, or the stored rectangle) instead of taking the whole extra output.
  • Snapshot: capabilities.sharedGrid: true, and gridViews: [{workspace, output, chatDock: {side, state}}], one entry per extra output that shows a Grid with a floating chat, in output order, sent only when it is not empty (an older core ignores the key). The core validates it (gridViews in web-shell/core/smithay.js), reads the chat dock of an extra Grid view from it (viewChatDock) and expands a hidden Grid chat for an approval only on the agent view, as on Canvas.
  • Core: shareableWorkspace (workspace-outputs.js) counts a Grid workspace with sharedGrid; the prompt, desktop_state and the workspace tool texts name the Grid.
  • Tests: in native/smithay/src/shared_cameras_tests.rs, seven tests over two and three outputs, and eight more from review round 1 (the renewal without grid during the overview, two lease holders, the keys of a single-view workspace, a bar on one output and the floating windows, a move drag on the extra view in canvas units, the leave of the primary output, the end of the canvas lease over a shared Canvas, the lock) (one formation and a locked camera per view, the overview; the single resize when the primary output opens a workspace of an extra output; the Grid layout kept and a floating chat per view; the renewal without grid collapsing only Grid views; Canvas to Grid keeping the views and the lease end collapsing them; three outputs with one formation, gridViews and a floating window in canvas units; the focus repair). Node: the Grid in web-shell/test/shared-cameras.test.js, the lease with grid, the approval on the agent view and its refusal from the other Grid view chat in web-shell/test/shared-cameras-http.test.js, the gridViews and capability rows in web-shell/test/smithay.test.js.
  • Nested QA (two virtual outputs, nested proof only, see the work log of 2026-11-03): one Grid workspace on NESTED-1 and NESTED-2, the extra view drawing the formation at zoom 1 with a centered band, its own floating chat on a Super tap, clicks on a window in the extra view reaching it, the formation frozen after a new workspace on the primary output, and the keys moving to the primary chat after the fix.

Limits of phase 4:

  • Input threshold: an extra Grid view whose locked zoom is below 0.5 (INPUT_THRESHOLD, an output less than half the formation) takes no pointer input on its windows, as a canvas window drawn below the threshold; the far move of the Canvas is not offered there. At or above 0.5 a move and a resize divide the pointer delta by the zoom of the view of the press, and a move test at zoom 0.8 is in place; a resize on an extra view has no test of its own.
  • A tile drag on an extra view shows the cell outline computed from the screen pointer; only its window location is clamped in canvas units.
  • desktop_state has no per-view Grid camera: gridViews carries only the chat. Popups are placed against the lead view, as on Canvas.
  • The core treats a workspace with no entry in workspaceLayouts as not shareable.
  • During the overview the floating chat of an extra Grid view is not placed.
  • Persistence and the replug memory with several views are phase 5 (built since, see As built (phase 5)). The live check with two real monitors needs the user.
  • scripts/check-host-skew.py adds no Grid marker: a core that does not know grid renews without it, and that renewal collapses the Grid views, so the skew heals in the compositor.

As built (phase 5)

Built on 2026-11-03 in the core and, for one command key, the compositor, together with phase 6 of workspaces on several outputs (decision W11, see its As built (phase 6) for the order of the login restore). No setting; the record stays at version 1.

  • Save (web-shell/core/window-session.js). The record adds primaryWorkspace and workspaceOutputs: [{workspace, output}], one entry per extra output that shows a workspace, by connector name, so a workspace on several outputs is listed once per connector. The formation owner of S4 is not saved. Each Canvas workspace adds views: [{output, x, y, zoom}] in the order of outputs: the views of the snapshot for a workspace on several outputs, else its one camera on the one output that shows it; a workspace on no output saves none. camera stays the home view of the snapshot (the primary view, else the lowest-order view), which is the first saved view, so an older core restores one view from it. A pan of one view waits for the canvas save delay, as a pan did; a view that opens or closes saves at once. An older core drops views, workspaceOutputs and primaryWorkspace at its first save (accepted; a test runs the b236a34 loader against the new record).
  • Load. Every new field is validated alone: exact keys, workspace ids from 1 to 2^32-1, valid connector names ([A-Za-z0-9._-], 1 to 64), no repeated connector in a list, the camera bounds of camera restore (x and y within 65536, zoom from 0.1 to 2), at most 16 entries. A malformed views list only loses the views of that workspace; a malformed pair list or primary workspace only loses that field. Nothing in the file blocks the restore.
  • Restore. The rule that the core renews the leases only after the restore ends stays, so the restore cannot open a view (workspace_output needs a live lease). The safest reading, chosen here: the restore runs as before and leaves a plan; the outputs step runs it once the workspace_outputs lease and, on a compositor with sharedCanvas, the shared_workspaces lease of that connection are live. Saved pairs go as replug moves through the normal refusal function, so a workspace that already shows on another output opens a second view only when it is shareable now (S1); otherwise it keeps W1. The camera of each saved view whose output shows its workspace in Canvas goes after the pairs: the primary view with the camera restore of today, an extra view with the new optional key output (below). Then the saved active workspace gets the focus with focus_only. Pairs that cannot go while locked wait for the unlock.
  • Compositor: camera {op, x, y, zoom, output} (desktop.rs, set_camera in canvas_mode.rs). output is a connector name; the primary output by its name is the primary view, an unknown name gives "Unknown output", an extra output that shows nothing gives "Output shows no workspace", a workspace that is not Canvas gives "Workspace is not in Canvas", and the lock refuses it as every camera command. The snapshot reports capabilities.viewCamera: true. The core (restoreViewCamera, web-shell/core/smithay.js) sends the key only after a state answer on the current socket reports the capability, as focus_only, and a disconnect forgets the capability; without it the extra view keeps the seed of S2.
  • Replug memory (W12, web-shell/core/workspace-outputs.js ReplugMemory). A pair whose workspace another output shows is dropped only for a single-view workspace; a shareable workspace opens again on its connector, and the compositor gives that view the camera it kept for the pair (S2). The memory stays per login and in the core only.
  • Review round 1: each save merges the saved pairs, view cameras and primary workspace that this login did not apply yet, a pair leaves the file only when its output shows a workspace or the user changes that output, the plan applies only on connectors connected when it was made and never disconnected since, a user change (the user epoch) stops steps 1 and 4 and limits the cameras, a lock between or inside the steps keeps the rest, and repeated passing refusals end the plan after 30 s. Review round 2: a user change of an output also leaves the live plan, the plan's own focus changes move no epoch, a pan or a primary switch in the compositor alone keeps the user's choice, a user move of a workspace drops its saved pairs on missing connectors, and a user selection writes the live primary workspace. The exact rules are in workspaces on several outputs, W11, As built (phase 6).
  • Boundary: only window-session.js and the outputs step of workspace-navigation.js read or write the assignments; no route, agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches them, and a source scan test checks it.
  • Tests: web-shell/test/output-persistence.test.js (fourteen tests, eleven more for review round 1 and four for review round 2: save, the extra-only shared workspace, load validation, the old-core round trip, the restore and its plan, the outputs step, a missing connector, a closed workspace, W1 without the shared lease, the leases and the lock, a lock during the primary switch, the plan dropped, the replug of a shared view, the output key proof, the boundary); native/smithay/src/shared_cameras_tests.rs a_camera_restore_with_an_output_moves_only_the_view_of_that_output.

Limits of phase 5:

  • The replug memory across a core restart (the second half of phase 6 of the earlier spec) is not built: a core restart forgets the remembered pairs of unplugged connectors, and the outputs plan, which lives in memory, does not run again in that login if the core restarts before it runs; the file keeps its pairs and views for the next login.
  • A saved pair whose connector is not connected at login, or that disconnects before the plan runs, waits for a later login; it never applies in the middle of a session.
  • Connector-name matching: a different monitor on the same port gets the saved workspace and view at the next login. No EDID or monitor identity is saved; saving it is a possible follow-up.
  • The record saves no focus output: a shared active workspace gets the focus on its lowest-order view at login.
  • The chat visibility of each view is not saved (W11); each view opens with the rule of today.
  • No nested QA: scripts/nested-qa.py removes its private profile at stop and has no way to seed window-session.json, so a login restore cannot run twice on one profile there. The proof is the Node tests, the in-process test and a new login live, which needs the user.

Review record

  • Round 1 (one code-reviewer, 2026-11-03): 5 HIGH, 8 MEDIUM, 5 LOW. Fixed: the formation rectangle and the fitted camera, which cannot be pixel for pixel because the primary grid area excludes the bars (S4, S5); the chat in a Grid on several outputs (S8); Focus, Monocle, Pair and Floating keep W1 (S1); cross-output moves of a window into the same workspace (S6) and same_workspace (S9); the drag and W11 are not built (Status, Current state, Persistence); a wrong reference; the camera seed by center point and the cleanup of stored views (S2); the keyboard window always drawn on the focus output, and Alt+Tab (S6); frames, presentation feedback, scales and popups (S6); per-view desktop_state fields (S9); the approval shows the hidden chat only on the agent view (S8); the missing earlier contracts (What this spec changes); the lease and the two capabilities for version skew (Version skew); the formation size trigger, the home wording, the owner computed at restore, the security note. Adopted the simpler order: Canvas first (phases 1 and 2), the Grid after its own work (phases 3 and 4).
  • Round 2 (one code-reviewer on the fix diff, the last round of a spec review): 0 HIGH, 4 MEDIUM, 6 LOW. Fixed: the formation rectangle is stored and sized by the primary output whenever it shows the workspace, so no selection, unplug or second view resizes it and the primary stays the identity (S4, S5); one collapse rule for the ends of the three leases and Super+Shift+T refused before phase 4 (S1); every path that gives the keys to a window moves the focus output to an output that draws it (S6); and the LOW items (the static grid wording, the order of outputs from geometry, the Grid fullscreen request, the popup limit, the skew check input, the old core re-save).

Open questions for the user

All answered on 2026-11-03 by "Aprovar os padrões": each recommended default below is the decision.

  1. Which monitor sizes the cells of a Grid workspace open on two monitors? Recommended default: the primary monitor whenever it shows the workspace, and nothing resizes when the other monitor opens it, a tab click on the primary monitor changes its workspace, or a monitor is unplugged (S4). On your two 1920 x 1080 monitors the second monitor then shows the grid at the same size, with an empty band the height of the bars. Alternative: the smallest monitor that shows it.
  2. Should the Grid camera stay locked on the second monitor? Recommended default: yes, fitted to the formation with no upscale (S5). Alternative: a free camera with pan and zoom on Grid views too, which changes the Grid contract.
  3. When you click a workspace that another monitor already shows, should it open on the monitor with the keyboard? Recommended default: yes (S7). Alternative: the keyboard goes to the monitor that shows it, as today, and a second view opens only by the menu.
  4. Should each monitor keep its own chat window of the shared conversation? Recommended default: yes, one chat per monitor, both of the same conversation (S8). Alternative: one chat, on the monitor with the keyboard.
  5. Should the agent move only the camera of the monitor with the keyboard? Recommended default: yes (S9). Alternative: every camera of that workspace.
  6. Is Canvas first, Grid later, the right order? Recommended default: yes, because Canvas needs no Grid work and reaches you sooner. Alternative: wait and ship both together after the Grid work.

Monitor routing fixes (2026-11-03)

A user report exposed an asymmetric layout toggle: Canvas to shared Grid was accepted, but toggling back returned workspace_shared. The toggle now remembers that Grid replaced a Canvas. Returning restores its saved window rectangles, client sizes and per-output cameras, retaining all views. The chat starts hidden on each returning Canvas view, as with the previous Grid to Canvas behavior. A shared Grid without a saved Canvas still requires one view for its first Canvas conversion. This memory is in the compositor only; it adds no persistence format.

Workspace bars mark the workspace of their own output, including the primary bar when the keyboard is on another output. Pressing a workspace bar selects its output before a workspace selection or a following Super tap. Protected panels keep the current focus output. A press on a distant shared Canvas window also selects the output of the press before focus or fit resolves its lead view. Clicking outside a floating chat hides only that output's chat, preserving the other output's chat.

Validation: 1,227 Node tests and 722 Rust tests passed after rebasing onto 9093504 (35 Rust tests ignored); UI syntax/lint/build, Prettier, rustfmt and Clippy passed. The Python supervisor suite ran 162 tests with two existing failures: test_home_links_and_configuration_preserve_profile_and_custom_config and test_the_real_core_gives_every_protected_panel still expect the panel list without window-size. Their sources and panel configuration are unchanged here. Nested verification was refused because another chat owned the active run; no nested or live UI proof is claimed for these fixes. Existing desktop processes were preserved; the compositor changes require the next login.

A row of windows (2026-11-04)

Super+G, its counterpart in the Actions menu and the button "Organizar janelas" move the windows of the whole workspace. A view of another output that frames every window or one window keeps that framing at the new places. A view with a free camera stays where it is, because that camera belongs to that monitor. An agent row moves only the agent view. One animation runs at a time (Data model), so the other view jumps to its place and the view of the action animates.