Canvas windows
Purpose
Gives each conversation workspace one 2D canvas and one camera, where windows keep their client size and snaps change only the camera, with the chat floating in screen space.
Requirements
Requirement: Canvas setting and layout switch
The system SHALL gate Canvas by the protected setting canvas (on by default since 2026-11-03, /api/canvas-enabled); while the compositor lease is on, a new workspace starts in Canvas and an existing workspace keeps its layout, and Super+Shift+T switches between Grid and Canvas. No agent tool or generated HTML SHALL pan or zoom the camera freely or change the setting. Full text: section Binding contract (from AGENTS.md).
Scenario: Existing workspace
- WHEN the lease is on and a workspace already has a layout
- THEN it keeps that layout
Requirement: Organizar janelas is host-only
The system MUST let only the protected bottom bar button "Organizar janelas" call /api/canvas-organize, which sends canvas_organize; no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it. Full text: section Binding contract (from AGENTS.md).
Scenario: Agent attempt
- WHEN an agent tool tries to call
/api/canvas-organize - THEN it cannot reach it
Requirement: Drag pans the camera below the input threshold
The system SHALL make a left drag (also Super+Alt) on a canvas window below the input threshold pan the camera and never move the window, and a click still fits it; at or above the threshold a user move ends on a tile of the visible area. Full text: section Binding contract (from AGENTS.md).
Scenario: Drag from afar
- WHEN the user drags a canvas window below the input threshold
- THEN the camera pans and the window does not move
Requirement: Typed canvas actions for the agent
The system SHALL give the authenticated agent only typed canvas actions: window_action move {x, y} (canvas units, bounded), window_action fit (and expand on a canvas window), arrange_windows row and open_application placement fit. The compositor MUST refuse an agent fit for a held window, with user_active during user input and for 2 s after it, and with rate_limited more often than every 2 s. Full text: section Binding contract (from AGENTS.md).
Scenario: Fit during user input
- WHEN the agent requests a fit during user input
- THEN the compositor refuses it with
user_active
Requirement: Layout-specific refusals
The system SHALL return grid_layout_only for the grid actions and arrange_windows grid on a Canvas base, and canvas_layout_only for the canvas actions elsewhere; the agent MUST NOT switch a Canvas workspace to Grid. Full text: section Binding contract (from AGENTS.md).
Scenario: Grid action on Canvas
- WHEN the agent sends a grid action on a Canvas base
- THEN it gets
grid_layout_only
Requirement: Floating chat controls are protected
The system SHALL let only the protected host collapse or expand the chat dock and set its side and its glass, through /api/chat-dock, /api/chat-dock-side and /api/desktop-chat-glass; no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the box state, the camera field, new_chat or these actions. Full text: section Binding contract (from AGENTS.md).
Scenario: Chat states
- WHEN the floating chat is used
- THEN it has three states:
collapsed,boxandexpanded
Requirement: Click outside hides the floating chat
The system SHALL hide a shown floating chat on a user press outside it, its dialogs, protected panels and other host windows, while the press still reaches the window under it; the core sends chat_hold while an approval, the change review card or a profile CSS candidate waits, and nothing hides in the overview or while locked. Full text: section Binding contract (from AGENTS.md).
Scenario: Pending approval
- WHEN an approval waits and the user presses outside the chat
- THEN the dialog stays
Requirement: Client maximize in Canvas
The system SHALL make a client maximize request of a canvas window that the user works in place that window as the Full tile of the usable area of its output at zoom 1, with the rules of a dropped window, give it the Maximized state and animate the camera of that view to zoom 1 over it; the client unmaximize request SHALL restore its earlier rectangle and size. Super+F and the agent fit keep the camera fit. Full text: section Binding contract (from AGENTS.md).
Scenario: Maximize
- WHEN the user double clicks the title bar of a canvas window, or presses its maximize button, at any zoom
- THEN the window takes the pixel size of the usable area of its output (without the chat column while the whole chat stands beside windows), within its client limits, and the camera of that view goes to zoom 1 showing it there
Scenario: Restore
- WHEN the user double clicks it again, or presses its restore button
- THEN the window gets its earlier rectangle and size back, and the camera does not move
Scenario: Move after maximize
- WHEN the user moves or resizes a maximized canvas window
- THEN it leaves the Maximized state and keeps its new place
Scenario: Agent fit
- WHEN the agent fits a window or the user presses Super+F
- THEN the camera fits the window, as before
Requirement: Client full screen in Canvas
The system SHALL give a canvas window that the user works in and that requests fullscreen the Fullscreen state and the logical size of one output, drawn over that whole output above the canvas, the chat and the bar and below the lock screen and the protected panels; leaving full screen SHALL restore its canvas rectangle and size without moving the camera. Full text: section Binding contract (from AGENTS.md).
Scenario: Fullscreen request
- WHEN a client requests fullscreen in Canvas for the window with the keyboard
- THEN the window gets the Fullscreen state and the size of its output and covers that output, including the bar
Scenario: Leaving full screen
- WHEN the client asks to leave full screen, or the user taps Super, switches the workspace of that output, opens the overview or moves the keyboard to another window on that output
- THEN the window gets its canvas rectangle and its size back, and the camera does not move
Scenario: Shared workspace on two outputs
- WHEN a Canvas workspace shows on two outputs and the window requests fullscreen from the view with the keyboard
- THEN it covers only that output, the other view does not draw it, and the keyboard on the other output does not end it
Scenario: Agent
- WHEN an agent reads
desktop_state - THEN it sees which output a window covers, and no tool requests full screen
Requirement: Sharp zoom is a protected setting
The system SHALL keep the protected setting canvasSharpZoom off by default (/api/canvas-sharp-zoom-enabled) and no agent tool or generated HTML SHALL change it; the setting MUST be turned off before a rollback of the core or the compositor. Full text: section Binding contract (from AGENTS.md).
Scenario: Rollback
- WHEN the core or the compositor is rolled back
- THEN the setting is turned off first
Requirement: Shared views on several outputs
The system SHALL keep for each output of a Canvas workspace on several outputs its own chat window and floating chat state; under the live lease an approval shows in and is answered from only the chat of the agent view, and the agent camera actions move only the agent view. Full text: section Binding contract (from AGENTS.md).
Scenario: Approval on several outputs
- WHEN an approval is pending under the live lease
- THEN it shows only in the chat of the agent view
Requirement: Click on a workspace is host-only
The system SHALL let only the protected bar call /api/workspace-show-all, which sends workspace_show_all; the camera of that view shows every window and no window and no chat state changes, and no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it. Full text: section Binding contract (from AGENTS.md).
Scenario: Workspace click
- WHEN the user clicks a workspace in the protected bar
- THEN the camera of that view shows every window
Requirement: Canvas window sizing panel
The system SHALL provide the protected React window-size panel with presets opened by right click on the outer window edge and no idle button, showing dimensions only during a resize; a preset, a drop on a tile and a tile assist choice place the window as a tile of the usable area of the output at zoom 1, as a dropped window, and animate that view to zoom 1. No agent tool, scheduled turn or generated HTML receives these controls. Full text: section Binding contract (from AGENTS.md).
Scenario: Size preset
- WHEN the user applies a preset through
/api/canvas-size - THEN the window takes the pixel size of that tile of the usable area of the request's output, and the camera of that view goes to zoom 1 showing it on the tile
Scenario: Full useful area at zoom 1
- WHEN the camera is at zoom 1 and the user applies Tela útil inteira to a window that is off center or partly off the screen
- THEN the window fills the usable area, within its client minimum and maximum, shows whole, and the camera does not change zoom
Scenario: Tile larger than the cap
- WHEN the client maximum of the window is smaller than the tile
- THEN the window takes the client maximum and is centered in the tile, as a dropped window is
Scenario: Half on the side of the window
- WHEN the user applies Meia largura to a window whose center, projected flat through the lens, is in the right half of the visible area
- THEN the window takes the right half; with its center in the left half it takes the left half
Scenario: Half height
- WHEN the user applies Meia altura to a window whose center is in the top half of the visible area
- THEN the window takes the top half; with its center in the bottom half it takes the bottom half
Scenario: Quarter
- WHEN the user applies Um quarto da tela
- THEN the window takes the quarter of the visible area that holds its center
Scenario: Center outside the visible area
- WHEN the center of the window is outside the visible area
- THEN the side is chosen at the nearest point of the area, as a drop outside the area is
Scenario: Client minimum larger than the tile
- WHEN the client minimum of the window is larger than the tile of the preset
- THEN the window keeps the outer edge of the tile, as a dropped window does
Scenario: Preset on an extra output
- WHEN a shared workspace shows on two outputs and the preset is requested from the extra output
- THEN the tile and the cap are those of the usable area of the extra output, only its camera goes to zoom 1, and the camera of the other output does not move
Scenario: Preset at another zoom
- WHEN the camera of the view is at zoom 0.5 or 1.5 and the user applies Meia largura
- THEN the window takes half the pixel width of the usable area, not half of what the camera showed
Requirement: Windows keep their client size
The system SHALL let windows keep their client size and move freely on the canvas, and a "full screen" snap changes only the camera zoom and position and MUST NOT send a size configure to the window. Full text: section Decision.
Scenario: Fit window
- WHEN a window is fitted
- THEN only the camera changes and no xdg configure is sent
Requirement: Out of scope for the canvas
The system SHALL NOT implement dragging windows between overview cards or agent mouse or keyboard automation of the live desktop. Without a live workspace_outputs lease extra outputs keep their static shared grids; under a live lease a Canvas workspace can show on an extra output. Full text: sections Out of scope and Two monitors.
Scenario: Overview drag
- WHEN dragging windows between overview cards is proposed
- THEN it is never implemented
Scenario: Extra output under a live lease
- WHEN a live
workspace_outputslease is on and capabilities.outputCanvas is reported - THEN a Canvas workspace can show on an extra output with its own camera
Requirement: Canvas coordinates are bounded
The system SHALL clamp canvas coordinates to plus or minus 65536 on each axis. Full text: section The plane.
Scenario: Absurd position
- WHEN the agent sends a window to an absurd position
- THEN the coordinates are clamped
Requirement: Agent focus, expand and restore of a canvas window
The system SHALL give the agent window_action focus, expand and restore of a canvas window the limits and rate limit of an agent fit (agent_window). focus of a canvas window outside the view centers the camera on it; restore returns it from a fit target. On a Canvas workspace (also in the overview over it) the core refuses focus and restore (and expand without the canvas tools) on a compositor without agentWindow. Full text: section Binding contract (from AGENTS.md).
Scenario: Focus outside the view
- WHEN the agent focuses a canvas window outside the view
- THEN the camera centers on it, under the limits and the rate limit of an agent fit
Scenario: Compositor without agentWindow
- WHEN the compositor lacks
agentWindowon a Canvas workspace - THEN the core refuses
focusandrestore
Requirement: A row keeps the fit it moves
Since 2026-11-04 an arrange_windows row SHALL keep the camera's fit at the new place when it moves the current fit target while the keys are not on another canvas window, or moves windows under a fit of every window; this is the one exception to rows that move no camera. Full text: section Binding contract (from AGENTS.md).
Scenario: Row moves the fit target
- WHEN the agent runs
arrange_windows rowand it moves the current fit target while the keys are not on another canvas window - THEN the camera keeps that fit at the new place
Requirement: Accepted exceptions of the agent canvas limits
The system SHALL keep these accepted exceptions with no limits: open_application on a Canvas workspace focuses the new window and fits the camera on it (user input must not fail an open), and window_action minimize, move and arrange_windows row move no camera but can give the keyboard to another window that shows, which the agent cannot pick. Full text: section Binding contract (from AGENTS.md).
Scenario: Open during user input
- WHEN the agent runs
open_applicationon a Canvas workspace - THEN the new window takes the keyboard and the camera fits it
Requirement: A new window while the user types
The system SHALL, since 2026-11-06, let a new window take its spot and neither the keyboard nor a camera move while the user types where they work; the accepted exception is the agent open_application, which still takes them. Full text: section Binding contract (from AGENTS.md).
Scenario: Window opens during typing
- WHEN a new window opens while the user types where they work
- THEN it takes its spot and neither the keyboard nor the camera moves
Requirement: Chat states and where they start
The system SHALL give the floating chat the states collapsed, box and expanded; a new or emptied Canvas or Grid workspace starts in the box. The expanded chat is centered on a workspace with no window and a column at the chatDockSide side on a workspace with windows. The chat of a Grid workspace on the primary output floats the same way. Full text: section Binding contract (from AGENTS.md).
Scenario: Emptied workspace
- WHEN a workspace is new or emptied
- THEN its chat starts in the box
Requirement: Super tap and the camera return
The system SHALL make a Super tap (compositor input) fit all at most at zoom 1 above the box and show the box; a second tap or Escape hides it and returns the camera. /api/chat-dock MUST take camera: "return" only with collapsed. Full text: section Binding contract (from AGENTS.md).
Scenario: Second tap
- WHEN the user taps Super a second time or presses Escape
- THEN the box hides and the camera returns
Requirement: Host expansion of the chat
The system SHALL let the protected host expand the box at the first key, at Enter on an empty field, at a send, and when a response starts (a scheduled turn too; box to whole chat only, never from hidden); also for a pending first-run card and before a dialog of the chat. It collapses the chat before a /name dispatch. Full text: section Binding contract (from AGENTS.md).
Scenario: Hidden chat
- WHEN a response starts while the chat is hidden
- THEN the host does not expand it
Requirement: Approval expands a hidden chat
The system SHALL have the core and the host expand a hidden chat or the box for an approval. Full text: section Binding contract (from AGENTS.md).
Scenario: Approval while hidden
- WHEN an approval waits and the chat is hidden
- THEN the core and the host expand it
Requirement: Chat keys of the Super mode
The system SHALL remove Super+Shift+F; Super+N (the compositor input request new_chat, which runs the code of /api/create) replaces the host key Ctrl+Shift+N, and Alt+scroll (compositor input) steps the focus between canvas windows with focus_next and focus_previous. Full text: section Binding contract (from AGENTS.md).
Scenario: New chat
- WHEN the user presses Super+N
- THEN the compositor sends
new_chat, which runs the code of/api/create
Requirement: Compositor and core update together for the chat
The system SHALL keep the compositor and the core updated together for the click outside rule and the box: scripts/check-host-skew.py warns about a core without chat_hold and refuses a core without the box state on a compositor with capabilities.chatBox. Full text: section Binding contract (from AGENTS.md).
Scenario: Core without the box state
- WHEN the compositor reports
capabilities.chatBoxand the core lacks the box state - THEN
scripts/check-host-skew.pyrefuses it
Requirement: Login restore of the canvas
The system SHALL have the login restore of the core (window-session.json) save and restore the canvas rectangles, saved sizes, cameras and collapsed docks while the setting is on. Full text: section Binding contract (from AGENTS.md).
Scenario: Login with Canvas on
- WHEN the user logs in with the setting on
- THEN rectangles, saved sizes, cameras and collapsed docks come back
Requirement: Camera input paths
The system SHALL run the camera keys, Super+scroll and pinch zoom through compositor input; their protected contextual mouse counterparts use the host-only typed action path, and Super+Shift+scroll takes the input request of Super+Left and Super+Right. Full text: section Binding contract (from AGENTS.md).
Scenario: Super+Shift+scroll
- WHEN the user scrolls with Super+Shift
- THEN the compositor takes the input request of Super+Left and Super+Right
Requirement: Agent view and desktop state on several outputs
The system SHALL treat the agent view as the view of the focus output when it shows the workspace of the turn, else the lowest-order view. /api/chat-dock takes an optional output only with capabilities.outputCanvas; desktop_state adds focusOutput, canvasWorkspaces[].views and windows[].views; the refusals same_workspace and workspace_shared reach the tools with texts. Full text: section Binding contract (from AGENTS.md).
Scenario: Focus output shows the workspace
- WHEN the focus output shows the workspace of the turn
- THEN its view is the agent view
Requirement: Automatic organize in Canvas
Since 2026-11-12 a workspace in the Canvas layout SHALL run "Organizar janelas" (the row, then the fit of every view) by itself when an application window appears in it or leaves it and when the usable area of an output that shows it changes size; it waits while the workspace is not ready, and no agent tool can call it. Full text: openspec/changes/archive/2026-11-12-canvas-screen-tiles/design.md, decisions 4 and 5.
Scenario: Window opens
- WHEN an application window maps into a Canvas workspace that shows other windows
- THEN the windows of that workspace are arranged in the row and the camera fits them all
Scenario: Window closes
- WHEN an application window of a Canvas workspace closes
- THEN the remaining windows are arranged again and the camera fits them all
Scenario: Output changes aspect ratio
- WHEN the usable area of an output that shows a Canvas workspace changes size or aspect ratio
- THEN that workspace is arranged again and each of its views fits all
Scenario: During a drag
- WHEN a window appears while the user holds a window or pans the camera of that workspace
- THEN the organize waits and runs once the pointer is released
Scenario: Dialog
- WHEN a dialog of a canvas window opens or closes
- THEN no organize runs
Scenario: Maximized window stays
- WHEN a canvas window is maximized and another application window opens in its workspace
- THEN the maximized window keeps its size and the Maximized state, takes its place in the row with no overlap, and the other windows are arranged
Scenario: Maximized window and an area change
- WHEN the usable area of the output of a maximized window changes size
- THEN the window takes the new Full tile at its pixel size and keeps the Maximized state
Scenario: Agent fit after an open
- WHEN the agent opens an application and the core fits the camera on the new window
- THEN the organize arranges the windows and the camera stays fitted on the new window at its new place
Scenario: Lone small window
- WHEN the organize leaves one small window in the workspace
- THEN the camera fits it at zoom 1 at most
Status
Doc status: current contract. Phases 0 to 8 landed and Canvas is the default since 2026-11-03. Since 2026-11-11 a drag from afar pans the camera and a user move ends on a tile of the visible area (section Tiles of a dropped window), and since 2026-11-12 a size preset takes a tile of the same area (section Window-attached controls). Since 2026-11-12 every tile is a tile of the usable area of the output at zoom 1 and a Canvas workspace organizes itself (sections Window-attached controls and "Organizar janelas"). Uncertain: phase 9 live validation with the user is not recorded. Checked 2026-11-12.
Status and decision record
- Status: approved by the user on 2026-11-01, with the recommended defaults of the open questions. Phase 0 (docs) is done. Phase 1 (input made correct for any transform) is done on 2026-11-01. Phase 2 (live overview planes) is done on 2026-11-01. Phase 3 (canvas model and pan at zoom 1), phase 4 (zoom and snapping), phase 5 (the floating chat), phase 6 (popups, dialogs and client requests), phase 7 (core, agent tools and persistence) and phase 8 (sharp zoom and draw cost) are done on 2026-11-01; the next phase is phase 9, the live check with the user. The base of this spec is
origin/mainat 28e15cb. - Phase 1 delivered:
Placement::to_windowandPlacement::focus_origin(native/smithay/src/layout.rs), one hit testhit_infor pointer focus, click selection andbegin_super_grab(state.rs), the input threshold 0.5 (INPUT_THRESHOLD, a constant until the protected setting exists), the thumbnail rule (thumbnail_window: the preview of the Chat presentation and a thumbnail motion take no input at any scale), dialogs that take the transform of their window inclip_dialogs, the click grab of native/smithay/src/click_grab.rs, and move and resize grabs that divide the screen delta by the scale of the window at the press. No layout draws an application at a scale other than 1 yet, so nothing changes for the user, except one case: the preview of the Chat presentation of a small application (at most 320 x 200 on a wide output) shows at scale 1, and it is now a thumbnail too. The tests are in native/smithay/src/scaled_input_tests.rs. Decisions and open items are in docs/work-log-2026-11.md.- Note of 2026-11-12 (history kept apart): the Fullscreen paragraph above (a fit of the camera, the chat collapse and the echo with no Fullscreen state) no longer holds. A fullscreen request of the canvas window with the keyboard now gives real full screen on one output (openspec/changes/archive/2026-11-12-canvas-real-fullscreen/design.md, Binding contract); Maximize keeps the camera fit described above.
- Phase 2 delivered: the command
overview_planes(cards and a clip, typed and bounded: 12 cards or fewer, distinct workspaces) and native/smithay/src/overview_planes.rs. The compositor renders each card workspace into a cached 384x216 texture (the scene ofscene::workspace_elements, the same as the PNG preview), with no readback and no file. A new card renders in the next frame. A changed workspace renders again at most every 100 ms, and 4 changed planes or fewer render in one frame. The texture is drawn scaled into the card slot, cut to the list clip, in front of the wallpaper and behind the shell window. The planes go away when the overview closes or the session locks, and a lock refuses the command. A render failure turns the planes off until the compositor restarts (overviewPlanes.failed), and the host falls back to the PNG path. The snapshot reportscapabilities.overviewPlanesandoverviewPlanes(cards withempty, clip, failed). A card isemptywhen its workspace has no window or when the compositor does not show the overview, so the host opens no hole over the scene of another presentation. The core routes arePOST /api/overview-planes(only the open conversations) andPOST /api/overview-planes-enabled(the protected settingoverviewPlanes, on by default, in Configurações). The host (createOverviewPlanesReporterin web-shell/host/workspace-previews.js) measures the slots, sends one request at a time, and opens a transparent hole only over a slot where the compositor reports a plane with a window. While the settings dialog is open, the overview uses the PNG path, because that dialog would show through the holes. The PNG path also runs when the card list is wider or taller than 4096 pixels (the bound of the command, for example on an output wider than about 4200 pixels): the host then reports no card and draws no hole. A refused request is retried every 500 ms until one succeeds, also when the compositor already reports the measured slots. Limits: with more than 12 visible open cards, the cards after the twelfth show the conversation summary (the PNG previews do not run while the planes do), a plane keeps the wallpaper of its last render, because the scene signature has no wallpaper, and on a scroll of the card list the holes and the planes stay at the old slots until the reply for the new slots arrives (one request to the core and the compositor), so the live image lags its card frame for that time. Closing the holes during a scroll would flash every card to its summary, so the lag stays. A hole can also open one frame before the first render of a new card, and that frame shows the wallpaper. In planes mode the content under the overview hasvisibility: hiddenandopacity: 0.#surfacesits in a plain#surface-frame, and the frame carries these rules: profile CSS in the ShadowRoot can restyle#surfaceitself with an!important:hostrule, which wins over the rule of the document, but it cannot select the frame or undo the opacity of an ancestor, so it cannot paint inside a hole. The application menu has no zoom roles, because the host measures the slots in CSS pixels and the compositor places them in window pixels. The frame timing log hasplane_rendersandplanes[...]. The tests are in native/smithay/src/overview_planes.rs, native/smithay/src/overview_planes_tests.rs and web-shell/test/overview-planes-host.test.js. Decisions, numbers and open items are in docs/work-log-2026-11.md. - Left for phase 3, the first phase with canvas windows:
initialfromWindowMeta.canvasinbegin_window_grab, the Canvas branch ofdrag_window, the grep gate test forelement_location, relative motion, pointer constraints and touch through the inverse transform (the click grab forwards relative motion with the default focus), and the chat rectangle hit-tested first (hit_intakes the topmost placement, and no window that takes input shows above the chat yet). Without canvas windows they have no case to act on. - Phase 3 delivered:
Layout::Canvasbehind the protected settingcanvas(off by default, in Configurações), at zoom 1. native/smithay/src/canvas.rs holds the pure parts:Camera(bounded to plus or minus 65536, zoom 1), the projection (a translation by a whole-pixel offset at zoom 1), the parking anchor, the dock rectangle, the edge snap, the free spot of a new window and the lease. native/smithay/src/desktop/canvas_mode.rs holds the compositor parts. Super+Shift+T switches the active workspace between Grid and Canvas; from Focus over a Grid base it goes to Canvas, and from Focus over a Canvas base it goes to Grid. Super+T toggles Focus and the base layout (Workspace.base). Grid to Canvas copies the current rectangle of each application window (the content-area origin is canvas (0, 0)), so no application window moves or gets a configure; the chat takes the expanded dock on the left.presentations()and the scene show a canvas window through the camera, cropped to the content area and culled outside it; its dialogs, the PNG preview and the overview plane follow the same projection (screen_placement). A left drag on empty canvas pans the camera after a 4 px dead zone, and a scroll on empty canvas pans it; a scroll over a window stays the client's. A pan keeps the keyboard focus; a left click on empty canvas without a pan clears it, as a click on nothing does on the grid. A title-bar drag or a Super drag moves a window in canvas units with edge snap (12 px, flush or a 16 px gap; Shift disables it). A move of a canvas window never leaves the canvas, also when the release is over an extra output, and a layout switch or the end of the lease during a move ends it. A pointer resize from the left or top edge keeps the right or bottom edge where the user put it, also when the client then takes a smaller size than it was asked for (Foot snaps to its cells), and also for later sizes that the client chooses, until the next move, as a floating window does. A window keeps the client size that it chose: the pending configure size follows it, so a later configure (a focus change, say) repeats that size, and the workspace overview does not resize a canvas window, also one that maps while the overview is open. A window that joins another workspace (bind, or a return to the primary output on another workspace) drops its canvas rectangle, so the canvas of that workspace places it as a new window and the camera pans to it. A canvas window that leaves the canvas for an inactive workspace (abindto it, or the end of the canvas while its workspace is not active) parks where the canvas showed it, so the PNG preview and the overview plane of that workspace show it there and not at the parking anchor, until the workspace is active and its layout places it. Commands:camera {op: set, x, y},canvas_move {window_id, x, y}(refused for a held, minimized, shell or dialog window and for a window of an inactive workspace) andcanvas_enabled {enabled}(the lease, renewed by the core after each connect, 60 s grace after the last connection that renewed it closes, allowed while locked; off converts every Canvas workspace to Grid and is refused while locked; the core sends off again after the unlock). The snapshot reports the per-windowcanvasrectangle,xandyof a canvas window and of its dialogs as the projected origin,canvasWorkspaces,canvasEnabledandcapabilities.canvas. The core accepts these values and a presentation scale up to 2.0 (smithay.jsvalidState), sends the lease only while the setting is on and the compositor reports the capability (POST /api/canvas-enabled; the core asks for the state of the compositor before each renewal, also behind the lock, because the capabilities of the last connection can belong to another compositor and an older compositor answers the unknown command with id 0, which ends the connection; a failed renewal is tried again every 2 s on the same connection), and window-session.json saves a Canvas workspace as "grid".placeApplicationtreats Canvas as the grid: it only focuses the new window and waits for its geometry, so opening an application from the chat never sendslayout tile, which would turn the workspace into Grid (pulled forward from phase 7; the canvasgeometryConfirmedis true, because a canvas window has no desired rectangle). The items left by phase 1:begin_window_grabanddrag_windowhave their Canvas branches, and the grep gate isevery_space_location_read_is_listed_with_its_reason. It scans every source file of the compositor except the*_tests.rsfiles, forelement_location(andelement_geometry(. At zoom 1 the projection is a translation, so relative motion needs no change; the compositor has no touch input and no pointer constraints yet, so they stay for the phase that adds a zoom. The chat dock is a shell window, sohit_instill tests it first. The agentarrange_windowsrefuses while a held window is on a workspace with a Canvas base, because a held window does not float on the canvas, so the grid would move it. Otherwisearrange_windowsturns the Canvas workspace into Grid, andwindow_action expandswitches it to Focus. The focus repair (clear_hidden_focus, after a workspace switch or a minimize, say) skips a canvas window that the camera puts outside the content area. An explicit focus (Alt+Tab, the bar window list, the agentwindow_action focus) of such a window centers the camera on it. So no focus change gives the keys to a window that is not drawn. One case stays: a window that has the focus keeps it when the user pans it off the screen, because the user moved the camera and not the focus. Limits of this phase: the chat dock has no background or blur yet (phase 5), so an application window under it shows through; a new window keeps the size it chose and the camera only pans to it; Maximize still switches to Focus, and so doesrestoreof a minimized window; the agentdesktop_statereports no layout for a Canvas workspace. The tests are in native/smithay/src/canvas.rs, native/smithay/src/canvas_tests.rs, web-shell/test/smithay.test.js, web-shell/test/canvas-http.test.js and web-shell/test/window-session.test.js. Decisions and open items are in docs/work-log-2026-11.md. - Phase 4 delivered: zoom and snapping, behind the same setting
canvas; with it off, or with the workspace in Grid, every key, scroll and pinch acts as before. native/smithay/src/canvas.rs adds the pure rules: the fit viewport (fit_viewport),fit,fit_all(48 px margin),one_to_one, the zoom about a point (Camera::zoomed), the camera clamp (Camera::clamped), the magnetic settle (settle), the double click test, the easing and the camera animation (Flight, 300 ms, zoom in log space). native/smithay/src/desktop/canvas_mode.rs adds the compositor parts. In Canvas: Super+F fits the focused window and a second press returns to the camera before the fit; Super+Shift+F fitted all (history: removed on 2026-11-04, the Super tap fits all); Super+Equal (or Super+Plus) and Super+Minus zoom by 1.25 about the viewport center; Super+Ctrl+0 zooms 1:1 with the focused window at the center of the fit viewport; Super+0 stays the key of workspace 10. Super+scroll anywhere on the primary output zooms about the pointer, and a pinch zooms about the pointer; both cancel the Super tap and do nothing while locked. A double click on empty canvas fits all, and a second one returns. A press on a canvas window drawn below the input threshold fits it, but only where that window is the topmost window, so the chat keeps its presses. Fits, snaps and keyboard zooms animate for 300 ms when the host reports motion (workspace_motion); Escape stops an animation at the current camera, a lock stops it, and pointer input waits for its end. Gestures follow the input at once. The snapshot reportscamera.target(the window id of a fit target, null otherwise). No fit sends a configure. Not added: edge auto-pan during a move (no phase lists it), Super+middle drag pan (added on 2026-11-02, see the Pointer section), the agentfit(phase 7), the threshold setting, and the refit on a chat collapse (phase 5, now delivered). The compositor exposes no relative-pointer, pointer-constraints or touch protocol yet, so the inverse transform for relative motion, pointer constraints and touch (phase 3 carried it to this phase) stays open for the phase that adds those protocols. The tests are in native/smithay/src/canvas.rs, native/smithay/src/canvas_tests.rs (with a touchpad test backend for pinch and two-finger scroll; session_lock_tests.rs gives the test client keyboard support) and web-shell/test/smithay.test.js. Decisions and open items are in docs/work-log-2026-11.md. - Phase 5 delivered: the floating chat, behind the same setting
canvas; with it off, or with the workspace in Grid, the chat, its presentations and every key act as before. native/smithay/src/canvas.rs addsDockSide,Dockand the collapsed geometry: 640 x 180 (COLLAPSED_WIDTH,COLLAPSED_HEIGHT, limited to the free area) at the bottom of the dock side with the 12 px margin. The state (expanded or collapsed) belongs to each Canvas workspace (Workspace.dock_collapsed), and the side is one setting for all workspaces (Desktop.dock_side). Commands:chat_dock {state: expanded|collapsed}(refused outside an active Canvas workspace and while the overview is open),chat_dock_side {side: left|right}andchat_glass {glass}(the rectangle and radius of the glass, asbar_glass); the lock refuses all three. The snapshot reportschatDock {side, state}per Canvas workspace,chatDockSide,chatGlassandcapabilities.chatDock. A Super tap (focus_chat) expands a collapsed chat of the active Canvas workspace before it focuses it. For an approval (a tool permission, a schedule proposal or a theme proposal) the core sendschat_dock {state: expanded}before it raises the chat, so the dialog has room. The modal dialog makes the toggle inert, so the protected host also sends that request while an approval dialog is open and the chat of the active Canvas workspace is collapsed and unlocked (review round 2). This covers an approval that came during a lock, with the overview open or before a switch to another Canvas workspace. Afocusof the chat by its id keeps the dock state, so a switch to an empty Canvas workspace, which raises the chat that way, keeps a collapsed chat collapsed. A pair and the return to the Canvas base keep the dock state; a new canvas (from Grid) starts expanded (since 2026-11-02: hidden; see The floating chat for the centered chat that hides). A sticky fit target fits again when the fit viewport changes, so a collapse, an expand or a side change refits it (instantly, with no animation). The fit viewport leaves out the strip of the collapsed chat at the bottom (a correction, see the Floating chat section). Smithay blurs the canvas behind the chat with the material of the bar glass, only while the chat draws at its dock rectangle in the active Canvas workspace with the overview closed; a transition, the overview and a chat that has not yet taken the new dock size draw no glass. The core routes arePOST /api/chat-dock({state}),POST /api/chat-dock-side({side}, saved aschatDockSidein the state of the core and sent by the core whenever the compositor reports another side while it is unlocked, so a restarted compositor gets it again) andPOST /api/desktop-chat-glass({glass}). The protected host shows a collapse and expand button in the composer only on a Canvas workspace of a compositor that reportscapabilities.chatDock(#chat-dock-toggle; without the capability, as with an older compositor after a host restart, the host keeps the Grid look), expands a collapsed chat at the first letter typed in it (the collapsed look hides the conversation, as the Palette does; after a toggle the focus goes back to the message field, so that letter reaches it), the select "Lado do chat no canvas" in Configurações, gives the collapsed chat the Palette look and the expanded chat the Sidebar look, draws the body as a rounded glass panel, and reports that rectangle withcreateBarGlassReporteron its own route. Not added: persistence of the dock state (phase 7), and the chat glass in transitions and the overview. The tests are in native/smithay/src/canvas.rs, native/smithay/src/chat_dock_tests.rs, web-shell/test/chat-dock-http.test.js, web-shell/test/smithay.test.js and web-shell/test/workspace-zoom.test.js. Decisions and open items are in docs/work-log-2026-11.md. - Phase 6 delivered: popups, dialogs and client requests, behind the same setting
canvas; with it off, or with the workspace in Grid, every popup, maximize and fullscreen request acts as before. Popups:new_popupandreposition_requestgive the positioner of a popup of a canvas window, or of a dialog of one, the camera viewport (the primary content area) without the chat dock of its workspace as its constraint area, in the coordinates of the parent of the popup (canvas::popup_area,canvas::popup_target,Compositor::canvas_popup_target). The positioner flips, then slides, as the client allows. The live scene crops such a popup to the content area instead of to its window (render_window_in), with no window finish on it, and the hit test gives the pointer to it there (hit_in). Both use one rule (canvas_popup_clip, review round 2): only in the live canvas scene, not in the F9 overview, where a popup stays inside the thumbnail of its window, and only for a window or dialog that the content area shows; a dialog that the camera puts outside the content area is not drawn, and its menus take no pointer. So a menu can extend past its window, but never under the bars. The chat dock draws above canvas windows and their popups and takes the pointer first, so the constraint area leaves out the dock (the expanded side, or the strip of the collapsed chat at the bottom, as for the fit viewport, but with no margin); a menu flips or slides away from the chat (correction of review round 1; the first build used the whole content area, and a menu could open under the chat). A popup that cannot fit there still draws under the chat. A popup is placed again only at its creation and at a reposition, not when the camera moves later. Workspace previews and overview planes still crop a popup to its window. Dialogs: they already followed their window through moves and the zoom (phase 3); phase 6 adds a test at zoom 1.25. Maximize: in Canvas,Desktop::set_app_maximizedroutes Maximize and Restore toset_canvas_maximized, andWorkspace::set_app_maximizedno longer turns a Canvas into Focus.Command::Maximizefits the camera on the window and keeps a fit that is there, so an agent retry does not undo it; a clientset_maximizedof the fit target is sent as Restore, so the maximize button toggles the fit (the same as Super+F). Restore un-minimizes the window, focuses it and returns the camera when the window is the fit target. A maximize that cannot fit (a window with no size yet, a thumbnail motion, no content area) is refused before it changes anything. The core confirms a maximize on a Canvas workspace when the snapshot reports the window as the camera target of the active workspace (canvasFittedin smithay.js), because no Maximized state comes. Neither changes the layout or sends the Maximized state; the reply echoes the size of the client. A maximize of a dialog is refused; a maximize or restore of the chat is refused in Canvas. While a pan or a window grab holds the pointer, a maximize and a restore of the fit target are refused ("A pointer grab holds the camera"), so the core reports the refusal and does not wait for a fit; another restore shows the window without the explicit focus that centers the camera on it (review round 2). In the workspace overview over a Canvas workspace, a restore of the fit that the overview keeps for its return returns the camera. The keyboard rule ofapp_maximize_requeststays (requested_by_focus). Fullscreen: a request of a dialog gets the default reply and changes neither the camera nor the chat, as a maximize of a dialog is refused (review round 2). A request of a canvas window toggles: when the window is the fit target, the camera returns; otherwise the camera fits the window and then the chat collapses (a refused fit leaves the chat as it was). The chat stays collapsed after the return. The configure echoes the current size with no Fullscreen state, so the client asks again (F11) to leave. Outside an active Canvas the replies stay as before. While a pan or a window grab holds the pointer, maximize and fullscreen requests do not move the camera. Self-resize: the commit of a canvas window of the active Canvas workspace keeps its anchor at once (anchor_canvas): after a user resize from the left or top edge the right or bottom edge stays (the phase 3 edges rule,WindowMeta.canvas_edges), otherwise the top-left stays, and a fit target fits again at that commit. Nested QA (nested proof only) ran GNOME Text Editor (GTK4), Visual Studio Code (Electron) and Google Chrome; no Qt application, Firefox or agent terminal ran (see the work log). Note of 2026-11-12 (history kept apart): the Maximize paragraph above (a clientset_maximizedtoggles the camera fit, with no Maximized state and nounset_maximized) no longer holds for a canvas window with the keyboard. It now takes the Full tile with the Maximized state and the unmaximize request restores it (openspec/changes/archive/2026-11-12-canvas-maximize-tile/design.md, Binding contract);Command::MaximizeandCommand::Restorefrom the core and Super+F keep the camera fit described above. The tests are in native/smithay/src/canvas.rs, native/smithay/src/canvas_clients_tests.rs and native/smithay/src/desktop.rs. Decisions and open items are in docs/work-log-2026-11.md. - Phase 7 delivered: core, agent tools and persistence, behind the same setting
canvas; with it off, or with the workspace in Grid, every tool, open and restore acts as before, except thatdesktop_statelistscanvasWorkspaces(empty) and accepts the layout name "canvas". Compositor commands, all behindcapabilities.canvasTools, because an older compositor ends the connection on an unknown command:canvas_fit {window_id, source?}(the fit of one window;source: "agent"adds the agent limits),canvas_restore {window_id, x, y, width, height}(the saved rectangle, and the saved size as a second configure),canvas_arrange {exclude, held?}(the row) andcamera {op: restore, x, y, zoom}(a saved camera, with no animation and with the clamp). The compositor keeps the time of the last device or synthetic input (every input event except a device change) and the time of the last agent fit. An agent fit is refused for a held window, withuser_activewhile a pointer button, a pan, a window grab or a pinch runs or within 2 s of the last input, and withrate_limitedwithin 2 s of the last agent fit. A refused fit does not count. Acamera restoreand acanvas_moveare also refused while a pan or a window grab holds the pointer, as a fit and a row are: the grab would undo them at its next motion (review round 4). The snapshot reportslastInputMs,capabilities.canvasTools, and thecanvasrectangle of a window also in Focus or the overview over a Canvas base (so the core saves it). For a canvas window,geometryConfirmedmeans that no size configure is in flight. Super+G in Canvas runs the row: the windows line up from the left at their size with a 32 px gap, from the top of the highest one; held and minimized windows and dialogs stay, the camera stays, and a moved fit target is no target anymore. A row, acanvas_move, acanvas_restoreor acamera restorethat puts the window with the keyboard outside the content area gives the keys to the topmost window that shows (the focus repair ofclear_hidden_focus), and the camera stays; only a pan by the user keeps the keys on a window that it moved off the screen (review rounds 2 and 3). With the keyboard on a window of an extra output, Super+G fills the grid of that output as before, as Super+F zooms it. Core:desktop_stateadds the layout "canvas" andlayoutPending(while a window has not applied the layout, for example a canvas window during a size configure,layoutis the requested one andlayoutPendingis true; before phase 7 the layout was missing then),canvasWorkspaces(camera and dock) and per windowcanvasandpresentation;window_actionaddsmove {x, y}andfit, andexpandon a canvas window is an agent fit, and in the overview over a Canvas baseexpandreturnscanvas_layout_only, because the compositor makes that maximize a fit that closes the overview, with no agent limits (review round 4); the grid actions returngrid_layout_onlyon a window of a Canvas base, andmoveandfitreturncanvas_layout_onlyoutside the active Canvas workspace;arrange_windowsaddsrowand returnsgrid_layout_onlyforgridandtileon a Canvas base;open_applicationadds the placementfit, which returnscanvas_layout_onlyoutside Canvas and the refusal for missing canvas tools on a compositor withoutcapabilities.canvasTools, asmoveandfitdo (review round 4). In Focus or the overview over a Canvas base, both refusals say that only the user returns to the canvas (Super+T in Focus) and that the agent does not retry. On a Canvas workspace every placement of smithay.jsplaceApplicationis a focus, one corecanvas_fitwith no source, and the wait forvisible,focusedandgeometryConfirmed; no layout command. window-session.json stays at version 1 and adds per windowcanvasand at the top levelcanvasWorkspaces; a canvas window keeps the cells of its last grid placement. A camera or rectangle change alone is saved at most once a second, and the core writes the last one when it closes; a new canvas base and a dock change save at once (review round 2). Restore: a workspace with acanvasWorkspacesentry restores as Canvas when the compositor has the canvas tools and the lease is on; otherwise it restores fromworkspaceLayouts, as Grid, and the first save after that restore drops the canvas fields. The camera and the dock of a restore go out only while the workspace of the restore is still active and in Canvas. The tests are in native/smithay/src/canvas_agent_tests.rs, native/smithay/src/canvas.rs, web-shell/test/desktop.test.js, web-shell/test/smithay.test.js, web-shell/test/manual-control.test.js and web-shell/test/window-session.test.js (with the loader test of the 28e15cb code, web-shell/test/fixtures/window-session-28e15cb.js.txt). Decisions and open items are in docs/work-log-2026-11.md. - Phase 8 delivered: sharp zoom and draw cost, behind the protected setting
canvasSharpZoom(off by default, in Configurações under "Canvas de janelas",POST /api/canvas-sharp-zoom-enabled); with it off, the compositor offers no new global and draws every window as before. native/smithay/src/sharp_zoom.rs holds the parts. The compositor command iscanvas_sharp_zoom {enabled}, behindcapabilities.canvasSharpZoom(an older compositor ends the connection on an unknown command); the snapshot reportscanvasSharpZoom. The core saves the setting and sends it while the compositor reports another value and is unlocked, after each connect and unlock, and sends nothing while the setting is off and the compositor reports it off; the lock refuses the command. The first on creates the globalswp_viewporterandwp_fractional_scale_v1; they stay until the compositor restarts, so a client that bound them keeps them, and off sends scale 1 (correction of this spec: the spec did not say when the globals exist; see the work log). A client that started before the first on gets the globals as a late registry event, and it may use them only for its new windows: the protected settings text says that the setting applies to the applications opened after it. The control timer gives each canvas window, and each dialog of one, that the scene draws above zoom 1 the zoom as its preferred scale (in steps of 1/120, up to 2.0), and every other window scale 1, once the wanted scales stayed the same for 300 ms (SETTLE); a camera that moves on each tick waits, and zoom 1 or less, a culled window, another workspace and the setting off give scale 1, which frees the larger buffers. A new fractional scale object starts with the scale of its window. The window keeps its logical size: the client draws a larger buffer into the same viewport destination, andplace_elementsizes each surface element from that logical size (Smithay sizes a surface element from the destination of its viewport,SurfaceView.dst), so the camera samples the buffer one to one. Below zoom 0.35 (CACHE_BELOW) a canvas window of the live canvas scene that the content area shows draws from a texture at its drawn size, rendered on the GPU with no readback, again at most every 100 ms after a commit of its own surfaces or a size change, and at most 4 changed textures in one frame. At most 12 windows with no texture yet render in one frame, and a window that waits for its first texture draws live until then. The textures together stay within 256 MiB (4 bytes per pixel at the drawn size); a window past that draws live. Its popups draw live, with the rules of phase 6, so a popup commit does not render the texture again, and the window finish (corners) applies to the texture. The control timer frees every texture while the session is locked. A window that the frame draws live again, zoom 0.35 or more, and the setting off free the texture, and a render failure turns the cache off until the compositor restarts. The frame timing log addscache_renders. Not added: a threshold or scale for a window on an extra output (no canvas there), a cache for the overview planes and the workspace transitions (they keep their own paths), and a throttle of frame callbacks. The budget numbers of the nested run are in the work log; nested numbers only point in a direction, and the budget check on the real GPU stays for phase 9. The tests are in native/smithay/src/sharp_zoom.rs, native/smithay/src/sharp_zoom_tests.rs (two EGL tests: a buffer at the zoom draws one to one, and the cache), web-shell/test/canvas-sharp-zoom-http.test.js and web-shell/test/smithay.test.js. Decisions and open items are in docs/work-log-2026-11.md. - Super mode (2026-11-04): phase 1 of Super mode changes the floating chat and its keys. Current contract: the chat has three states (hidden
collapsed, the composer boxbox, the whole chatexpanded); a Super tap fits all and shows the box, and a second tap or Escape hides the box and returns the camera; Super+Shift+F is removed; Super+N opens a new conversation; Alt+scroll steps the focus between canvas windows; a new or emptied workspace starts in the box; the whole chat is centered on a workspace with no window and a column at thechatDockSideside (right by default) on a workspace with windows, and the fit viewport excludes that column. Where a statement below says otherwise about the Super tap, Super+Shift+F, the start state of the chat or the side setting, it is history. See "The Super mode (2026-11-04)" in The floating chat. - Date: 2026-11-01.
- Owner decision: the project owner. Each phase below ships behind a protected setting, and the default stays off until the live check in phase 9. On 2026-11-01 the user decided that Canvas stays a permanent option beside Grid, and that Canvas becomes the default after phase 9 (see "The default layout decision" below). The exception is phase 2: the approved rollout table turns
overviewPlaneson after nested QA, which passed on 2026-11-01. The DRM backend, two outputs and the real host are not verified yet; the setting in Configurações is the rollback, and a render failure falls back to the PNG path.
The default layout decision (2026-11-01)
The user said, in Portuguese: "sim, registrar na spec a decisão de manter o canvas como opção permanente, com Canvas como padrão depois da fase 9".
- Canvas and Grid both stay as permanent layouts. Neither replaces the other, and Super+Shift+T switches a workspace between them.
- Until the phase 9 live check passes, the setting
canvasstays off by default and Grid is the default layout. (History: replaced on 2026-11-03, see "The default in effect" below.) - After the phase 9 live check passes, Canvas is the default: the setting
canvasis on by default, and new workspaces start in Canvas. Existing workspaces keep their saved layout. - The protected setting
canvasstays as the user choice and as the rollback. A user who turns it off gets Grid everywhere. - The switch of the default is its own change after phase 9, with its own review and a dated line here. A failed live check keeps Grid as the default.
The default in effect (2026-11-03)
The user moved the switch before the formal phase 9 check ("faz essa mudança, isso já foi solicitado", "Canva é o padrao"). Since 2026-11-03 Canvas is the default:
- The core reads the protected setting
canvasas on unless the profile saved it off (store.state.canvas !== false, web-shell/core/server.js), so a fresh profile sends thecanvas_enabledlease after each connect. A profile that savedcanvas: falsekeeps Grid everywhere; the setting in Configurações stays the rollback. - The compositor starts a new workspace in Canvas while the lease is on (
apply_canvas_defaultin native/smithay/src/desktop/canvas_mode.rs, called by each layout pass). A workspace is new while nobody chose its layout (the per-workspace flagdecided) and it has no application window when it shows. A layout command (the login restore and the agent), Super+Shift+T, the canvas default itself and the end of the lease decide it, and a workspace that shows with application windows under the lease keeps its layout and counts as decided. So existing workspaces keep their layout and nothing moves, and a workspace on several views waits (S1,refuse_shared). - Workspace 1 at compositor start: it is new when it is still empty once the lease arrives (a fresh profile, or a login restore with nothing to place yet), so it starts in Canvas. Applications that open before the lease make it keep Grid. The login restore (web-shell/core/window-session.js) keeps a saved Grid: its restored windows decide the workspace, and when the workspace already turned Canvas the restore sends its
layoutcommand, which decides it too. decidedlives in compositor memory only. On a new compositor (a new login) a saved Grid workspace that shows empty becomes Canvas, and the first workspace can show Canvas briefly before the restore sends itslayout grid.- The lease rule is unchanged: a core restart that takes longer than the grace time ends the lease, and every Canvas workspace turns to Grid (decided, so the next lease keeps Grid).
- The lock, the overview, a workspace transition, a thumbnail motion and a camera flight of that workspace defer the default to a later layout pass (the unlock or the end of the transition).
- The chat rules stay: a new canvas starts with its floating chat in the box (since the Super mode of 2026-11-04; from 2026-11-02 to 2026-11-04 it started hidden, and a Super tap showed it), and a workspace that Super+Shift+T turns to Grid shows its chat.
- The nested and DRM live checks of phase 9 are still open; this change has Rust and core tests only until then.
The user's words (2026-11-01, Portuguese, quoted)
- "eu queria um sistema de janelas que nao fosse limitado por posicionamento, algo como um canvas que desse para reposicionar as coisas dentro e o chat ficasse ao lado flutuando"
- "O canvas tem que ter alguma forma de snapping para facilitar colocar um app em tela cheia (mudanca de zoom e posicionamento da camera do canva, nao mudanca do tamanho da janela)"
The same day the user changed two shortcuts. Super+S opens the overview, and a Super tap focuses the chat. A parallel task implements that change. The user also said that the current workspace overview is bad in performance and in UI.
Decision
Each conversation workspace gets one 2D canvas on the primary output and one camera. Windows keep their client size and move freely on the canvas. The chat floats beside the canvas in screen space, and the camera never transforms it. A "full screen" snap changes only the camera zoom and position. It never sends a size configure to the window.
The canvas is a new variant Layout::Canvas of the Layout enum, serialized as "canvas". It sits beside Grid, Focus, Floating, Monocle and Pair, and it is gated by the protected setting canvas (on by default since 2026-11-03, see "The default in effect").
What this decision supersedes
The old lines become history. Keep them in place, mark them as history, and link them to this decision. The docs never gave a technical reason for the old exclusion. They only called the canvas a "hypothesis" or "outside the milestone".
| Old text | Location | New status |
|---|---|---|
| "The infinite canvas stays outside the milestone." | AGENTS.md:15 | Replace it with a pointer to this file and to the new section in docs/architecture-decisions.md. |
| "An infinite or scrolling canvas. It is outside the current milestone." | openspec/specs/tiling-spec/spec.md:20 | History. Move it out of "not in scope". |
| "The infinite canvas remains a hypothesis." | openspec/specs/interaction-decisions/spec.md:35 | History. |
| "...and the infinite canvas, outside the current milestone." | openspec/changes/archive/2026-10-31-ideas/design.md:12-14 | History. |
| The "infinite map" lines | openspec/changes/archive/2026-10-26-web-shell-mvp/design.md:18, :59 | History. |
| D1: a fixed 6x4 grid is the workspace model | openspec/specs/tiling-spec/spec.md:36-53 | Valid in Grid layout only. |
| D2: the chat is a tile with a 2x2 minimum | openspec/specs/tiling-spec/spec.md:73-93 | Valid in Grid layout only. In Canvas the chat dock replaces it. |
| D3: Grid is the default layout | openspec/specs/tiling-spec/spec.md:98-99 | Kept until phase 9. After the phase 9 live check, Canvas is the default (user decision of 2026-11-01). Grid stays a permanent option. |
| D5: a drag snaps a window to cells | openspec/specs/tiling-spec/spec.md:140-169 | Valid in Grid layout only. In Canvas, the tiles of the visible area replace it since 2026-11-11 (the edge snap before). |
Super+F and expand mean a whole-grid zoom with a client resize |
openspec/specs/tiling-spec/spec.md:114; native/smithay/src/grid.rs:682 | Valid in Grid layout only. In Canvas, Super+F means a camera fit. |
| D6: only cells persist | openspec/specs/tiling-spec/spec.md:237-282 | Extended with additive canvas fields, as described in this spec. |
| The Super tap opens the overview | native/smithay/src/input.rs:319-329; docs/architecture-decisions.md:155-162 | The parallel shortcut task replaces it. This spec takes no part of it. |
"Maximize toggles main area and side chat": idempotent set_maximized and unset_maximized, and an XDG Maximized state that follows the presentation |
docs/architecture-decisions.md:242-260 | Valid outside Canvas only. In Canvas, set_maximized places the window as the Full tile with the Maximized state since 2026-11-12 (the camera fit, with no state, before). |
This decision does not change these items:
- The "Composition and thumbnails" decision. It says to transform the window and keep its logical size (docs/architecture-decisions.md:37-40), and the camera extends it.
- The rule that dragging windows between overview cards is never implemented (docs/architecture-decisions.md:33-35; AGENTS.md:13). A drag inside one canvas is a different feature. It changes the canvas position of a window in its own workspace, and it never moves a window to another workspace.
Add a dated section "Workspace canvas and camera (2026-11-01)" to docs/architecture-decisions.md. That file has no canvas entry today. The section quotes the two requests and links to this file.
Approach selection
Three candidate designs were scored from 1 (poor) to 5 (good).
| Criterion | A: camera, windows parked at negative x | B: camera, saved views, movable chat | C: camera behind a setting, input first |
|---|---|---|---|
| Fit with the rules | 4 | 4 | 5 |
| User's words (free position, floating chat, snap without resize) | 3: snaps cap at zoom 1, so a small window never fills the screen | 5 | 4 |
| Input precision | 3: needs a manual wl_surface.enter |
4 | 5: input is made correct first, with no behavior change |
| Performance on 2 x 1920x1080, integrated GPU | 4 | 3: throttled callbacks can stall clients | 4 |
| Migration risk | 2: record version 2 makes an older core drop the whole session (web-shell/core/window-session.js:71) | 2: writing "canvas" into workspaceLayouts makes an older core drop every layout (window-session.js:35-50) | 4: additive fields, a setting, a capability check and a lease. An older core still disconnects while a workspace is in Canvas (see Migration). |
| Testability with nested QA | 4 | 4 | 5 |
The winner is C. Grafts from the other designs:
- From A: the magnetic settle after a gesture, log-space zoom interpolation, the "arrange row" command, and viewport culling.
- From B: glass blur behind the floating chat (as the bar glass does), and a camera clamp that keeps one window reachable. Also a 4 px pan dead zone and a rate limit on agent camera actions.
Purpose and scope
In scope
- One canvas and one camera per workspace, on the primary output.
- Window positions in canvas coordinates. The core places a window anywhere (
canvas_move); a user move ends on a tile of the visible area (since 2026-11-11; free with edge snap before). - Camera snaps: fit one window ("tela cheia"), fit all windows, zoom 1:1, and a return to the previous camera.
- Camera animation, with reduced-motion support.
- A chat dock in screen space beside the canvas, in two states: expanded and collapsed.
- Correct pointer, touch and dialog input at any zoom at or above an input threshold.
- Live overview imagery drawn by the compositor, with no CPU readback. This part is independent of the canvas.
- Agent tools: typed
move,fitandrow, with newdesktop_statefields. - Additive persistence in window-session.json.
- Sharp zoom above 1 through
wp_fractional_scale_v1andwp_viewporter, for clients that support them.
Out of scope
- A canvas on extra outputs. They keep their static shared grids.
- Dragging windows between overview cards. This is never implemented.
- Saved camera views, a minimap and snap guides. If nested QA shows a need, a later spec adds them as protected web panels.
- A redesign of the overview card UI. A separate spec owns it (see open question 5).
- Parallax of the wallpaper in the compositor. Since 2026-11-02 the crystals wallpaper moves with the camera, with depth: each crystal layer pans and scales by its own factor, less than the windows (openspec/specs/hex-crystals-wallpaper/spec.md, phase 2).
- Pins on the canvas. Pins stay in the chat column.
- Mouse or keyboard automation of the live desktop by the agent.
- The Super tap and Super+S bindings. The parallel task owns them.
Current state
These facts were mapped from the code at 28e15cb. This step re-read the lines marked (checked).
Geometry and layout
Placement {x, y, width, height, scale}is the shared geometry for rendering and overview hit tests. The file header says "No client resize" (native/smithay/src/layout.rs:1-52).- The
Layoutenum has Floating, Grid (the default), Focus, Monocle and Pair (native/smithay/src/desktop.rs:27-39). It is serialized in lowercase, and Grid keeps the aliastile. - Each
Workspacekeeps its layout, presentation and one grid for the primary output (desktop.rs:219-230, 288-307). WindowMetakeeps workspace, output slot, minimized, maximized, desired, parent, shell and floating (desktop.rs:255-287).place()maps the window and configures the client to the rectangle size. So every layout today resizes clients (native/smithay/src/desktop/layout.rs:5-28).desktop_stripsgives the content area between the 40 px top bar and the 40 px bottom bar (desktop/layout.rs:582-615).- The grid is 6 x 4 cells with an 8 px gap. The chat keeps at least 2 x 2 cells (native/smithay/src/grid.rs:9-15, 93, 158-161).
The chat and its presentations
- In Sidebar, the chat takes the left 3/10 of the area (checked: native/smithay/src/focus.rs:34-42).
- Palette is a 640 x 180 chat. Workspaces makes the chat cover the area (focus.rs:43-58).
- The chat is one trusted Electron window, identified by the host PID and the window bound to the role chat (window layers phase 4: no title gives it that role; see window layers).
- Its two GPU planes keep pixels with the workspace that painted them (native/smithay/src/workspace_web.rs:1-60).
Rendering
- The stacking layers go from back to front: 0 wallpaper, 1 layout app, 2 floating, 3 shell and chat, 4 palette chat and motion, 5 bars, 6 web panels (native/smithay/src/state.rs:384-410).
presentations()is the single source of per-window placement for the scene, hit tests and the snapshot (state.rs:412-566).place_elementapplies Rescale, then Relocate, then Crop. Any scale draws on the GPU path (native/smithay/src/scene.rs:473-484).render_windowcrops a window and its popups to the window rectangle (scene.rs:425-470).workspace_plane_elementsplaces windows fromelement_locationplus an x offset (scene.rs:845-970). The depth cards render planes into offscreen textures (native/smithay/src/workspace_depth.rs:75, 148).- Frame callbacks go to every primary-output window on each frame (native/smithay/src/drm.rs:218-228).
- While locked, the scene draws only lock content (scene.rs:43-46).
- Theme effects run only in the overview, for placements of 320 x 200 or smaller (scene.rs:93-97), and only for
EffectTarget::OverviewF9(effect_pipeline.rs:628, deleted with the GLES scene at step 8). - The window finish radius is the
windowRadiusof the active window theme (12 px before the core sends one; 16 px in Office, 24 px in Galaxy), scaled by the placement and clamped to 2 and to half the smaller side (finish_radiusof scene.rs). It does not grow above scale 1.
Input
Phase 1 replaced the first three bullets and the scale 1.0 rule of grab_refusal and begin_super_grab below, and the move and resize grabs now divide the delta by the scale. These bullets are history, before phase 1, at 28e15cb. See the Phase 1 delivered line in the Status section.
surface_under_inaccepts only placements withscale == 1.0, and it hit-tests throughspace.element_location(state.rs:624-645).clip_dialogsdrops every dialog of a window drawn at a scale other than 1.0 (state.rs:571-611).- A press on a placement with scale below 1.0 only focuses the window (native/smithay/src/input.rs:619-650).
- Smithay derives the surface-local position as the location minus the focus origin (input.rs:232-269).
- Scroll goes to clients. The three-finger swipe drives workspaces. Pinch events reach the catch-all and are dropped (input.rs:512-524, 698-746).
- The lock gates keyboard shortcuts (input.rs:309-317) and swipe gestures (input.rs:511-514) only. Axis events have no lock gate of their own.
- Move and resize grabs compute
event.location - self.start.location(grabs.rs:902). Client grabs start fromgrab_start_data(grabs.rs:805). - The compositor keeps no time of the last user input.
pointer_timeis the time of the last pointer event only (state.rs:84). - History (the code of 2026-11-01): a Super tap opens the overview. A pointer button press with Super held cancels the tap (checked: input.rs:18-43, 319-329). Since 2026-11-01 Super+S opens the overview, and since the Super mode of 2026-11-04 the tap fits all and shows the composer box.
clamp_locationkeeps a 64 x 32 title strip inside the content area (native/smithay/src/grabs.rs:99).grab_refusal(grabs.rs:370) andbegin_super_grab(grabs.rs:825) accept only windows at scale 1.0.- Popups are only tracked. They get no unconstrain logic, and the popup grab is a no-op (native/smithay/src/handlers/xdg_shell.rs:179-197). Since phase 6, a popup of a canvas window is placed in the camera viewport without the chat dock; the popup grab is still a no-op.
- No fullscreen request handler existed (xdg_shell.rs:154-160). Phase 6 made a fullscreen request of a canvas window toggle the fit; since 2026-11-12 it gives the window real full screen on one output (see the Binding contract); elsewhere the reply is as before.
- A new toplevel opens at (32, 32). With the
sessionfeature and a session, its size is the first output minus 64. Otherwise it is 960 x 600 (xdg_shell.rs:25-46). new_toplevelsets that size before the first commit. The app id is not known yet, and the core has not bound the window to a saved record.
Outputs and the lock
- The primary output is at (0, 0). Extra outputs follow to the right in the same Space, and the output scale is 1 (native/smithay/src/outputs.rs:85-97).
- While locked, the compositor refuses every command except a short allowed list (desktop.rs:176-189).
The core and the agent
- The agent window tools are based on cells (web-shell/core/desktop.js:11-20, 83-123, 442-533).
placeApplicationwaits forvisible,focusedandgeometryConfirmedonly when the placement istileandrequestedLayoutis "grid" or "focus" (web-shell/core/smithay.js:562-597).- In every other case it calls
super.placeApplication(web-shell/core/desktop-client.js:397-402). That writeslayout tileorpair, so it switches the workspace out of its layout. open_applicationrequiresplacement, with the enum["right", "tile"](desktop.js:75-78, 417-418).geometryConfirmedneedsdesired.loc == element_locationand an acknowledged size (native/smithay/src/desktop/snapshot.rs:26-89).- window-session.json saves cells and
workspaceLayouts. It saves no pixel geometry and no camera (window-session.js:22-52, 131-168, 340-375). - An older core throws away the whole record when
version !== 1(checked: window-session.js:71). - An older core drops the whole
workspaceLayoutslist when one layout is unknown (checked: window-session.js:10, 35-50). validStatein smithay.js is stricter. It throws "Invalid Smithay state" whenstate.layoutis not in itslayoutslist (smithay.js:45, 56).- It throws "Invalid Smithay workspace layouts" for one unknown item, or for an item with keys other than
layout,workspace(smithay.js:124-137). - It throws "Invalid Smithay presentation geometry" when a
presentation.scaleis above 1 (smithay.js:164-172). - Each of these errors disconnects the core (smithay.js:748-759). The core then retries the connection every 1 s (smithay.js:947-971).
observe()rebuilds the whole record from the compositor snapshot, with only its listed fields. It saves the record when it differs (window-session.js:355-375).
The overview
- Each preview renders 384 x 216 offscreen, reads the pixels back to the CPU and writes a PPM file. The core then converts it to PNG and base64 (native/smithay/src/workspace_preview.rs:22-60, 124-133; scene.rs:974-1108; web-shell/core/workspace-previews.js:64-92, 333-380).
- The host polls every 1000 ms with one batch in flight. The compositor allows 12 requests per second (vendor/interface/host/workspace-previews.js:146-150).
- This pipeline explains the slow overview that the user reported.
Model
Coordinate spaces
| Space | Unit | Used for |
|---|---|---|
| Screen space | Pixels of the primary output. Extra outputs are to the right. | Cursor, bars, chat, web panels, wallpaper, lock, extra outputs. |
| Canvas space | Client logical pixels at zoom 1, one plane per workspace | Positions of canvas windows. |
| Space coordinates | Smithay bookkeeping | Mapping and output enter. For a canvas window this is never a geometry value. |
The plane
WindowMetagainscanvas: Option<Rectangle<i32, Logical>>. A window belongs to one workspace, so the rectangle lives on that workspace's plane.- Canvas coordinates are clamped to plus or minus 65536 on each axis. So f64 and i32 values stay exact, and the agent cannot send a window to an absurd position.
The parking anchor
- A canvas window stays mapped in the one Space, so the frame callback and visibility rules do not change.
- Its Space location is a parking anchor. Smithay chooses output enter from the element bounding box, which includes CSD shadows and subsurfaces outside
geometry(). - So the anchor uses
b = window.bbox(), relative to the element location:x = min(primary.x, primary.right - (b.loc.x + b.w))andy = primary.y. - The bounding box then ends at or before the right edge of the primary output. The compositor computes the anchor again when the bounding box changes on a commit.
- Extra outputs are only to the right, so
space.refreshsends output enter only for the primary output. - A unit test checks this rule with bounding box values. It covers a right shadow, a subsurface past the geometry, and widths larger than the primary output.
The camera
Workspacegainscamera: Camera { cx: f64, cy: f64, zoom: f64, target: Option<WindowId>, previous: Option<(f64, f64, f64)> }.(cx, cy)is the canvas point at the viewport center.Workspacealso gainsbase: Layout, either Grid or Canvas. It is the layout that Super+T returns to from Focus. TodayWorkspacehas onelayoutfield and no base layout (desktop.rs:220-230).- The camera viewport is the content area between the bars.
- The fit viewport is the camera viewport minus the expanded chat dock and a 12 px margin. Correction of 2026-11-02: the chat floats centered and hides, so the fit viewport is the content area with the 12 px margin (see The floating chat). When the chat is collapsed, the fit viewport is the content area minus the margin and minus the strip of the collapsed chat at the bottom (corrected in phase 5; see The floating chat).
The projection
There is one projection function:
canvas_to_screen(ws, rect) -> Placement
x = vp.center.x + (rect.x - cam.cx) * zoom
y = vp.center.y + (rect.y - cam.cy) * zoom
width = rect.w * zoom, height = rect.h * zoom, scale = zoom
inverse: canvas = cam.c + (screen - vp.center) / zoom
- At zoom exactly 1.0, the compositor rounds the camera so that every window origin lands on a whole pixel.
- The zoom range is 0.1 to 2.0.
- Since 2026-11-03 every window without a canvas placement, outside the focus layout, goes through the same projection with a locked camera (zoom 1, viewport at the origin), which is the identity; see grid-on-canvas.md.
Windows
- The camera never changes a client buffer or a logical size.
- A new window gets one size configure when it opens. The default size is the fit viewport, so the fit of a new window is zoom 1.0 and its text stays sharp. This replaces the "output minus 64" session default and the 960 x 600 default (xdg_shell.rs:25-46) in Canvas workspaces only.
- A new window goes to the first free canvas rectangle to the right of the focused window, with a 48 px gap. Then the camera fits it.
- As built on 2026-11-03 ("quando um aplicativo abrir outro, o foco deveria mover a camera para ele, no monitor/workspace ativo no momento"): a window without a parent opens on the workspace of the focus output (
focused_workspace), not always on the primary workspace, and when a Canvas pass first places it, the camera pans to it and it takes the keyboard once (place_canvas_view), so a window that an application opens gets the focus where the user works. Not in the workspace overview; the lock places nothing. - A window that opens while the user types (2026-11-06, the user: "Headless e regra geral", after a nested QA window took the keys of the application in use): on the workspace where the user works, within
USER_QUIET(2 s) of a plain key press, a new window takes its spot and nothing else: the camera stays, the keys go on to the same window, and no later pass gives them to it. It does not depend on the origin of the window, so it also covers whatagent_routedoes not reach (openspec/specs/super-mode/spec.md, Limits). Typing is a key that writes or erases text. Any other key (Enter, Escape, Tab, an arrow, a function or media key), a chord (Ctrl, Alt or Super held) and a pointer press end it at once, because a window that follows one of them is what the user asked for: a command in a terminal, a/name, Ctrl+N, a link. Space and a dead key change nothing: they go on with typing, and alone they are no typing, because Space also presses a button. A modifier key alone changes nothing. A key of the lock screen is no typing. The focus preference for an app id in the Focus layout follows the same rule. A dialog keeps its rule, which is the keyboard already on its window; a typed command of the core or the agent (focus,open_applicationwith a fit) is no new window. With the camera afar, the fit of an open by the core still frames every window (placed_afar), and that typed fit also takes the keyboard. The Grid never gave a new window the keyboard, except the first window with nothing focused. Two limits: the window gets no sign of its own, so from afar its spot can be out of view until the user looks for it in the bar, Alt+Tab or a Super tap; and a parentless prompt that opens during typing also waits for a click. The rule reduces accidents and is no defense against key theft: a client that opens a window after Enter or a 2 s pause still takes the next keys, as before. Nested proof and tests: docs/nested-qa.md, Evidence, anda_new_window_*in canvas_tests.rs. - A dialog opens centered over its parent and moves with it, as commit bed4b48 does for a drag.
- A restored window gets a second configure with its saved size, after the core binds it to its saved record (see Persistence).
- A client that changes its own size keeps its canvas anchor at that commit. As built in phase 6: after a user resize from the left or top edge, the right or bottom edge stays (the phase 3 edges rule); otherwise the top-left stays. If that window is the camera target, the camera fits it again at the same commit.
- A user resize (a client-side edge drag, or Super+right drag) still sends a new size. Its delta is in canvas units: the screen delta divided by zoom.
- A user move or resize writes
WindowMeta.canvas. The window does not become Floating, and its Space location stays at the parking anchor (see Input mapping).
Layout switches
- Grid to Canvas: each application window's current pixel rectangle is copied into canvas space. The content-area origin becomes canvas (0, 0), at zoom 1.
- Application windows do not move and get no configure.
- The chat leaves its tile of at least 2 x 2 cells (grid.rs:15) and takes the dock rectangle. So the chat moves, and its Electron window gets one size configure.
- Canvas to Grid: the existing
sync_gridandfloat_newrun (native/smithay/src/desktop/tiling.rs:234-354). The canvas rectangles stay in the window records, but the next Grid to Canvas switch copies the current rectangles again (corrected in phase 3: a return to saved rectangles would move every window that the grid placed, and the switch must move nothing). - Focus to Canvas (Super+T over a Canvas base): each application window takes its canvas rectangle again, and a window whose size changed in Focus gets one configure with its canvas size.
The floating chat
-
The chat stays the single protected Electron window, with its PID trust, the role chat and its per-workspace GPU planes. Its workspace marker title is paint data, the only title the compositor reads after window layers phase 4. There is one chat per workspace, as before.
-
In a Canvas workspace the chat is not a tile. It is a dock in screen space.
-
Since 2026-11-03 the chat of a Grid workspace on the primary output floats the same way (the user: "no modo grid também pode manter o mesmo comportamento do card de não travar, ficar flutuante"): centered at the same dock rectangle over the grid, no cells, hidden and shown by a Super tap and
chat_dock, the dock glass and no chat regions, the floating look in the host, and an approval or a proposal that waits for review shows it. A new Grid workspace starts in the box since the Super mode of 2026-11-04 (from 2026-11-03 to 2026-11-04 it started with the chat shown), and a Canvas workspace that returns to Grid shows it. While the whole chat shows, the Grid formation leaves a margin at the chat side, which is no cell (openspec/specs/super-mode/spec.md). The snapshot fieldfloatingChat {workspace, state}reports it, becausecanvasWorkspaceslists only canvas bases. The rest of this section still says Canvas where it applies to both. See openspec/specs/tiling-spec/spec.md, The chat window, and openspec/specs/grid-on-canvas/spec.md, step 1b. -
Click outside (2026-11-03): a press of the user outside a whole floating chat hides it, as a second Super tap does; since 2026-11-04 the box stays, except for a press on an application, which takes the keyboard and hides it too (openspec/specs/super-mode/spec.md, The three states of the chat) (2026-11-03: "quando eu clico fora do chat ele deve sair de cena, mesma coisa a janela de configuração"). The rule is
hide_chats_on_pressin native/smithay/src/desktop/canvas_mode.rs, called from the pointer button path of native/smithay/src/input.rs, so only real input reaches it. A press on a chat (also the chat of another output), on one of its dialogs, on a protected panel (the model picker or another panel opened from the chat) or on another host window keeps it; a press on a bar, an application window, the wallpaper or empty canvas hides it, and the press still reaches the window under it (an application gets focus and the click). A Super chord and a press that ends a pointer grab (a popup menu) do not count. Nothing hides in the overview, while locked, or while the core holds the chats for an approval: the core sendschat_hold {held}(capabilities.chatHold, reported back aschatHeld) while a tool request, a theme card or a schedule proposal waits, so the approval dialogs stay visible. The core sends the hold at once before it expands the dock for an approval (holdChatin core/smithay.js), so a press right after the dialog appears cannot hide it; the state poll releases it, and a new hold shows a hidden floating chat again once (a Super tap can still hide it). The hold also covers the source change review card and a profile CSS candidate.chat_holdneeds the control connection and ends with it; the first holder keeps it, and another connection cannot release or take it, as the canvas warp lease does; the lock refuses it. A stale hold only turns the rule off, never on. Version skew: a compositor withcapabilities.chatHoldand a core withoutchat_holdlets a press hide an approval dialog, so the compositor and the core update together for this feature;scripts/check-host-skew.pywarns about that pair. It covers the primary floating chat and the floating chat of a Canvas workspace on an extra output; the Focus layout and the tile chats of extra outputs are unchanged. No agent tool, scheduled turn, generated HTML or plugin panel sendschat_holdor hides the chat. Inside the chat host, a press on the backdrop of the settings dialog (Configurações, the modal#account-dialog) closes it (closeOnOutsidePressin vendor/interface/host/host.js), except while a ChatGPT login is pending. -
The default dock side is left, which follows the Sidebar precedent. Right is a protected setting. (History: since the Super mode of 2026-11-04 the side places the whole chat beside windows and the default is right.)
-
The dock width is 3/10 of the content width, clamped to 360 to 560 px. The dock height is the content height minus 2 x 12 px, with a 12 px margin from each edge.
-
The chat has two states:
- Expanded: the dock rectangle. The fit viewport excludes it.
- Collapsed: the Palette geometry (640 x 180) at the bottom of the dock side. Correction of 2026-11-02: the collapsed chat is the composer only, 640 x 82 (see below). The fit viewport is the content area above the collapsed chat. Correction (phase 5): this spec said the full content area, but the collapsed chat then covers the bottom of a fitted window (nested QA showed it on the Calculator), so the fit viewport ends 12 px above the collapsed chat.
-
Canvas windows can pass under the expanded chat during a pan, so the chat floats over the canvas. Glass blur behind the chat keeps it readable. The host reports the chat rectangle, and Smithay draws the blur, as it does for the bar glass (openspec/specs/web-panels/spec.md).
-
The chat stays in the shell band of window layers, above the app band of canvas windows and above the desktop and hud bands of plugins. A canvas surface or a plugin never draws above the chat, so no client can cover or imitate the protected composer. (Before window layers this line said "stacking layer 3, above canvas layers 1 and 2", the numbers of the old title-based
stacking_key.) -
In Canvas, the Focus presentations map like this: Sidebar is the expanded dock, Immersive is the collapsed chat, and Palette is the collapsed form. The Chat presentation, with its scaled app strip, is not used.
-
Focus layout keeps all of its presentations unchanged.
-
As built in phase 5: the Focus presentations are not mapped to commands in Canvas. The dock has its own command
chat_dock, and the host gives the expanded dock the Sidebar look and the collapsed dock the Palette look. The side is one protected setting for all workspaces; the state belongs to each workspace and lives in compositor memory until phase 7. A Super tap, the first letter typed in the collapsed chat and an approval (the core sendschat_dockbefore it raises the chat, and the host sends it again while the approval dialog stays open) expand a collapsed chat; a focus of an application window or of the chat by its id (a switch to an empty workspace) keeps it collapsed. The chat glass is the body of the host as a rounded glass panel, and the blur draws only while the chat sits at its dock rectangle with the overview closed. -
As built in window layers phase 3 (2026-11-01): the dock is an anchored placement (
canvas::dock_placement) that the shared solverlayers::solveplaces, as it places the bars and the panels. Expanded: area content, anchorleftorright, margins 12, width 3/10 held to 360..560, height fill. Collapsed: anchorbottom-leftorbottom-right, margins 12, 640 x 180 (82 high since 2026-11-02, below), clamp size. The camera exclusion of the chat is the dock side when expanded and the bottom when collapsed (canvas::dock_exclusion).fit_viewportandpopup_areasubtract a list of exclusions (Compositor::camera_exclusions), not the chat by name: the dock exclusion while a mapped window declarescamera_exclusive: "dock"(the chat of a phase 3 core; since window layers phase 4 a fallback chat with the fixed title is an unbound window with no camera exclusion). While the host reloads or restarts and the chat is not mapped, a fit of a sticky target or an agent fit in that gap uses the whole content area, and the camera moves again when the chat maps. A test compares the new dock, fit viewport and popup area with the old functions on a table of content areas from 25 px wide, both states and both sides. The commandschat_dock,chat_dock_sideandchat_glassdid not change. -
History: superseded on the same day by the centered chat that hides (next item). Correction of 2026-11-02 (the compact collapsed chat): in the phase 9 live check the user saw the collapsed chat as a 640 x 180 glass card with only the composer row in it, about 56 px high, and said "não precisava ser um card de unico elemento". They approved that the collapsed chat is only the composer, with glass only behind the composer. As built:
COLLAPSED_HEIGHTis 82, the composer (58 px with its border in the host CSS of the collapsed look) and the 12 px padding of that look above and below it, so the composer has the same 12 px inset on all four sides. The width stays 640, still limited to the free area, with the bottom anchor, the 12 px margins and the clamp. The fit viewport and the popup area follow the new height: on a 1920 x 1040 output with the 32 px top bar the collapsed chat is (12, 946, 640, 82) and the fit viewport (12, 44, 1896, 890); on an 800 x 600 output with the same bar the chat is (12, 506, 640, 82) and the fit viewport (12, 44, 776, 450). The host gives the body of a collapsed dock the classchat-dock-collapsed: the body draws no panel (no background, border, radius, shadow or clip), and the host reports the rectangle of the composer (.composer-shell, radius 20) through the samechat_glasscommand, so Smithay blurs behind the composer alone. The composer keeps only the edge highlights of its shadow (--glass-bubble-shadow), because its 48 px drop shadow would end at the edge of the compact window. The collapsed look hides everything else in the composer area (the status lines, the errors, the cards, the voice transcript) and the capture thumbnail; they show again in the expanded dock. A capture ("Mostrar ao agente", after its result) and a voice start expand a collapsed dock first, as the first letter typed, a Super tap and an approval already did, because the thumbnail and the voice status do not fit. A send while a capture waits in a collapsed dock (a draft sent with Enter after a collapse) expands the dock and sends nothing, so the user sees the capture before it goes to the model. The protected settingchatBluroff turns the composer glass of the collapsed dock off, as it does for the composer outside the dock; the expanded dock keeps its glass panel with the setting off, as before. The expanded dock did not change. Version skew: a new host on an older compositor gets a 640 x 180 window for the collapsed dock; the composer then sits centered in that window with glass only behind it and no card, and the fit viewport still ends above the 180 px strip. An older host on the new compositor draws its full-body glass card in the 82 px window, with the composer centered and no room for a status line. Both run without errors; a rollback of either part alone is safe. -
Correction of 2026-11-02 (the centered chat that hides): the user asked "pode mostrar o chat centralizado em vez de na lateral? quando apertar super e ele já tiver aberto ele sumir, ele vai ser chamado só quando precisar" and "o recolher chat não é o suficiente, ele precisa sumir quando não precisarmos dele". This replaces the dock at a side, the compact collapsed chat and the effect of the side setting. As built:
canvas::dock_placementis area content, anchorcenter, margins 12, width 2/5 of the content width held to 480..760, height 3/4 of the content height held to 360..900, clamp size; on a 1920 x 1040 output with the 32 px top bar the chat is (580, 158, 760, 756). The wire statecollapsedofchat_docknow means hidden: the compositor draws nothing of the chat, gives it no pointer or keyboard input (visible_window), and moves the keyboard away from it. The hidden chat keeps its centered rectangle, so it shows again with no configure. The chat takes no part of the fit viewport or of the popup area: the fit viewport is the content area with the 12 px margin and the popup area is the content area, so a show or a hide moves no camera and a menu may open under the shown chat. A new canvas (from Grid, or on a new Canvas workspace) starts with the chat hidden. A Super tap (focus_chat) on a Canvas workspace hides a shown chat, and shows and focuses a hidden chat; with the F9 overview open it changes nothing. An approval still shows a hidden chat: the core and the host sendchat_dock {state: expanded}as before, and the host sends it again at each state while the approval dialog stays open, so a Super tap cannot hide the chat until the user answers. A source change that waits for review (proposal.stateready) shows a hidden chat once per revision (syncProposalDock); it blocks no turn, so a later Super tap may hide the chat. A voice conversation stops when the chat hides, because a hidden chat shows no voice status. Alt+Tab and the F9 overview skip the hidden chat. The login restore hides the chat again when it savedcollapsed. The host keeps the Sidebar look and the body glass for the chat in Canvas in both states, has no toggle button any more (the user: "acredito que podemos até remover o botão de recolher";#chat-dock-toggleandchatDockToggleare removed, so a Super tap is the only way to hide or show the chat), no longer shows the setting "Lado do chat no canvas", and removes the compact look (chat-dock-collapsed), the Palette look of the collapsed dock and the expand at the first letter, a capture or a voice start (a hidden chat takes no keys). The side stays on the wire (chat_dock_side,chatDockSide,chatDock.side) and moves nothing;camera_exclusive: "dock"stays a valid declaration value and takes nothing. Grid did not change. Version skew: an older host on the new compositor gives the hidden chat a look that nobody sees, and its toggle still hides the chat; a new host on an older compositor shows the collapsed dock with the Sidebar look in its 82 px window. Roll the compositor and the host back together. -
The Super mode (2026-11-04, current contract, super-mode.md): the chat has three wire states.
collapsedstays hidden (nothing drawn, no input);boxis the composer alone in a 640 x 180 window at the bottom center of the content area, 12 px above the bottom bar area (canvas::box_placement), with input like the whole chat and no part of the fit viewport or of the popup area;expandedis the whole chat. A compositor withcapabilities.chatBoximplements it. The whole chat is centered (canvas::dock_placement) on a workspace with no application window and a column at thechatDockSideside (right by default, the protected setting back in Configurações > Janelas as "Lado do chat") on a workspace with windows: the width of the centered chat, the content height minus the 12 px margins; fits use the content area minus that column. A new workspace and a workspace whose last application window closed start in the box (Shownwhilechat_holdholds it). A Super tap fits all, at most at zoom 1 and above the box (on Grid, recenters), sets the box and sendschat_focus; in the workspace overview it makes no fit and no dock change, and the core closes the overview atchat_focus; a second tap on a box that the tap showed hides it and returns the camera from a fit all, or after an Alt+scroll step centers the focused window at the zoom before the tap;chat_dock {state: collapsed, camera: "return"}does the same for Escape in the host. The host shows only the composer in the box, expands it at the first printable key, at Enter on an empty field, at a send and once per start of a response, collapses it after a/namedispatch, and has a chat button in the bottom bar (lit while the whole chat shows). An approval, a review card and the hold expand the box as they expand a hidden chat. Super+Return hides the chat. The second tap, Escape and a click outside hide the box.
Interaction
The bindings below apply only when the workspace layout is Canvas. Every new Super binding is a chord. The canvas work binds no bare Super key and no Super+S.
Pointer
- Left drag on empty canvas pans the camera. Empty canvas means no window and no shell surface under the pointer. A 4 px dead zone keeps a plain click on the wallpaper from panning. Correction of 2026-11-02: Super+left on empty canvas pans too, with the same dead zone, focus and double click rules. Before, a Super+left press on empty canvas did nothing, because only a window can take the Super move. In the phase 9 live check the user said: "quando eu clico em uma janela ela captura o mouse então eu tenho que apertar windows para continuar indo, dai quando clico fora da janela ainda segurando super não funciona mais e tenho que soltar de novo". Super+left on a window still moves the window, and Super+right still resizes it.
- Super+middle drag anywhere on the primary output of the active Canvas workspace pans the camera, also over a window or the chat dock. Correction of 2026-11-01: no phase lists this item, and phase 4 did not add it. Added on 2026-11-02 (
begin_super_panin native/smithay/src/desktop/canvas_mode.rs): the press and the release do not reach the client, the pan uses the 4 px dead zone of the left pan, and a Super+middle click without a pan keeps the focus and makes no double click. It does not act on an extra output, while locked, in the overview or during a transition or a camera animation. Outside Canvas, Super+middle reaches the client as before. A Super press with any click is no Super tap. - A double click on empty canvas fits all windows (snapping rule 3). A second double click restores the previous camera. Two presses count as a double click within 400 ms and within the 4 px dead zone. A press that starts a pan cancels it. The fit runs at the release of the second press, so a second press that becomes a pan never fits.
- A title-bar drag, or Super+Alt+left drag (Super+left alone before 2026-11-02, see the next item) that starts on a window, moves that window in canvas units (delta / zoom), and the drop takes a tile of the visible area (since 2026-11-11; with edge snap before, see Tiles of a dropped window). Correction of 2026-11-01 (phase 4, review round 4): this holds at or above the input threshold. Below it no window moves or resizes: a Super+left or Super+right press, and a press on a title bar, take the rule below, so they only focus and fit the window. The user fits or zooms in first, then moves the window.
- Correction of 2026-11-02 (user: "win + arrastar está movendo a janela, não o workspace"): Super+left drag pans the camera anywhere on a Canvas workspace, also over a window, as Super+middle does. Super+Alt+left drag moves the window (until 2026-11-11 Shift during the move turned off the edge snap; since then the drop takes a tile). In Grid, Super+left still moves the window.
- While a window moves within 24 px of the viewport edge, the camera pans at 600 px/s. Correction of 2026-11-01: no phase lists this item, and phase 4 did not add it; it stays open.
- Super+right drag resizes the window in canvas units. This sends a configure, because the user asked for a new size.
- Correction of 2026-11-11 (the owner: "mover as janelas no modo camera deve ser impedido"; in the question round the camera mode is the whole Canvas, and the gesture to block is the drag from afar): below the input threshold a left drag on a canvas window, also with Super+Alt, never moves it. It pans the camera as a drag on empty canvas does (
begin_far_panin native/smithay/src/desktop/canvas_mode.rs): the press focuses the window and goes to no client, the camera moves only once the pointer leaves the 4 px dead zone, the end of the pan settles, and a release inside the dead zone is a click that fits the window, as before. The title bar and Super+Alt drag at or above the threshold still move the window, onto a tile (section Tiles of a dropped window). The agentwindow_action movekeeps its contract. Tests:a_left_drag_on_a_canvas_window_below_the_threshold_pans_the_camera_and_never_moves_it,a_far_drag_that_a_layout_switch_interrupts_keeps_its_release_from_the_clientanda_super_press_below_the_threshold_or_during_an_animation_is_no_super_tapin native/smithay/src/canvas_tests.rs. The item below is history. - History (2026-11-03 to 2026-11-11), correction of 2026-11-03 (user: "quando dou zoom out para ver as janelas de longe e organizar não consigo"): below the input threshold a left drag on a canvas window moved it, also with Super+Alt, so the user organizes a zoomed-out canvas without zooming in first. The whole window is the handle there, because the client gets no press below the threshold: the press focuses the window and starts the move grab (
begin_far_movein native/smithay/src/grabs.rs), the window moves only once the pointer leaves the 4 px dead zone, the move is in canvas units (screen delta / zoom) with the edge snap, and the client gets no button. A release inside the dead zone is a click: the camera fits the window at the release, as the rule below. Resize, the right and the middle button below the threshold keep the rule below. The topmost rule below holds: a press on the chat over a zoomed-out window goes to the chat. Tests:a_left_drag_on_a_canvas_window_below_the_threshold_moves_it_in_canvas_unitsanda_super_press_below_the_threshold_or_during_an_animation_is_no_super_tapin native/smithay/src/canvas_tests.rs. - Below the input threshold, a press on a window is swallowed. The window gets focus, and the camera fits it. The default threshold is zoom 0.5, and a protected setting can change it within 0.35 to 0.75. Correction of 2026-11-01: a canvas window takes such a press only where it is the topmost window under the pointer, so a press on the chat dock over a zoomed-out canvas window goes to the chat. The threshold is still the constant
INPUT_THRESHOLD; the setting does not exist yet. A window whose fit zoom is below the threshold stays below it after the fit; Super+Ctrl+0 is the way out. - At or above the threshold, clicks and scroll reach the client through the inverse transform.
Scroll and touchpad
- Scroll over a window goes to the client, as today. The canvas never takes plain scroll from an app.
- Two-finger scroll on empty canvas pans the camera. Since 2026-11-15 a mouse wheel on empty canvas never moves the camera, fitted or not (the owner: "ainda tá sendo possivel quando está com a camera, colocar o mouse fora da janela e acabar fazendo scroll"; asked, the owner chose that the wheel stops and the touchpad keeps its pan): the wheel is taken and reaches nothing, a wheel tilt too. The pan stays on the touchpad, a drag on empty canvas, Super with the left or the middle button, and the keys; a double click on empty canvas, Super+scroll down (fit all) and Super+scroll up (the nearest window at zoom 1) bring the windows back into view. Before 2026-11-15 a wheel step there panned four times its amount (
WHEEL_PAN); that is history. Since 2026-11-12 a scroll on empty canvas does not move the camera while the view is fitted on a window (the owner: "nao deveria dar para dar scroll na camera quando tira o mouse do app dentro da visão aproximada"); the scroll is taken and reaches nothing. - Super+scroll up anywhere acts on the camera up to zoom 1, as the next items describe.
- Since 2026-11-03 (the user: "o scroll down deve andar um tamanho de zoom fixo que seja possivel ver todas as janelas, e apontar o mouse sobre os lugares faz com que a camera centralize sozinha onde o mouse tá"), Super+scroll down goes in one animated step to the fit of every window of the canvas (
crate::canvas::fit_all), at most at the current zoom, so a scroll down never zooms in, and with no fit target. A canvas with no window keeps the small zoom step. The view then enters the follow mode (ViewState::follow, one per view, so each output camera of a shared workspace has its own): each frame (follow_pointer) the camera center eases toward the canvas point that the overview camera shows under the pointer (crate::canvas::follow_step, about two thirds of the way inFOLLOW_TIME0.25 s, same zoom, within the camera clamp). It does nothing while a button is held, a pinch, a pan or a window grab runs, a camera animation of that view runs, the session is locked, or the overview or a transition covers the primary output, and only the view under the pointer follows. Any other camera move ends it: Super+scroll up, a pan, a pinch, a key, a fit or an agent action (user_cameraandflyclear it). Before 2026-11-03 Super+scroll down zoomed out by the small scroll step; that is history. - Since 2026-11-03 (the user: "quando dá zoom para dentro também deveria voltar para o tamanho da resolução preferencialmente fazendo snap em uma janela mais proxima"), Super+scroll up below zoom 1 goes in one animated step to zoom 1 centered on the canvas window nearest to the pointer (
crate::canvas::nearest, the topmost of the windows under it), with no fit target and no follow mode, and that window takes the keyboard focus. Super+scroll up stops at zoom 1 (the user: "pode parar em 1:1"), including with no window: a canvas with no window keeps the small zoom step about the pointer, capped at 1. At zoom 1 or above a Super+scroll up does nothing, and the canvas still consumes it. A pinch in and Super+Equal stop at zoom 1 too (the user: "mesmo limite sim, é a mesma intenção, só um input diferente"): at zoom 1 or above Super+Equal does nothing, below it the step is capped at 1, and a pinch begun above 1 after a fit does not go higher, while a pinch out and Super+Minus still lower the zoom. Fits (Super+F, fit all, the agent fit) may still exceed zoom 1, up to the zoom limit. - Pinch zooms about the pinch center. This needs new
GesturePinch*handling, with its own lock gate. A pointer grab still gets the event first. As built in phase 4: the pinch scale only zooms (its center delta does not pan), and under a pointer grab the pinch is dropped, as before. - The three-finger swipe stays the workspace and overview gesture.
- A pan or pinch ends when the pointer crosses to another output.
- An axis, pinch or button event with Super held must call
LogoTap::cancel(input.rs:40-42). Without that call, Super+scroll ends in a Super tap, which fits all and shows the box (focused the chat before 2026-11-04). As built in phase 4: an axis or pinch event calls it only when the canvas takes it. A button press with Super held always calls it, also a press that a camera animation, the overview or a window below the input threshold takes (review round 3). In Grid, and with the setting off, Super+scroll still reaches the client and still ends in a Super tap, as before phase 4. Since 2026-11-03 a Super tap after any scroll or pinch with Super held (LogoTap::gesture: one that reached a client, or that a camera animation, the overview or a missing lease dropped) still focuses the chat but makes no fit of every window.
Keyboard
| Keys | In Canvas | In Grid (unchanged) |
|---|---|---|
| Super tap | Since the Super mode (2026-11-04): fits all windows of the workspace of the focus output, at most at zoom 1 and above the box, and shows the chat as the box, focused; a second tap on that box hides it and returns the camera from the fit all, or after an Alt+scroll step centers the focused window at the zoom before the tap; a tap on a held chat keeps it whole. With the workspace overview open it makes no fit and the core closes the overview. Not after a Super+scroll or pinch (see Scroll and touchpad). History: from 2026-11-02 it showed and focused a hidden chat and hid a shown chat, and from 2026-11-03 it also ran the fit all of Super+Shift+F. | Recenters the camera and shows the box (the old "no fit" text was wrong: the code recentered) |
| Super+N | A new conversation (new_chat request; since 2026-11-04, replaces the host key Ctrl+Shift+N) |
Same |
| Alt+scroll | Steps the focus to the next (down) or previous (up) canvas window in spatial order, left edge then top edge; the camera centers on it at the same zoom. The compositor swallows the axis. Since 2026-11-04. | Nothing (the axis reaches the client) |
| Super+S | Opens the overview. The parallel task owns this binding. | Same |
| Super+F | Fits the focused window. A second press on the same target restores the previous camera. | Grid zoom |
| Super+Shift+F | Removed on 2026-11-04: the Super tap is the fit all, and the key reaches the client. History: it fitted all windows. | Free |
| Super+Equal, Super+Minus | Zoom x1.25 or /1.25 about the viewport center; Super+Equal stops at zoom 1 and does nothing at zoom 1 or above | Free |
| Super+Ctrl+0 | Zoom 1:1 at the focused window. Super+0 stays the workspace 10 key (input.rs:157-163, 351-357). | Free |
| Super+Alt+arrows | Focus the nearest window center in that direction, then fit it | Cell focus |
| Super+Ctrl+arrows | Move the focused window by 64 canvas px | Cell move |
| Super+G | Arrange: since 2026-11-03 a near-square grid (ceil(sqrt(n)) columns) in reading order (bands of half the median height, then left to right), each cell as wide as the widest window of its column and as tall as the tallest of its row, each window centered in its cell at its real size, with a 32 px gap, from the top left of the windows. Before it was one line left to right, top-aligned; that is history. Held windows are skipped. Since 2026-11-03 the protected "Organizar janelas" button of the bottom bar runs the same row and then fits all (see below). |
Fill Since 2026-11-04 the camera readjusts after a row that moved windows (the user: "quando tiver com foco em uma janela e a gente reorganizar o desktop a camera deve se reajustar"): a fit target stays the target at its new place unless the keys are on another canvas window (then the fit ends and the camera stays), a fit of every window fits again, and on Super+G and its Actions counterpart, with no fit, the focused window that showed keeps its place on the screen and the row happens around it. An agent row with no fit target keeps the camera and can still move the keys away. |
| Super+Ctrl+Alt+arrows | Nothing | Cell resize |
| Super+T | Toggles Canvas and Focus | Toggles Grid and Focus |
| Super+Shift+T | Switches the workspace to Grid. | Switches the workspace to Canvas when the setting canvas is on. In Focus it also switches to Canvas. |
| Escape during an animation | Stops at the current camera | Not applicable |
Super+Shift+T is the one path between Grid and Canvas. Super+T keeps its meaning: it toggles Focus and the base layout of the workspace. Super+Shift+T is free today, because grid_shortcut returns None for every other Shift key (input.rs:150).
Today Super+T cannot return to Canvas. toggle_grid_layout sets layout = if layout == Grid { Focus } else { Grid } (desktop/tiling.rs:675-697). From Canvas it goes to Grid, and from Focus it always goes to Grid. So Super+Shift+T sets Workspace.base, and toggle_grid_layout toggles between base and Focus.
Keyboard focus follows the focused window at any zoom. A fit target takes keyboard focus.
Snapping rules
All snaps change only the camera. No snap sends an xdg configure.
- Fit window ("tela cheia").
- The target is
window.geometry(), without the CSD shadow. zoom = min(fit.w / win.w, fit.h / win.h, 2.0), and the camera centers on the window. As built in phase 4:fitis the fit viewport, the content area right of the chat dock with a 12 px margin on each side, and the window center goes to the center of that viewport, so the dock never covers the window. Correction of 2026-11-02 (the user: "as janelas ficaram meio blurred"): a fit zoom within the settle band of 1 (SETTLE_ZOOM) is zoom 1 when the window still shows whole in the content area at 1:1. A window as large as the content area (1920 x 1008 under the 32 px bar) drew at 984 / 1008 = 0.976 because of the 12 px margin, so every frame was resampled and blurred; it now fills the content area at 1:1. A window larger than the content area still zooms out.- When the aspect ratios differ, the strips around the window show the wallpaper or neighbor windows.
- The fit sets
camera.targetand savescamera.previous.
- The target is
- Sticky target. The camera fits the target again when the target resizes itself, the chat collapses or expands, or the output mode changes. A manual pan or zoom clears the target. As built in phase 4: the refit runs when the client size of the target or the content area changes. As built in phase 5: it runs when the fit viewport changes, so a collapse, an expand and a side change of the chat refit at once, with no animation (since 2026-11-02 the chat takes no part of the fit viewport, so it refits nothing). A user move or resize of the target, and Escape or a lock during an animation, also clear it. Fit all is no sticky target; the snapshot reports its target as null.
- Fit all. A Super tap (since 2026-11-04; Super+Shift+F before), the action "Enquadrar tudo" or a double click on empty canvas starts it. The camera fits the union of all non-minimized canvas rectangles plus a 48 px screen margin, with the zoom clamped to the range. The fit of a tap also stops at zoom 1 and excludes the box rectangle (super-mode.md, The tap).
- Magnetic settle. When a pan or zoom gesture ends, the camera checks the window under the viewport center. As built in phase 4: the topmost canvas window under the center of the fit viewport. The gesture ends at the release of a drag pan, at the end of a pinch that is not cancelled, and at the stop of a two-finger scroll. A wheel Super+scroll has no end, so it does not settle. A settle to the fit makes the window the target and gives it the keyboard.
- If
|ln(zoom / fitZoom)| < 0.08, and the center is within 48 screen px of the fit center, the camera animates to the fit. - The same check snaps to zoom 1.0 at that window.
- Shift held at release disables the settle.
- If
- Tiles of a dropped window (since 2026-11-11; it replaces the edge snap). The owner asked: "mover as janelas dentro da visão deve tentar fazer snapping em grid/tilling". In the question round of 2026-11-11 the owner chose: the view is the visible area of the camera, the snap is tiling with a new size, the tiles are halves and quarters, and no drag leaves a canvas window at a free position.
- The visible area is the fit viewport of the view of the window (
fit_viewport_in: the content area with its 12 px margins, beside the whole chat when it shows; through the lens, the flat visible area). - The pointer picks the tile (
canvas::tile_at): the left or the right third of the area takes that half, and a quarter in the top or bottom quarter of the third (the corners); the middle third, its top too, takes the whole area. A pointer outside the area counts at its nearest point, so every drop takes a tile. - Halves and quarters keep a 12 px gap between them (
canvas::TILE_GAP,canvas::tile_rect). - The canvas rectangle is the tile at the zoom of the view (
canvas::tile_canvas): a tile of the screen issize / zoomcanvas units. The size stays within the client minimum and maximum and the 100% monitor cap of a pointer resize (canvas_size_limit); a window that the cap makes smaller is centered in its tile, and a client minimum larger than the tile keeps the outer edge of the tile (a right or bottom tile grows inward, a left or top one from the tile origin). The cap is the one of the output of the view whose camera the tile took. As in a pointer resize, the size never passes the canvas bound (2 * BOUND), whatever minimum the client asks, and the placement saturates before the clamp to the bound (canvas::tile_place), so a client minimum ofi32::MAXcannot overflow. Through the lens the pointer counts at its flat point. The drop sends the size, as the protected size presets do, clears the resize edge, the fit target and the Grid desired rectangle, and keeps the parking anchor and the camera. - During the drag the window follows the pointer in canvas units, and the outline of the Grid drag (
grid_outline) shows the tile of the drop. A press and release inside the 4 px dead zone tiles nothing. A move that ends without a drop (a lock, the overview, a transition, a layout switch, the end of the lease) puts the window back at its canvas location of the press (canvas_move_back). - Not changed: the Super+right resize, the agent
window_action moveandarrange_windows row, Super+G, the Grid drag (openspec/specs/tiling-spec/spec.md, D5) and the drag of a window of another layout. - Tests:
a_canvas_move_drop_takes_a_half_a_quarter_or_the_whole_visible_areaanda_canvas_tile_respects_the_client_minimum_and_a_lock_puts_a_move_backin native/smithay/src/canvas_tests.rs, anda_dropped_window_takes_a_half_a_quarter_or_the_whole_visible_areain native/smithay/src/canvas.rs. - History (2026-11-01 to 2026-11-11): during a user move the window edges snapped to neighbor edges and to a 16 px gap from them, within 12 screen px (
12 / zoomcanvas units); Shift turned it off; the jump was the feedback, with no drawn guide.
- The visible area is the fit viewport of the view of the window (
- Camera clamp. The camera keeps at least one window, or the canvas origin, within one viewport of the screen. A lost camera then cannot drift into empty space. The same clamp runs after a restore on a smaller monitor. As built in phase 4: the camera center stays within 1.5 viewports, in canvas units at the current zoom, of some window rectangle on each axis, and it moves the least that it must. User gestures and the camera keys run it; the
camera setcommand of the core does not, because it is an exact position. - Client requests in Canvas. Note of 2026-11-12 (history kept apart): the three bullets below on the maximize (no Maximized state, the fit toggle, the
unset_maximized) describe phase 6 and no longer hold for a client request of a canvas window with the keyboard; see the Binding contract.- The compositor sends no Maximized state and no size. So the client always sends
set_maximized, andunset_maximizeddoes not come. set_maximizedalone toggles the fit. It fits the window when the window is not the camera target. It restores the previous camera when it is. As built in phase 6 (review round 1): the toggle lives inapp_maximize_request, which sends Restore for the fit target;Command::Maximizefrom the control socket (the agentexpand, the session replay) only fits, so a retry keeps the fit.- An
unset_maximizedthat comes anyway restores the previous camera when the window is the target. Otherwise it does nothing. - The keyboard rule of
app_maximize_requeststays (xdg_shell.rs:200-230). app_maximize_requestonly sendsCommand::MaximizeorCommand::Restore. Both go toDesktop::set_app_maximized(desktop.rs:1596). Outside Grid, that function callsWorkspace::set_app_maximized, which setsself.layout = Layout::Focus(desktop.rs:232-240).- Three other callers use the same path: the agent
expand(desktop.js:486-488 sendsmaximize),window_action restoreand un-minimize (desktop.js:483-484), and the session replay ofmaximized(window-session.js:339-342). - So the Canvas rule lives in
Desktop::set_app_maximizedandWorkspace::set_app_maximized, not in xdg_shell only. In Canvas, a client Maximize applies the fit toggle above, and the control command keeps a fit. Restore un-minimizes the window and restores the previous camera. Neither one changeslayout. - History (phase 6, until 2026-11-12): a fullscreen request collapsed the chat (hid it since 2026-11-02) and fit the window; the configure echoed the current size with no Fullscreen state, so the client asked again to leave and a request of the fit target returned the camera, as Maximize does. The owner then asked for real full screen ("Sim, tela cheia real", 2026-11-12) and this behavior ended.
- Real full screen (2026-11-12,
native/smithay/src/desktop/fullscreen.rs, openspec/changes/archive/2026-11-12-canvas-real-fullscreen/design.md): a fullscreen request of the canvas window with the keyboard, within 5 s of the last user input, gives the window the Fullscreen state and the logical size of one output and draws it over that output (see the Binding contract). The camera and the chat do not change, andmeta.canvaskeeps the old rectangle the whole time, so the leave puts the window back on it.
- The compositor sends no Maximized state and no size. So the client always sends
Animation
- Snaps, fits and keyboard zoom animate for 300 ms with the easing
cubic-bezier(.22,1,.36,1). This matches vendor/interface/host/workspace-zoom.js:2 and :91-92. Since 2026-11-10 these are the defaults of the motion timing that the core can send (motion-timing.md); each flight keeps the timing it started with. - The zoom interpolates in log space, and the center interpolates linearly.
- Direct gestures (drag, scroll, pinch) follow the input with no animation and no inertia.
- Reduced motion makes every animation instant (workspace-zoom.js:12). The host passes the preference as one typed compositor setting. As built in phase 4: that setting is the existing
workspace_motion, which the host sends asenabled = !prefers-reduced-motion. Until the host reports motion, the camera moves at once. A key during an animation starts from where the animation goes. - During an animation,
surface_underreturns None, aspointer_animation_activedoes today (native/smithay/src/thumbnail_motion.rs:109). Input resumes at the final transform. - A lock stops the animation at once.
- As built in phase 4 (review round 1): a held pointer button moves the camera at once, with no animation, so the release of that button still reaches the client or the move grab that has it. The release of a drag pan or of a double click counts as delivered, so its settle or fit animates. Opening the workspace overview ends an animation at its target first.
- As built in phase 4 (review round 2): while a drag pan or a window move or resize holds the pointer, the camera keys (Super+F in Canvas, Super+Equal, Super+Minus, Super+Ctrl+0, and Super+Shift+F until its removal on 2026-11-04) change nothing, because each grab keeps data from the camera at its press. The click grab of a client does not block them; as built in review round 4, a press on a canvas window starts the click grab of click_grab.rs at every zoom, also at 1, so a client press follows the window when a camera key moves it. An explicit focus during an animation tests the window at the camera where the animation ends. The sticky refit fits the canvas rectangle, so a size that is in flight (the return from Focus) does not move the camera. A workspace switch ends the click record of a double click and a running pinch.
- As built in phase 4 (review round 3): Super+F is the camera fit only when the keyboard is on a canvas window of the active Canvas workspace; on a window of an extra output it stays the grid zoom of that output. The other camera keys act on the primary camera wherever the keyboard is. The snapshot reports
camera.targetnull for a target window that closed, was minimized or left the canvas while its workspace is not active; the layout pass clears the stored target when the workspace is active again. Review round 4: the snapshot keeps the target while the workspace is in Focus over its Canvas base, because the compositor keeps it for the return to Canvas.
Lock
- While locked, the lock UI owns every key (input.rs:309-317). Swipe gestures are gated at input.rs:511-514.
- Pinch and axis events have no lock gate today. The new
GesturePinch*handling and the Super+scroll zoom add their own lock gate. A locked session never changes the camera. - No camera command is in
allowed_while_locked(desktop.rs:176-189). The refusal test there gets the new command names. The one exception iscanvas_enabled, which only renews thecanvaslease (see Migration and rollback). - The scene draws only the lock, so no canvas pixels show. The camera keeps its value across the lock.
Workspaces, overview and multiple outputs
Workspaces
- Each conversation workspace keeps its own canvas, camera and chat state.
- Super+1..0, Super+Left/Right, Super+Shift+scroll, the bottom bar tabs and the three-finger swipe still switch workspaces.
- The slide and depth transitions take each plane's windows from
canvas_to_screen, with that workspace's camera. They do not useelement_locationplus an x offset (scene.rs:845-970). - The workspace bindings in workspace-windows.json do not change (web-shell/core/workspaces.js:5-30).
The workspace overview
- Super+S opens the overview. The overview stays a web card list in the protected host: the
<dialog id=workspace-overview>with the Workspaces presentation (web-shell/host/host.js:932-1063). - Canvas windows stay hidden in the overview, as
visible_windowhides them today (desktop.rs:1036-1070). - The overview never gets a drag between cards.
Overview performance (phase 2, independent of the canvas)
- The protected host reports the screen rectangle of each card image slot through a protected route, as the bar glass reports its pill.
- The core sends typed rectangles to the compositor.
- The compositor renders each workspace plane into a cached offscreen texture. As delivered, the texture has the fixed size of the PNG preview (384 x 216) and is drawn scaled into the card, and it reuses the scene of the PNG preview (
scene::workspace_elements), not workspace_depth.rs. - The compositor draws that texture into the card rectangle, behind a transparent hole in the host page.
With this path there is no readback, no file, no deflate, no base64 and no polling.
- Planes of other workspaces refresh at most 10 times per second.
- Only cards inside the dialog viewport render, and the card set is capped at 12.
- The compositor reports the capability
overviewPlanes. Without it, or with the settingoverviewPlanesoff, the PNG path takes over. - A card click selects the workspace, and the existing zoom animation runs. Until the zoom animation uses the live texture, the PNG path stays as its fallback.
The "Organizar janelas" button
Added on 2026-11-03 at the request of the user ("podia ter um botão para reorganizar as janelas automaticamente"). The bottom bar shows the button only while the active workspace of the primary output is in Canvas and the compositor reports capabilities.canvasOrganize. A press calls the protected host route POST /api/canvas-organize (shell token, body {}), and the core sends the compositor command canvas_organize {held}: the arrange row of Super+G on that workspace, held windows skipped, then the camera fits all its windows. Unlike the fit all of a Super tap or of "Enquadrar tudo" it never returns to the camera before the fit, so a second press keeps the fit. It is refused while locked, in the overview, during a transition and outside Canvas, before the row moves anything, and while a pointer grab holds the camera. No agent tool, MCP entry, scheduled turn, generated HTML or isolated plugin panel reaches the route or the command. Since 2026-11-03 the arrange is the grid of Super+G, so many windows no longer make one long line. Tests: canvas_organize_arranges_the_row_and_fits_all_without_a_toggle in native/smithay/src/canvas_agent_tests.rs and the core and bar tests in web-shell/test.
Automatic organize in Canvas (2026-11-12)
Owner, 2026-11-12: "A organizacao das janelas tambem deveria acontecer automaticamente reagindo a uma mudanca de proporcao ou surgimento/remocao de uma janela". A Canvas workspace now runs "Organizar janelas" by itself, as a compositor reaction (native/smithay/src/desktop/auto_organize.rs; design in openspec/changes/archive/2026-11-12-canvas-screen-tiles/design.md, decisions 4 to 6). The button and /api/canvas-organize stay as the manual organize, and no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the automatic one.
- Triggers (observed every frame, not hooked into each path): the set of application windows of a workspace changes (a window gets its first size, closes, or moves to another workspace or output; a dialog, the chat, a shell window and a window with no size yet count for nothing, and a minimize is no trigger); the core replays a rectangle (
canvas_restore, so the login restore ends organized); the content area of an output that shows the workspace changes size, with 500 ms of quiet after the last change, so a hotplug, a display wake or a reserved zone flicker give one run. A size preset, a drop, a maximize, a full screen, a layout switch and a user move are no trigger. A Grid workspace, or one with thecanvaslease off, does nothing. - Readiness: a pending workspace waits while the session is locked, in the overview, during a transition or thumbnail motion, while a pointer button, a pan or a window grab is held, while a window of it is in real full screen, while it shows on no output and while one of its windows has no canvas rectangle yet. A workspace that left Canvas or has no window leaves the pending set. An open tile assist on the workspace does not make it wait (owner, 2026-11-13, "Organizar fecha o assist"): when the run is due and ready, the assist closes as a dismiss and the organize runs at once. Before 2026-11-13 the workspace waited for the assist.
- Cost: the frame that observes the triggers allocates nothing while idle (windows compared against the remembered set in place, views in a reused buffer). Camera flights: a tile operation or an organize fit on one view lands the running flight of another view at its goal (
fly), so no camera stays short of its fit. - Effect (
RowBy::Auto): the row of every application window, a maximized one included at its size (the row only moves it: it keeps its Maximized state and rectangle size, so nothing overlaps); when the area of an output changed, each maximized window first takes the new Full tile at its pixel size, and the view that fitted it goes back to zoom 1 over it; then each view follows. A view whose fit target is one window (Super+F, the agent fit afteropen_application) stays on that window at its new place (follow_row); every other view fits all at zoom 1 at most (fit_all_at_most_one, above the box while the chat is the box), also when the row moved nothing, because the area may have changed. A fit that is the goal already changes no camera, so a second run is a no-op. Half and quarter tiles keep no state: the next automatic organize arranges them in the row at their size (intended, by the owner's choice of "Organizar janelas automatico"). - Tests: native/smithay/src/auto_organize_tests.rs.
A click on a workspace (2026-11-06)
The user: "clicar no workspace deveria fazer o zoom out nele para mostrar todos os apps". A click on a workspace in a protected bar (a tab of the bottom bar, a dot of the top bar) selects it and zooms its camera out to show every window, in the rule of the Super tap: at zoom 1 at most, so a small window is not enlarged, above the box while the box shows and beside the column while the whole chat shows. It differs from the tap in two things: the command changes no chat state, and a second click keeps the fit and does not return the camera. The press on the bar still follows Click outside, so it hides a whole chat that nothing holds before the fit, and the box stays. No window moves. A Grid recenters its camera, a workspace with no window keeps its camera, and the focus layout has no camera to move.
A click on the workspace that the bar already shows moves only the camera, so it is not a selection and gives no window the keyboard. Under the live workspace_outputs lease a click on another tab of the primary bar during a response also selects it (openspec/changes/super-mode/design.md, Phase 3). The login restore owns the cameras, so the host sends nothing during it. A selection that the core refuses moves no camera. Super+1..0, Super+Left/Right, the wheel, the swipe and a card of the workspace overview keep the camera as it was: they are for walking through workspaces, and the card already expands its own preview.
The host calls POST /api/workspace-show-all {workspace, output?} (shell token, exact keys), and the core sends the compositor command workspace_show_all only on a compositor with capabilities.workspaceShowAll; without it the click selects as before. The command names the workspace, so a click never moves the camera of another one: Workspace is not shown refuses when the output no longer shows it. A bar names its output when that output shows the workspace. With no output it takes the view of the focus output, or the lead view when that output shows another workspace. It runs during the slide of a selection, unlike the tap, so the workspace arrives zoomed out. The overview, the lock and a pointer grab that holds the camera refuse it, and the host stays silent about a refused fit. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the route or the command.
The window overview inside one workspace
The fit all (a Super tap since 2026-11-04, Super+Shift+F before), or a double click on empty canvas, is a live zoom-out of the real windows. It needs no preview image. A click on a window drawn below the input threshold fits that window, as the thumbnail click rule does today (input.rs:619-650).
Two monitors
Since 2026-11-04 a Super+scroll zoom out follows the pointer only while the pointer is on that output; a view that the pointer left eases back to its framing of the windows, and follows again when the pointer returns.
- Without a live
workspace_outputslease (the compositor lease that the core renews on a supporting compositor, not a setting; the settingworkspaceOutputswas removed on 2026-11-03), the canvas and the chat exist only on the primary output, and extra outputs keep their static shared grids on every workspace (openspec/specs/tiling-spec/spec.md:183-201). Pinch and Super+scroll on an extra output do nothing to the camera. - Since phase 3 of openspec/specs/multi-output-workspaces/spec.md (W9,
capabilities.outputCanvas), under a live lease a Canvas workspace can show on an extra output with its own camera and its output chat as the floating chat. The camera projects into that output, the fit viewport is the whole output with the 12 px margin, and pinch, Super+scroll, the pan and the double click act on the Canvas workspace of the output under the pointer.chat_docktakes an optionaloutput. See that document, section Layouts on an extra output. - Canvas windows are cropped to the canvas content area of their workspace (the primary content area, or the whole extra output), so they never draw under the bars or onto another output.
window_action send_to_outputmoves a canvas window to an extra grid and saves its canvas rectangle. A move back places the window at that rectangle, or at a free spot near the camera center.
Agent tools and persistence
Agent tools
These tools are for the authenticated agent only (web-shell/core/desktop.js). Generated HTML gets none of them.
desktop_state:- It does not pass compositor fields through today.
snapshot()reportslayoutonly from a fixed list without "canvas" (desktop.js:333-337), so a Canvas workspace reportslayout: undefined.safeWindowcopies only listed keys, and it has nopresentation(desktop.js:168-212). snapshot()adds "canvas" to its layout list. It adds a top-levelcanvasWorkspaceslist withcamera {x, y, zoom, target}andchatDock {side, state}per workspace.safeWindowaddscanvas {x, y, width, height}andpresentation, the projected screen rectangle, with bounds checks. Thepresentationscale can be above 1, up to 2.0.- For a canvas window, snapshot.rs reports
xandyas the projected screen origin, not the parking anchor (snapshot.rs:26, 84-85). - The
desktop_statedescription (desktop.js:58) explains the new fields. - The camera and dock fields stay outside the
workspaceLayoutsitems, which keep exactly the keyslayout,workspace. - The new core's
validStateaccepts these values (see Extension points). An older core ignores the per-windowcanvasfield andcanvasWorkspaces, because itsvalidStatehas no key check for windows or for the top level (smithay.js:48-260). It disconnects only on a "canvas" layout (smithay.js:56, 134) or a presentation scale above 1 (smithay.js:168).
- It does not pass compositor fields through today.
window_action:- It adds
move {x, y}, in canvas units, bounded.moverefuses held windows and shell windows. - It adds
fit. - In Canvas,
expandmeansfit. It still sendsmaximize, and the Canvas branch ofDesktop::set_app_maximizedmakes it a fit, so the workspace stays in Canvas.restorekeeps the workspace in Canvas too. - As built in phase 7: on a window of the active Canvas workspace,
expandsends the agentcanvas_fit, notmaximize, so the agent limits apply to it too. The phase 6maximizestays for a compositor withoutcapabilities.canvasToolsand for Focus over a Canvas base. In the overview over a Canvas baseexpandreturnscanvas_layout_only(review round 4). - As built in phase 7:
moveandfitneed a window of the active Canvas workspace on the primary output; anything else returnscanvas_layout_only. The grid actions returngrid_layout_onlyfor an application window of a workspace with a Canvas base, also in Focus over it. place(cells),fill_gridandtoggle_floatingreturn the typed refusalgrid_layout_only.
- It adds
arrange_windows: it adds the layoutrow, which skips held windows through the exclude list.gridandtilereturngrid_layout_onlyin Canvas.- As built in phase 7:
gridandtilereturngrid_layout_onlywhile the active workspace has a Canvas base (also in Focus or the overview over it), with or without a held window. This replaces the phase 3 rule, where the agent arrangement turned a Canvas workspace into Grid when no held window was on it. Only the user switches the layout (Super+Shift+T).
- As built in phase 7:
open_application: the schema addsfitto theplacementenum, andplacementstays required (desktop.js:75-78, 417-418).- In a Canvas workspace, every placement value gives the window a free spot, and the camera fits it.
- Outside Canvas,
fitreturns the typed refusalcanvas_layout_only.
Limits on the agent's camera control:
- The agent can only request
fit. It has no free pan or zoom. fitis refused for a held window, during a user grab or gesture, and within 2 s after the last user input.- The compositor keeps the time of the last keyboard, pointer, touch or gesture event. It refuses an agent
fitinside that window with the typed refusaluser_active. - The refusal lives in the compositor, so it has no race with the core. The snapshot reports
lastInputMsfor diagnosis.
- The compositor keeps the time of the last keyboard, pointer, touch or gesture event. It refuses an agent
- The compositor cannot tell an agent
fitfrom a corefit, because both come from the same authenticated control connection. So thecamera fitcommand takes a typed fieldsource: "agent", and only the agent tool path in desktop.js sets it.- As built in phase 7: the fit of one window is its own command,
canvas_fit {window_id, source?}, so thecameracommand keeps its shape. It is refused for a shell window, a dialog, a hidden window, outside the active Canvas workspace, during a pointer grab of the camera and while locked. The saved camera of the restore iscamera {op: restore, x, y, zoom}, with the clamp. The core sends these commands only when the compositor reportscapabilities.canvasTools. - The
user_activerefusal and the rate limit apply only to that source. - As built after the security review of b0ef5ae: the agent
window_action focus,expandandrestorealso move the keyboard and can move the camera (a focus or a restore centers it on a canvas window outside the view, a maximize fits it, a restore of the fit target returns it). The core sends them asagent_window {op: focus|maximize|restore, window_id}when the compositor reportscapabilities.agentWindow. On a Canvas workspace (also in the overview over it), for an application window of the primary output or a dialog of one, the compositor gives that command the limits of an agent fit: refused for a held window or the held window of the dialog,user_active, andrate_limited, shared withcanvas_fit(one of these agent actions every 2 s). A refused one does not count. Elsewhere, and for the chat, it is the plain command. On a Canvas workspace (also in the overview over it, byworkspaceLayouts) the core refusesfocusandrestore, andexpandwithout the canvas tools, on a compositor withoutagentWindow, with "no agent window limits", because the plain commands there would move the camera with no limit. In Focus over a Canvas base they stay the plain commands: no camera moves there. The limits apply also to a window that already shows, because the keyboard moves. Anexpandon a Canvas workspace that is not the agent fit (a window without a canvas rectangle yet) sends only the maximize, which gives the keyboard itself. The focus of the bar window list and the other host paths keep the plainfocus, with no limits. Accepted exceptions with no agent limits:minimize,moveandarrange_windows rowmove no camera, but when the window that holds the keyboard leaves the view or hides, the keys go to another window that shows (repair_focus), as in Grid; the agent cannot pick that window.open_applicationon a Canvas workspace keeps the plain focus and the fit with nosource(next item): a new window takes the keyboard and the camera, also during user input. - The core fits of
placeApplicationand of the login restore send nosource. So user input during a restore or a user-started open does not fail the open.
- As built in phase 7: the fit of one window is its own command,
- Agent fits are rate-limited to one per 2 s, together with the agent focus, expand and restore on a canvas.
- Every action is refused while locked.
- The agent cannot change the chat state.
geometryConfirmed for a canvas window compares the desired canvas rectangle and the acknowledged size, not element_location.
As built in phase 7: a canvas window has no desired rectangle, so geometryConfirmed is true when its client size is not empty and no size configure is in flight: the pending size is none, or it equals the size that the client acknowledged and then committed. A canvas_restore makes it false until that commit.
That change alone is not sufficient. placeApplication (smithay.js:562-597) takes the confirm path only for tile in Grid or Focus. Otherwise super.placeApplication writes layout tile or pair (desktop-client.js:397-402), which leaves Canvas.
So smithay.js placeApplication gets a Canvas branch. When requestedLayout is "canvas", it sends the canvas placement and the fit, then waits for visible, focused and geometryConfirmed. It never writes a layout command.
Persistence
window-session.json stays at record version 1. An older core throws away a record with any other version (window-session.js:71).
- Per window, add an optional
canvas {x, y, width, height}, as bounded integers. - At the top level, add an optional
canvasWorkspaces: [{workspace, camera {x, y, zoom}, chatDock {side, state}}]. - Never write "canvas" into
workspaceLayouts. An older core drops the whole list on one unknown value (window-session.js:35-50). For a Canvas workspace,workspaceLayoutskeeps "grid", and the window keeps the cells of its last grid placement, if it has any. - The snapshot reports "canvas", so the new core's
observe()maps it to "grid" inworkspaceLayoutsand in the top-levellayout. It takes the canvas data fromcanvasWorkspaces. - An older core and the known-good fallback ignore the new fields at
load(), because it checks only its listed properties. They restore those workspaces as Grid. - Their
observe()rebuilds the record with only their own fields (window-session.js:355-375). So their first save erasescanvasandcanvasWorkspaces. - A rollback to an older core, or a run of the known-good fallback, therefore loses the canvas rectangles and cameras. The windows come back from their cells, or as Grid.
- In the new core, a malformed canvas field drops only that field, as the cells rule does.
- An entry in
canvasWorkspacesmeans that the base layout of that workspace is Canvas, whateverworkspaceLayoutssays. So a workspace in Focus over a Canvas base saves "focus" inworkspaceLayoutsand keeps itscanvasWorkspacesentry. - The restore order is:
- Show the workspace.
- Set the layout.
savedLayoutreads onlyworkspaceLayouts, which says "grid" for a Canvas workspace (window-session.js:198-210). SosavedLayoutreturns "canvas" when the workspace has acanvasWorkspacesentry and the compositor reports thecanvascapability with the lease active.restoreLayoutrefuses a layout outsiderestorableLayouts(window-session.js:9, 216-232), so the new core adds "canvas" to that list. - Open and bind the windows (window-session.js:311-327). Each one gets the fit viewport size at open, because
new_toplevelruns before the bind (xdg_shell.rs:25-46). - Right after the
bindat window-session.js:322-327, sendcanvas_restore {window_id, x, y, width, height}for that window. It sets the canvas rectangle and sends the saved size as a second configure. - Wait for
geometryConfirmed, with the same timeout as cells. - Replay
minimizedandmaximized(window-session.js:333-346). In Canvas, the replayedmaximizegoes through the Canvas branch ofDesktop::set_app_maximized, so it is a fit and the workspace stays in Canvas. - Set the camera with no animation, then run the camera clamp.
As built in phase 7:
- A workspace with a
canvasWorkspacesentry restores as Canvas also whenworkspaceLayoutssays "focus": the base comes back, not the Focus over it. - The camera and the dock commands act on the active workspace. So the restore sends each of them only while the workspace of the restore is still the active one and in Canvas: a switch by the user, or Super+Shift+T, during the opens skips them, and the camera and the dock of the other workspace stay (review round 2).
- After the camera, a collapsed chat dock is collapsed again (
chat_dock; since 2026-11-02 collapsed means hidden, and a new canvas already starts hidden). The dock side is one protected setting for all workspaces, so the restore does not send it. - A held window gets no
canvas_restoreand keeps the spot that the canvas chose. A refusedcanvas_restoredoes not stop the restore. The status records the refusal, so the phase of the restore ispartial(review round 4). - The restore sends no
placeon a canvas: the windows take their rectangles, not cells. - The wait for
geometryConfirmedis 10 s for each window, as for an open. A lost connection ends the restore. - When the setting is on and the record has a
canvasWorkspacesentry, the restore first waits up to 5 s for the lease of the new connection (canvasEnabledin the snapshot). The core renews the lease after its first workspace command, so the firstobservecan come before it. Without the wait, the restore found no lease and restored the workspace as Grid (nested QA finding). A lease that does not come in 5 s gives Grid. - A camera or rectangle change alone, as in a pan or a move, is saved at most once a second. Any other change saves at once, with the canvas fields of that moment, and the core writes a waiting change when it closes. A new canvas base (Super+Shift+T from Grid) and a collapse, expand or side change of the chat dock are other changes: the key of the delay keeps the workspace and the dock of each
canvasWorkspacesentry and leaves out only the camera and the window rectangles (review round 2). A change that waits is lost when the core ends without close() within that second (a SIGKILL or a crash). When a new compositor connects within that second while the core runs (a compositor restart), the restore takes the change that waits, not the older saved record (review round 3).
The compositor snapshot reports the layout "canvas". An older core disconnects while any workspace reports "canvas", or while any presentation scale is above 1 (smithay.js:45, 56, 124-137, 164-172).
So an older core cannot run beside an active canvas. The canvas lease in Migration and rollback keeps that state short, and the rollback order is required, not optional.
Compositor integration
Render
presentations()(state.rs:412-566) callscanvas_to_screenfor the canvas windows of the active workspace (layers 1 and 2) and for their dialogs. The scene, hit tests, snapshot, planes, previews and capture all read that Placement.- Canvas windows outside the camera viewport are culled.
place_elementalready draws any scale (scene.rs:473-484). Canvas needs no new render element type.- The crop of canvas windows and their popups becomes the primary content area (scene.rs:425-470). Menus can then extend past their parent window, but never under the bars. As built: phase 3 crops the window to the content area, and phase 6 lets its popups draw past it there in the live scene (
render_window_in). Previews and planes still crop a popup to its window. - The window finish radius takes the Placement scale, but it stops at 12 px above zoom 1 (scene.rs:459-461). Canvas keeps that cap.
- Theme effects do not apply to canvas windows. They run only for overview placements of 320 x 200 or smaller (scene.rs:93-97), for
EffectTarget::OverviewF9(effect_pipeline.rs:628, deleted with the GLES scene at step 8). - QA confirms corners and shadows at zoom 0.5, 1 and 1.5, and confirms that no theme effect draws on a canvas window.
- Damage: a camera move damages the whole camera viewport on each frame. A still camera keeps today's per-surface damage.
- Frame callbacks keep today's rule. A throttle for off-screen windows stays an open item, because a throttle can stall clients that wait for a callback.
The canvas lens: with the protected setting canvasWarp (off by default), the Canvas workspace of the primary output draws through a cylinder warp. The canvas rules of this file stay in flat space; the lens changes what shows and where a press lands. See the inverted sphere view, phase 1.
Input mapping
- The window-local point is
p_local = (p_screen - placement.origin) / zoom + geometry.loc. MotionEvent.locationstays in screen space for every target. Sopointer.current_location()andgrab_start_data()stay in screen space too.- For a canvas focus, the compositor passes an f64 focus origin for each event. It is
origin = p_screen - p_local, minus the subsurface offset fromsurface_under. - Smithay computes location minus origin, which gives the correct surface-local point. Without a pointer grab, the origin changes on each event while zoom is not 1.
- During a press, that is not true by itself. A client button press with no grab starts the Smithay implicit
ClickGrab(smithay-0.7.0 src/input/pointer/grab.rs:233-250).ClickGrab::motionsendsself.start_data.focus.clone(), with the fixed origin of the press, and ignores the focus thatpointer_motionpasses (grab.rs:356-365). At zoom other than 1, a text selection or a scrollbar drag inside a canvas window then gets surface-local points that are off by the zoom factor. - So on a button press over a canvas window, the compositor sets its own click grab in place of the default
ClickGrab. On each motion, that grab computes the origin again from the current Placement. It keeps theClickGrabrules for the press focus and for the release of the last button. - For shell windows and extra-output windows, the origin stays the screen origin, as today.
self.pointer_positionstays in screen space. - Move and resize grabs divide the screen delta
event.location - self.start.location(grabs.rs:902) by zoom once. A crossing to the chat or an extra output during a grab makes no jump. - The division is not sufficient, because the grab code reads and writes the Space location. For a canvas window, that location is the parking anchor.
begin_window_grabtakesinitialfromspace.element_location(grabs.rs:777-779).begin_super_grabbuilds the resize-edge rectangle and theGrabStartDataorigin fromelement_location(grabs.rs:845-865). For a canvas window, both takeinitial, the edges and the origin from the projected Placement and fromWindowMeta.canvas.drag_windowcallsfloat_windowand thenplace(window, rect)(grabs.rs:579-605). That makes the window Floating (stacking layer 2) and moves its Space location to the moved rectangle. Sodrag_windowgets a Canvas branch: it writesWindowMeta.canvas, does not callfloat_window, and leaves the Space location at the anchor.
- Relative motion, pointer constraints and touch use the same inverse transform.
- Hit tests apply the inverse transform to
pointer.current_location(), which is a screen value. This changes input.rs:644. - The chat rectangle is hit-tested first.
- A gate test greps state.rs, scene.rs, grabs.rs, input.rs and desktop/*.rs. It fails on every direct read of
element_locationthat can get a canvas window, existing or new. An explicit allow list names each read that stays, with its reason.
Extension points
| What changes | Where |
|---|---|
Layout::Canvas (serde lowercase, wire name "canvas") |
Layout, desktop.rs:27-39 |
Workspace.camera and Workspace.base (Grid or Canvas) |
desktop.rs:219-230 |
WindowMeta.canvas |
desktop.rs:255-287 |
New commands camera {fit, fit_all, set, back}, canvas_move, canvas_restore, canvas_arrange, chat_dock, canvas_enabled |
Command, desktop.rs:42-168 |
The canvas lease: the grace timer after the enabling connection closes |
ipc.rs:141-190 (connection close, as lock_connection_closed does). The timer state stays in the compositor next to the LockHost connection id. |
Of the new commands, only canvas_enabled is in the allowed list. It moves no window and only renews the lease, as SetHeld does. |
allowed_while_locked, desktop.rs:176-189, and its test at about desktop.rs:1795 |
Canvas branch: Maximize does a camera fit, Restore un-minimizes the window and restores the previous camera, and neither one changes layout |
Desktop::set_app_maximized, desktop.rs:1596; Workspace::set_app_maximized, desktop.rs:232-240 |
Toggle between Workspace.base and Focus |
toggle_grid_layout, desktop/tiling.rs:675-697 |
| Canvas visibility | visible_window, desktop.rs:1036-1070 |
| Canvas branch, parking anchor, chat dock geometry | apply_layout, desktop/layout.rs:228-575; place, desktop/layout.rs:5-28 (send no size for a canvas move) |
| Chat dock rectangle and fit viewport | desktop/layout.rs:582-615; focus.rs:20-82 |
| Stacking (no change; it is the protection) | stacking_key, native/smithay/src/layers.rs (since window layers phase 1 the key is (band, order) of the declaration, openspec/specs/window-layers/spec.md, and the chat is in the shell band) |
| Canvas projection | presentations, state.rs:412-566 |
| Project dialogs instead of dropping them | clip_dialogs, state.rs:571-611 |
| Inverse transform; drop the scale 1.0 gate at or above the threshold | surface_under_in, state.rs:624-645 |
| Crop to the content area | render_window, scene.rs:425-470 |
| Projected planes | workspace_plane_elements, scene.rs:845-970; workspace_depth.rs:75, 148 |
| Live card planes | scene.rs:974-1108; workspace_preview.rs:22-60 |
| Per-event f64 focus origin; location stays in screen space | pointer_motion, input.rs:232-269; refresh_pointer_focus, input.rs:276-280 |
A compositor click grab in place of the default ClickGrab, with the origin computed again from the current Placement on each motion |
Button handling, input.rs:619-690 |
| Inverse transform in the click hit test | input.rs:644 |
| Screen delta divided by zoom once | Move and resize grabs, grabs.rs:902; client_grab, grabs.rs:805 |
initial, the edges and the start origin from the projected Placement and WindowMeta.canvas |
begin_window_grab, grabs.rs:770-790; begin_super_grab, grabs.rs:845-865 |
Canvas branch: write WindowMeta.canvas, no float_window, the Space location stays at the anchor |
drag_window, grabs.rs:542-612 |
| Pinch handling, with its own lock gate | input.rs:511-524 |
| Threshold rule | Click selection, input.rs:619-650 |
| Super+scroll and empty-canvas scroll, with a lock gate for the zoom | input.rs:698-746 |
| Super+Shift+T and Super+Ctrl+0 | grid_shortcut, input.rs:125-156 |
Last user input time, the user_active refusal and lastInputMs |
state.rs:84; input event handling in input.rs; snapshot.rs:26-89 |
| Chord cancel on axis and gesture | LogoTap::cancel, input.rs:40-42 |
| Canvas bounds in Canvas | clamp_location, grabs.rs:99 |
| Accept canvas placements at or above the threshold | grab_refusal, grabs.rs:370; begin_super_grab, grabs.rs:825 |
Fit viewport size and free spot (the saved size comes later through canvas_restore) |
new_toplevel, xdg_shell.rs:25-46 |
Fit mapping; set_maximized toggles the fit |
app_maximize_request, xdg_shell.rs:154-160, 200-230; a new fullscreen handler |
| Corner radius cap; no theme effects on canvas windows | scene.rs:93-97, 459-461 |
| Positioner unconstrain against the viewport | new_popup, xdg_shell.rs:179-197 |
Canvas fields, canvasWorkspaces, capabilities canvas and overviewPlanes, canvas geometryConfirmed; x and y of a canvas window as the projected screen origin |
snapshot.rs:26-89 |
Accept "canvas", presentation scale up to 2.0, the per-window canvas field and canvasWorkspaces |
validState and layouts, web-shell/core/smithay.js:45-56, 124-137, 164-172 |
| Canvas branch that waits for confirmation and writes no layout command | placeApplication, smithay.js:562-597 |
fit in the placement enum and its check |
web-shell/core/desktop.js:75-78, 417-418 |
"canvas" in the layout list; the canvasWorkspaces list |
snapshot(), desktop.js:322-365 |
canvas and presentation, with bounds checks |
safeWindow, desktop.js:168-212 |
| The new fields in the tool description | desktop_state, desktop.js:58 |
source: "agent" on the agent fit only |
The agent tool path in desktop.js |
Map "canvas" to "grid" in the file; save canvas and canvasWorkspaces; canvas_restore at restore |
web-shell/core/window-session.js:22-52, 355-375 |
savedLayout returns "canvas" for a canvasWorkspaces entry; restoreLayout accepts "canvas" |
window-session.js:9, 198-232 |
canvas_restore right after the bind; the maximized replay as a fit |
window-session.js:283-346 |
Web UI parts
| Part | Web (protected host) | Compositor transform or effect |
|---|---|---|
| Chat, composer, pins | Yes, unchanged | Position of the dock rectangle; glass blur behind it |
| Chat hide and show control (collapse and expand before 2026-11-02) | Super tap (the box), Escape, the chat button of the bottom bar (since 2026-11-04) and the protected route for an approval | None |
Dock side setting ("Lado do chat", shown again since 2026-11-04), canvas setting, threshold setting, overviewPlanes setting |
Protected settings page | Typed settings commands |
| Bars | Yes, unchanged | The existing bar glass |
| Overview cards, labels, badges, card hit tests | Yes | Live plane textures in card holes |
| Canvas windows | No | Scale and translate of the client buffer |
| Camera animation | No | Interpolation of the camera |
| Snap feedback | No guide | The window or camera jumps |
| Future guides or minimap | Protected web panel only (openspec/specs/web-panels/spec.md) | No native drawing |
- No new native UI is allowed. The compositor-drawn grid outline (scene.rs:78-85; openspec/specs/tiling-spec/spec.md:322-324) is a precedent that Canvas does not copy.
- Generated HTML gets no new authority. It cannot pan, zoom, fit, pin, move the chat or change settings.
Performance budget
The target is two outputs at 1920 x 1080 and 60 Hz, on an integrated GPU.
| Case | Budget |
|---|---|
| Still camera, primary output | Render time the same as Grid at 28e15cb, within plus or minus 10 percent |
| Camera animation or gesture, 12 windows visible | Primary output render time at p95 of 8 ms or less; no dropped frame at 60 Hz |
| Fit all, 20 windows | Primary output render time at p95 of 12 ms or less |
| Extra output during a camera move | No added damage; it redraws only on its own damage |
| Blur behind the chat | Its cost is counted in the rows above. If a row fails, the blur is off during motion. |
| Overview open | First imagery within 100 ms; 12 cards or fewer; render time at p95 of 8 ms or less; no CPU readback |
| Other-workspace planes | Refreshed 10 times per second or less, at card size; texture memory 4 MB or less for 12 cards at 384 x 216 RGBA |
| Fractional scale above zoom 1 | Preferred scale sent 300 ms after the camera settles; scale 1 again when zoom is 1 or less, to free buffer memory |
| Downscale below zoom 0.35 | Per-window cache at the drawn size, refreshed 10 times per second or less, with no readback |
| Windows smaller than their buffer | Area filter in window_finish.wgsl (the plain scene of the wgpu renderer; the GLSL window_finish.frag was removed on 2026-11-11), on the live path and in the pass of the cache: up to 4x4 samples per pixel, and one sample while a buffer pixel covers an output pixel or more |
As built in phase 8: the frame-time log is frame_timing (RUST_LOG=frame_timing=info, docs/nested-qa.md), with cache_renders for the downscale cache. The numbers of the nested run are in docs/work-log-2026-11.md.
- Measure with a compositor frame-time log. Add one if none exists.
- Nested QA runs inside the live compositor, so its numbers only point in a direction. The budget check on the real hardware needs the live session (phase 9).
Migration and rollback
Each phase ships behind a setting. With the setting off, behavior equals 28e15cb.
| Phase | Setting | Rollback |
|---|---|---|
| 0, docs | None | Revert the docs commit. |
| 1, input made correct for any transform | None (no visible behavior change) | Revert the commit. No data changes. |
| 2, live overview planes | overviewPlanes, on by default (nested QA on 2026-11-01) |
Turn the setting off, and the PNG path takes over. |
| 3 to 8, canvas | canvas, default off |
Turn the setting off. Each Canvas workspace converts to Grid through sync_grid, and no restart is needed. The new core keeps the canvas data saved. An older core erases it at its first save. |
| 8, sharp zoom | canvasSharpZoom, default off |
Turn the setting off, and buffers are upscaled as before: every surface gets scale 1 and the cache is freed. The two globals stay until the compositor restarts. A compositor without capabilities.canvasSharpZoom gets no command, and an older core never sends one. |
An older core disconnects while any workspace is in Canvas or any presentation scale is above 1. So this rollback order is required:
- Turn
canvasoff. This moves every workspace back to Grid, and every zoom back to 1 or below. - Then roll back the core or the compositor.
openspec/specs/self-maintenance/spec.md records this order. The new core sends canvas commands only when the compositor reports the canvas capability.
The canvas lease covers a fallback that skips step 1:
- The compositor starts with
canvasoff. Only acanvas_enabledcommand turns it on, and only the new core sends it, after each connect. - When the last open connection that sent
canvas_enabledcloses, a 60 s grace timer starts. A newcanvas_enabledwithin that time keeps the canvas, so a core restart moves nothing. A restart that takes longer than 60 s (the supervisor backoff is at most 8 s) loses the canvas: every Canvas workspace converts to Grid. canvas_enabledis allowed while locked. So a core that restarts behind the lock screen renews the lease, and the user does not lose the canvas layout and the cameras.- When the timer ends, the compositor converts every Canvas workspace to Grid by itself. The next retry of an older core then connects.
- A new compositor with an older core never shows a canvas, because the older core never sends
canvas_enabled.
Delivery follows AGENTS.md. Each phase is a branch in a worktree, rebased on origin/main, with the gates run again. Then the publishing session publishes to main and runs scripts/sync-active-checkout.py. A synchronized checkout changes only the next login. Compositor phases take effect only at a new login, not through a host or core restart.
Validation plan
In-process tests (each phase)
- Gates:
npm run format:check,npm run checkandnpm test.python3 -m unittest discover -s scripts/test, in an environment withoutAGENT_NATIVE_*,DISPLAYorWAYLAND_DISPLAY.cargo fmt --checkandprepare-project.py --cargo test --locked --features session.prepare-project.py --cargo clippy --locked --features session --all-targets -- -D warnings.
- Rust tests:
- The projection and its inverse, round trips at zoom 0.1, 0.5, 1.0, 1.5 and 2.0.
- The fit, fit-all and magnetic-settle math.
- The parking anchor for every window width.
- Integer origins at zoom 1.0.
- Edge snap in canvas units.
- The camera clamp.
- Extend
pointer_focus_testsandwindow_grab_testswith synthetic placements at 0.5, 1.0 and 1.5. Cover a cross from a canvas window to the chat and to an extra output. - Test that the new commands except
canvas_enabledare refused while locked, that a lock stops an animation, and that pinch and Super+scroll do nothing while locked. - Test the focus origin at zoom 0.5 and 1.5 with a subsurface. Test that a move grab crossing from a canvas window to the chat has no delta jump.
- Drag with a button held inside a canvas window at zoom 0.5 and 1.5, and check the surface-local delta.
- Test that a move and a resize of a canvas window start from the projected Placement, write
WindowMeta.canvas, keep the window out of Floating and keep the Space location at the anchor. - Test that
Command::MaximizeandCommand::Restorein Canvas change the camera and keeplayoutat Canvas. Test that Super+T toggles Canvas and Focus, and Grid and Focus. - Test the
canvaslease: a re-enable within the grace time keeps Canvas, and the end of the timer converts to Grid. - Test the lease under the lock: lock, close the lease connection, send
canvas_enabledfrom a new connection while locked, wait past 60 s, and check that Canvas stays. Then unlock and check that Canvas still stays. - Test the
user_activerefusal of afitwithsource: "agent"within 2 s after a synthetic input event, and test that afitwith nosourceis accepted. - Run the grep gate test for every direct
element_locationread, with its allow list. - Run a test that the
LogoTapchord is cancelled by Super+scroll and Super with a pinch. - Run a loader test that reads a new canvas record with the 28e15cb
WindowSession.load()andworkspaceLayouts()code. - Run a test that the 28e15cb
validStaterejects a canvas snapshot, and that the newvalidStateaccepts it. This documents why the rollback order is required. - Node tests use synthetic cores from
testEnvironment. Cover thedesktop_statefields,move,fitandrow. Cover thegrid_layout_onlyandcanvas_layout_onlyrefusals, the Canvas branch ofplaceApplication, held-window refusals, the agent rate limit andgeometryConfirmedfor canvas windows. - Node tests also check that
expand,restoreand a replayedmaximizedkeeprequestedLayoutat "canvas", and that a restore with a synthetic input event during the open does not fail the open. - Stop every test core you start. Check with
pgrep -af "core/server.js".
Nested QA runs (scripts/nested-qa.py, one output, no gestures, no provider)
- Phase 1: click, drag and type in Grid, Focus and the Chat presentation. The results must match 28e15cb.
- Phase 2: open the overview with Super+S, then capture. Check the cards for live imagery, and check that no PPM file is written.
- Phase 3:
- Turn
canvason and switch with Super+Shift+T. Check instatethat application windows did not move or resize, and that the chat took the dock rectangle. - Press Super+T twice and check Canvas, then Focus, then Canvas. Press Super+Shift+T and check Grid.
- Drag empty canvas to pan, and check the 4 px dead zone.
- Scroll empty canvas to pan.
- Super+left pans, also on a window, and Super+Alt+left on a window moves it (since 2026-11-02). Super+middle over a window and over the chat pans, and the client gets no button.
- Move a window and check edge snap.
- Read
stateto check the canvas and camera fields.
- Turn
- Phase 4:
- Super+F, then check the zoom and that the window size did not change in
state. - Press Super+F again and check that the previous camera returns.
- A Super tap (Super+Shift+F until 2026-11-04), Super+Equal, Super+Minus, Super+Ctrl+0 and Super+scroll. Check that Super+0 still selects workspace 10.
- Capture at zoom 0.5, 1 and 1.5. Check that corners stop at 12 px and that no theme effect draws on a canvas window.
- Click below and above the threshold.
- Double click empty canvas and check fit all in
state. Double click again and check that the previous camera returns. Check that a slow second click and a drag between the clicks do not count. - Type into a window at zoom 0.5 and 1.5.
- Super+F, then check the zoom and that the window size did not change in
- Phase 5: collapse and expand the chat, and check that a fit target refits. A Super tap focuses and expands the chat.
- Phase 6, client matrix: GTK4, Qt, Firefox, Electron and the agent terminal. Check menus near the viewport edge, dialogs, the maximize button and a fullscreen request.
- Phase 7: restore after a nested restart, with canvas rectangles, saved sizes and the camera. Then turn the setting off and on again.
- Phase 7: stop the nested core, and check that the compositor keeps the canvas through a restart within the grace time. Check that it converts to Grid after the grace time.
- Capture screenshots with
capturefor each run. Never commit them. - Report these runs as nested proof only.
The live check that needs the user (phase 9, under coordination.lock)
- Pinch zoom and the touchpad feel of pan.
- Two monitors: the canvas stays on the primary output, and
send_to_outputworks in both directions. - The performance budget on the real integrated GPU.
- The lock during a camera animation.
- "Mostrar ao agente" at zoom other than 1. The refusal text names Super+F.
- Agent
fitandopen_applicationwith the real provider. - With
canvasSharpZoomon: the Electron host, the chat and one Qt and one Chromium application draw correctly (size, input position, sharpness) at zoom 1 and above. The first on offerswp_viewporterandwp_fractional_scale_v1to every client, the protected host included, which may bind them at its next start; nested QA exercised only GTK 4. Also the cost of the first frames below zoom 0.35 with many windows, and the memory of the cache.
Implementation phases
- Phase 0, docs only.
- Write this file and add the dated section to docs/architecture-decisions.md.
- Mark the superseded lines as history.
- Add a line under D1, D2, D3, D5 and D6 saying that they apply to Grid layout.
- Phase 1, input made correct for any transform, with no behavior change. Done on 2026-11-01.
- Hit tests, click selection,
grab_refusal,begin_super_grabandclip_dialogsread the Placement and the inverse scale. - The pointer location is chosen per focus space.
- The thumbnail swallow rule stays for the Chat presentation.
- Hit tests, click selection,
- Phase 2, live overview planes. Done on 2026-11-01.
- The host reports card rectangles, and the compositor draws cached plane textures. Add the capability and the setting
overviewPlanes. - Keep the PNG fallback.
- This phase needs no canvas, and it can ship first.
- The host reports card rectangles, and the compositor draws cached plane textures. Add the capability and the setting
- Phase 3, canvas model and pan at zoom 1, behind
canvas. Done on 2026-11-01.- Add
Layout::Canvas,WindowMeta.canvas,Camera, the parking anchor andcanvas_to_screeninpresentations(). - Add projected slide and depth planes.
- Add the expanded chat dock (fixed).
- Add empty-canvas drag and scroll pan, moves in canvas units with edge snap, the
cameraandcanvas_movecommands, the snapshot fields and the capability. - Add Super+Shift+T, the
canvas_enabledcommand and thecanvaslease. - Change the core
validStateto accept "canvas",canvasWorkspacesand presentation scale up to 2.0. Ship it in the same phase, because an older core disconnects on these values. - Start only after the Super tap and Super+S task is on origin/main, and rebase on it.
- Add
- Phase 4, zoom and snapping. Done on 2026-11-01.
- Add Super+F, Super+Shift+F (history: removed on 2026-11-04), Super+Equal, Super+Minus, Super+scroll and pinch.
- Add the sticky target, the magnetic settle, the camera clamp, the 300 ms animation and reduced motion.
- Add
LogoTap::cancelfor axis and gesture events. - Add Super+Ctrl+0 for zoom 1:1. Super+0 stays the workspace 10 key.
- Add the lock gates for pinch and the Super+scroll zoom.
- Add the double click on empty canvas for fit all, with an in-process test for the interval, the distance and the pan cancel.
- Phase 5, the floating chat. (History: the plan of 2026-11-01; the current chat states and keys are those of the Super mode of 2026-11-04.)
- Add the collapsed state, the host control and the protected route, and the dock side setting.
- Add the glass blur behind the chat.
- A Super tap expands a collapsed chat.
- Phase 6, popups, dialogs and client requests. Done on 2026-11-01.
- Add positioner unconstrain against the viewport, and dialogs that follow their parent.
- Add the
set_maximizedfit toggle without the Maximized state, and the fullscreen mapping. - Add self-resize anchoring.
- Run the nested QA client matrix.
- Phase 7, core, agent tools and persistence. Done on 2026-11-01.
- Add the
desktop_statefields,move,fitandrow, the typed refusals and the agent rate limit. - Add
fitto theopen_applicationplacement enum, and thecanvas_layout_onlyrefusal. - Add canvas
geometryConfirmedand the Canvas branch of smithay.jsplaceApplication. Phase 3 already routes Canvas through the grid branch, so an open keeps the canvas; thefitplacement is still open. - Add the compositor last-input time and the
user_activerefusal. - Add
canvas_restoreand the second configure with the saved size. - Add the additive window-session fields, the "canvas" to "grid" mapping in
observe(), and the loader test with the 28e15cb code.
- Add the
- Phase 8, sharp zoom and draw cost. Done on 2026-11-01.
- Add
wp_fractional_scale_v1andwp_viewporter. Check thatplace_elementsizes elements from the logical size. - Add the downscale cache below zoom 0.35.
- Run the budget measurement.
- Gate it with the setting
canvasSharpZoom.
- Add
- Phase 9, live validation and the default switch.
- Run the live check with the user.
- Then switch the default, as the user decided on 2026-11-01:
canvasis on by default, and new workspaces start in Canvas. Existing workspaces keep their saved layout. - Grid stays a permanent option with Super+Shift+T, and the setting stays as the user choice and the rollback.
Open questions for the user
Answered on 2026-11-01: the user accepted every recommended default below.
- Is a dock beside the canvas enough, or do you want a chat panel that you can drag anywhere over the canvas? Recommended default: a dock on the left that floats over the canvas with glass blur, in expanded or collapsed state. Add free placement later only if you ask.
- May a fit zoom a small window above 1:1 to fill the screen, with blurry text until phase 8? Recommended default: yes, up to zoom 2.0. New windows open at the viewport size, so most fits stay at 1:1.
- Should a plain left drag on the empty canvas pan the camera? Recommended default: yes, with a 4 px dead zone. Super+middle drag also pans (built on 2026-11-02).
- After the live check, should new workspaces start in Canvas while existing workspaces keep their saved layout? Recommended default: yes. Grid stays available with Super+Shift+T. Decided on 2026-11-01: yes, Canvas is the default after phase 9, and Grid stays a permanent option (see "The default layout decision").
- Should the redesign of the overview UI be part of this spec? Recommended default: no. This spec fixes only the preview performance with live planes, and a separate spec redesigns the cards.
- Should the second monitor get its own canvas viewport? Recommended default: no for now. Extra outputs keep their static shared grids.
No panel around the floating chat (2026-11-03)
The user did not want the glass card around the floating chat ("não era para ser
assim"). Since 2026-11-03 the body of a floating chat is transparent, the host reports
no dock glass (/api/desktop-chat-glass stays for the clear of an older report), and the
floating chat takes the chat glass regions like a chat outside the dock: the composer,
the cards above it and the visible bubbles. The compositor keeps the dock glass only for
a host that still reports it (chat_glass set): then the floating chat takes no
regions, as before. Update the host and the compositor together; an old host on a new
compositor keeps the panel, and a new host on an old compositor shows the composer
without blur on a floating chat.
Organize from an output bar (2026-11-03)
The bottom bar checks the layout of its own output, and sends POST /api/canvas-organize
with {output: "<connector>"} on an extra output; {} still targets the primary output.
The core validates the connector and requires capabilities.canvasOrganizeOutput before
sending an output, because older compositors would silently ignore the field and organize
the primary workspace. The compositor resolves the workspace shown on that output and
runs arrangement and fit in that view. With a shared workspace, window positions are
shared but only the camera of the originating output fits. Unknown or empty outputs
are refused without falling back to the primary output.
Regression coverage: the protected route in canvas-organize-http.test.js, plus
canvas_organize_on_an_extra_output_uses_its_workspace and
canvas_organize_targets_only_the_named_view_camera in the compositor tests.
Window-attached controls (2026-11-03)
The user rejected the initial bottom-bar placement. The current UI has no window-size buttons or dimensions in the bar. A small protected React/HeroUI menu opens on a right click within the outer 6 logical pixels of a Canvas application. The interior, including client-drawn title-bar menus, remains with the application. There is no idle button. Each open has a revision so the same window menu can reopen after dismissal or a preset. During an active resize, the menu is replaced by a temporary dimensions indicator at the lower-right edge of that window. Releasing the drag removes the dimensions. Both surfaces remain inside the initiating monitor and use the system glass and semantic tokens.
Smithay owns the target and computes placement every frame from the application
and its camera. The protected window-size panel uses on_demand keyboard
focus, so showing it never steals focus; it measures both dimensions so the
collapsed button has no large invisible input area. It hides in Grid, the
overview, the lock, when the chat/another panel takes focus, when the application
is minimized/closed/offscreen, and below the Canvas input threshold. The initial
canvas lens does not support these flat controls, so they hide over warped windows.
The core requires canvasWindowControls before declaring the panel and uses
canvasSizeTarget for the exact window/output. The panel id is reserved against
isolated plugins. The previous canvasSize command and 100% resize cap remain.
Presets as tiles (2026-11-12, the owner reported broken centering: a preset left the window
off center or partly off the screen). A preset places the window as a tile of the visible area
of the view of the request's output, the same tiles as a drop (section Tiles of a dropped
window), and keeps the camera and the other windows. The tile comes from the center of the
window projected flat (the lens does not move it): Tela útil inteira takes the whole area, Meia
largura the left or right half by the center x, Meia altura the top or bottom half by the
center y (Tile::Top and Tile::Bottom, for presets only), and Um quarto da tela the quarter
of the center. A center outside the area counts at its nearest point, and a center exactly in
the middle goes to the right and the bottom. The client minimum and maximum, the 100% monitor
cap and the centering of a window that the cap makes smaller are those of a drop, so at a zoom
below 1 a whole-area tile larger than the cap shows the capped window centered. On a shared
workspace the tile, the camera and the cap are those of the view of the extra output that
asked. This replaces the text below that says that a preset keeps the canvas origin (history).
Tests: canvas_size_presets_place_the_window_as_the_tile_of_its_center_and_keep_the_camera,
a_canvas_size_preset_counts_a_center_outside_the_area_at_its_nearest_point,
a_canvas_size_tile_larger_than_the_cap_is_capped_and_centered_in_the_tile and
a_size_preset_takes_the_tile_of_the_visible_flat_area_through_the_lens
(native/smithay/src/canvas_tests.rs, canvas_warp_tests.rs) and
canvas_size_uses_the_requested_extra_monitor_and_refuses_another_workspace
(output_canvas_tests.rs).
Screen tiles at zoom 1 (2026-11-12, the owner: "Nao consigo maximizar a janela ao tamanho da minha tela, a grid deveria ser proporcional ao tamanho da tela, a camera tambem", and the answers "Tamanho da tela, camera em 100%" and "Tiles do Canvas"). In the live session a maximize on a 1896x1016 output gave 1276x657, because the tile divided the fit viewport (with its margin) by the zoom. Now a preset, a drop on a tile, a tile assist choice and the client maximize place the window as a tile of the usable area of the output at its pixel size, whatever the zoom (the area is the content area less the column of the whole chat, no fit margin), and animate only the view of that output to the zoom 1 camera at the rounded center of its goal, clearing the fit target; the side is still picked from the window center in the visible area. This replaces the sentences above that keep the camera, take the visible area of the view and apply the 100% monitor cap to a preset (history; the cap stays for pointer resizes). Tests: canvas_size_presets_place_the_window_as_the_tile_of_its_center_and_go_to_zoom_1, a_canvas_size_tile_at_another_zoom_takes_the_pixel_size_of_the_tile, a_tile_leaves_the_column_of_the_whole_chat_free_and_takes_no_fit_margin, a_maximize_request_at_another_zoom_takes_the_pixel_size_of_the_screen_and_zoom_1 and a_tile_operation_moves_only_the_camera_of_its_output_to_zoom_1.
Validation of the correction (2026-11-03, history: the preset kept the position then): private nested run 348ec55c,
synthetic GTK window, 1848 × 984 output. The attached menu opened through real
pointer input; quarter configured 912 × 444 and full configured 1824 × 888,
with the same window position and camera. Super+right resize showed 1067 × 574
beside the window, and releasing removed the dimensions. At zoom 0.512, a drag
past the cap stayed at 1824 × 888 (100% × 100%). The bar had no sizing controls
in any of these states. The run was stopped without changing the live session.
Local synthetic screenshots: presets-fixed.png, resize.png,
after-resize.png and cap-100.png in the task's local QA artifacts folder;
no media is committed or uploaded. Validation also passed 1225 Node tests,
718 Rust tests (35 opt-in GPU tests ignored), formatting, lint/build checks
and Clippy without warnings.
Historical first implementation (superseded; a preset keeps the canvas origin only until 2026-11-12)
The protected bottom bar offers four presets for the last focused application of its output: full useful area (100%), half width (½ L), half height (½ A), and a quarter (¼, half of each axis). The bar shows the window's logical width and height and both percentages. During a pointer resize it highlights and updates the requested dimensions, including while the client is still answering the configure. The tooltip names the target and the monitor limit. The percentages describe each axis, not area or camera zoom.
The reference is the logical content area of the bar's output, minus the existing 12 px fit margin on each side. It excludes system bars and respects output scaling. A preset changes the client size at the same canvas origin; it does not move the camera, focus or other windows. Both client-side edge resizes and Super+right drags stop at 100% on each axis, using the output on which the grab started, independently of zoom. Client minimum and maximum sizes remain authoritative: a client minimum larger than the monitor can exceed 100%. Existing restored sizes and unsolicited client resizes are not silently rewritten. Grid behavior is unchanged.
Shared workspaces keep one client size. Applying a preset on one monitor therefore changes that window in every view, using the initiating monitor's area; cameras stay independent. Opening a view or moving focus never resizes a window. No new setting or profile migration is needed. The existing window session persistence saves the resulting rectangle.
The protected host reads GET /api/canvas-size?output=<connector> (the primary
output when omitted), and sends exactly {identifier, output, preset} to
POST /api/canvas-size. The core validates the live window, output and Canvas,
and sends canvas_size {window_id, output, preset} only with the compositor
capability canvasSize. The compositor repeats the checks and refuses during
a lock, overview, transition or window grab. These are user controls, so a
manually held window can be resized. No agent tool, scheduled turn, generated
HTML or plugin panel gets these controls. An older compositor hides the controls.
The small host read runs at most once per 100 ms with no overlapping requests;
it does not read conversation history.
Verification (2026-11-03, history: the opposite-edge anchoring and the unchanged position
below were the preset behavior until 2026-11-12, see Presets as tiles above):
canvas-size.test.js, canvas-size-http.test.js, shadcn-bars.test.js, and the Canvas
in-process tests cover typed requests, authentication, old compositors, focus handoff,
per-monitor sizes, minimum constraints, opposite-edge anchoring and unchanged
camera/position.
Nested evidence (2026-11-03, history: a preset kept the origin then; synthetic GTK window, no provider): clicking each
preset produced 2194×1085, 1097×1085, 2194×542 and 1097×542 on a 2218×1181
output. The canvas origin and camera stayed unchanged. A Super+right resize
at zoom 0.64 stopped at 2194×1085 even when dragged farther, with the same
requested dimensions in the bar. A second run on an 1848×984 output stopped
at 1824×888. Local screenshots: presets.png, resize-final.png and resize-bar.png.
The runs were stopped without restarting the shared session.
Validation on the integrated revision: 1,222 Node tests and 715 Rust tests
passed; 35 Rust GPU tests are ignored by the normal suite. Formatting,
syntax, lint, reproducible UI build and Clippy passed. The explicit EGL run
passed 24 tests and failed four; the same four fail on unchanged origin/main
(9d13fad): egl_chat_glass_regions_blur_only_the_reported_regions,
egl_a_window_dragged_in_from_another_output_draws_below_the_chat,
egl_shell_lock_shows_only_the_host_lock_panel, and
egl_the_wallpaper_covers_the_second_output_behind_its_windows.
These pre-existing graphics-test failures are not an approval of that suite. (History: the GLES
tests went on 2026-11-11, step 7 of openspec/changes/archive/2026-11-10-gles-removal-plan/design.md; their wgpu mirrors are
a_plain_window_dragged_in_from_another_output_draws_above_the_tiles_and_below_the_chat,
the_plain_shell_lock_holds_only_the_host_lock_panel_and_it_is_hidden_unlocked,
the_plain_wallpaper_covers_the_second_output_behind_its_windows_only_once_the_host_declared_it
and native_wgpu_chat_glass_regions_blur_only_the_reported_regions.)
Windows behind bars (2026-11-03)
Canvas application windows, their dialogs and popups draw to the edge of their view output, behind the top and bottom bars. The bars keep their higher stacking band and receive input first. Camera projection, fit margins, organization and monitor-relative size limits still use the content area between the bars. Canvas-space plugins retain their content confinement. Each shared view clips to its own output.
Validation: cargo test --locked passed (719 tests, 35 ignored), including a regression for culling in both reserved strips, bar input priority and unchanged camera content area. cargo fmt --check, Clippy with --features session --all-targets -- -D warnings, and the nested release build passed. Default-feature Clippy reports existing dead-code warnings for visual_style::Follower and changed. Nested QA run 79d383b4 used a synthetic GTK application extending under both bars; bars.png is a local-only artifact. The run was stopped; the live session was not changed.
Bottom bar layout icon (2026-11-03)
The protected bottom workspace bar shows the current Grid/Canvas mode as an icon.
Its tooltip names the current mode and the destination. A click uses
POST /api/workspace-layout-toggle with {} on the primary bar or {output}
on an extra output bar. Only the protected host has the shell token; no agent
tool or generated surface gets this action. The core sends
workspace_layout_toggle only with capabilities.workspaceLayoutToggle.
The compositor targets the workspace shown on that output and reuses the
Super+Shift+T rules, including the Canvas lease, lock, overview, transitions
and shared-workspace refusals. The existing shortcut stays available.
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.
-
Canvas layout (openspec/specs/canvas-windows/spec.md, phases 3 to 8): the protected setting
canvas(on by default since 2026-11-03, the user: "Canva é o padrao";/api/canvas-enabled) lets the core renew the compositor lease, and while the lease is on a new workspace (no layout chosen yet, no application window) starts in Canvas, while an existing workspace keeps its layout (openspec/specs/canvas-windows/spec.md, The default in effect); Super+Shift+T switches between Grid and Canvas. The camera keys, Super+scroll and pinch zoom run through compositor input; their protected contextual mouse counterparts use the host-only typed action path of openspec/specs/contextual-actions/spec.md. No agent tool or generated HTML pans or zooms the camera freely or changes the setting. Since 2026-11-03 only the protected bottom bar button "Organizar janelas" calls/api/canvas-organize, which sendscanvas_organize(the row, then fit all;capabilities.canvasOrganize); no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it. Since 2026-11-12 the compositor also runs that organize by itself on a Canvas workspace (see Automatic organize in Canvas, in the section "Organizar janelas" below); no agent tool reaches it either. Below the input threshold a left drag (also Super+Alt) on a canvas window pans the camera and never moves the window, and a click still fits it; at or above it a user move of a canvas window ends on a tile of the visible area (since 2026-11-11, openspec/specs/canvas-windows/spec.md, Tiles of a dropped window; from 2026-11-03 the drag from afar moved the window). Since 2026-11-06 a new window takes its spot and neither the keyboard nor a camera move while the user types where they work (openspec/specs/canvas-windows/spec.md, A window that opens while the user types; the automatic organize of 2026-11-12 then arranges the workspace and fits the camera, as it does for any new window); the accepted exception of an agentopen_applicationbelow still takes them. Phase 7 gives the authenticated agent only typed canvas actions:window_action move {x, y}(canvas units, bounded),window_action fit(andexpandon a canvas window, which is the same agent fit),arrange_windows rowandopen_applicationplacementfit. The compositor refuses an agent fit for a held window, withuser_activeduring user input and for 2 s after it, and withrate_limitedmore often than every 2 s. The agentwindow_action focus,expandandrestoreof a canvas window get the same limits and share that rate limit (the compositor commandagent_window,capabilities.agentWindow), also for a window that already shows, because they give it the keyboard:focusof a canvas window outside the view centers the camera on it, so the keys never go to a window that is not drawn, andrestorereturns the camera from a fit target. Since the Super mode (openspec/specs/super-mode/spec.md), while the chat shows whole or as the box,focusfrom near frames the window at the fit zoom in the viewport beside the chat, and from afar frames every window without zooming in. On a Canvas workspace (also in the overview over it) the core refusesfocusandrestore(andexpandwithout the canvas tools) on a compositor withoutagentWindow. Accepted exceptions with no limits:open_applicationon a Canvas workspace focuses the new window and fits the camera on it (user input must not fail an open), andwindow_action minimize,moveandarrange_windows rowmove no camera but can give the keyboard to another window that shows, which the agent cannot pick; since 2026-11-04 the one exception is a row that moves the current fit target while the keys are not on another canvas window, or that moves windows under a fit of every window: the camera keeps that fit at the new place (openspec/specs/canvas-windows/spec.md, Super+G). The grid actions andarrange_windows gridreturngrid_layout_onlyon a Canvas base, and the canvas actions returncanvas_layout_onlyelsewhere; the agent cannot switch a Canvas workspace to Grid. The login restore of the core (window-session.json) saves and restores the canvas rectangles, saved sizes, cameras and collapsed docks while the setting is on. Phase 5 (the floating chat): only the protected host collapses or expands the chat dock and sets its side and its glass, through the authenticated core routes/api/chat-dock,/api/chat-dock-sideand/api/desktop-chat-glass; since phase 3 of openspec/specs/multi-output-workspaces/spec.md,/api/chat-docktakes an optionaloutputfor the floating chat of a Canvas workspace on an extra output (only withcapabilities.outputCanvas). The core and the host expand a hidden chat or the box for an approval. Since the Super mode of 2026-11-04 (openspec/specs/super-mode/spec.md, phase 1;capabilities.chatBox) the floating chat has three states:collapsedhides it (nothing drawn, no input),boxshows only the composer at the bottom center, andexpandedis the whole chat, centered on a workspace with no window and a column at thechatDockSideside (right by default, "Lado do chat" in the protected settings) on a workspace with windows, excluded from the fit viewport. A new or emptied Canvas or Grid workspace starts in the box. A Super tap (compositor input) fits all, at most at zoom 1 and above the box, and shows the box; a second tap or Escape hides it and returns the camera, or after an Alt+scroll step centers the focused window at the zoom before the tap (/api/chat-docktakescamera: "return"only withcollapsed). The protected host expands the box at the first key, at Enter on an empty field, at a send, when a response starts (a scheduled turn too; box to whole chat only, never from hidden), for a pending first-run card and before a dialog of the chat, collapses the chat before a/namedispatch, and has a chat button in the bottom bar. A pure dock change moves no camera. Super+Shift+F is removed; Super+N (the compositor input requestnew_chat, which runs the code of/api/create) replaces the host key Ctrl+Shift+N; Alt+scroll (compositor input) steps the focus between canvas windows, with the actionsfocus_nextandfocus_previous. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the box state, the camera field,new_chator these actions. History: from 2026-11-02 a Super tap showed or hid the whole centered chat and a new canvas started hidden, and from 2026-11-03 a new Grid workspace started with it shown (openspec/specs/grid-on-canvas/spec.md, step 1b). Since 2026-11-03 the chat of a Grid workspace on the primary output floats the same way (no cells, the same Super tap and/api/chat-dock); while the whole chat shows, the Grid keeps a margin at its side that is no cell. Since 2026-11-03 a user press (compositor input) outside a shown floating chat, its dialogs, protected panels and other host windows hides it, and the press still reaches the window under it; the core sendschat_hold(control connection only, ended with it) while an approval, the change review card or a profile CSS candidate waits so the dialog stays, and nothing hides in the overview or while locked (openspec/specs/canvas-windows/spec.md, Click outside). Update the compositor and the core together for it;scripts/check-host-skew.pywarns about a core withoutchat_hold, and refuses a core without the box state on a compositor withcapabilities.chatBox. No agent tool or generated HTML collapses or expands the chat, moves it to the other side or sets the chat glass. Phase 6 (the client maximize changed on 2026-11-12, owner: "duplo clique (maximizar) na janela deve expandir ela ao tamanho da camera"): in Canvas a client maximize request of the canvas window with the keyboard (requested_by_focus; the compositor refuses it while locked, in the overview, during a transition or a window grab, and for a hidden window) places it as the Full tile of the usable area of one output (the focus output when its view shows the window, else the first that shows it), exactly as the protected preset "Tela util inteira" does (canvas_tile_in: client minimum and maximum, centered), gives it the xdg Maximized state, clears the fit target and, since 2026-11-12 (owner: "Tamanho da tela, camera em 100%"), animates the view of that output to the zoom 1 camera over it, so the window has the pixel size of the usable area (without the chat column while the whole chat stands beside windows, and with no fit margin); it opens no tile assist. The canvas rectangle before it stays inWindowMeta.maximized_from, and the client unmaximize request, or a maximize request of the window that is maximized, puts the window back on it with its size and no Maximized state, the camera unchanged. A user move or resize (the first step that changes the rectangle, not the press), a size preset, a tile assist choice, a drop, the agentmove,fitandcanvas_restore, a row, a move to another output or workspace and a layout other than Canvas end the state without a restore: the window keeps its place. A coreCommand::Maximizeends it too and fits the camera; a coreCommand::Restoreof a maximized window restores the rectangle as the unmaximize request does. Real full screen keeps the state: it saves the maximized rectangle and the leave returns to it. The snapshotwindows[].maximizedis true for it once the client acknowledged the size; the core needs no change, because it confirms a maximize bymaximizedor by the camera target. Super+F, the agent fit andCommand::Maximizekeep the camera fit (set_canvas_maximized); a client maximize request of a window that is no canvas window (no canvas rectangle yet, say) takes that path too. The keyboard rule of client requests stays. Real full screen (2026-11-12, replacing the fullscreen fit of phase 6): a client fullscreen request of the canvas window with the keyboard (requested_by_focus; a dialog does not count), within 5 s of the last user input and with the session unlocked, gives that window the xdg Fullscreen state and the logical size of one output (the focus output when its view shows the window, else the first output that shows it; thewl_outputof the request is ignored) and draws it over that whole output at scale 1, above the wallpaper, the canvas, the chat and the bars, and below protected panels and the lock screen, over a black backdrop and with no lens, window finish or sharp-zoom cache. It uses the bandfullscreenbetweenchromeandoverlay, which no declaration can name. One window covers an output; a second request there ends the first. It ends on the client unset request, a close, unmap or minimize, a move to another workspace, a workspace that leaves Canvas, a workspace switch of that output, the overview, an unplug, a Super tap (the tap only leaves) and the keyboard on another application window drawn on the same output; the keyboard on another output, a protected panel or a menu does not end it. Leaving sends the saved size and no Fullscreen state;WindowMeta.canvas, the snapshotcanvas, the camera and the chat do not change. While a window covers an output, the user zoom and pan of that view and the camera flight to a new window are skipped, and the agent fit, move, restore, row and size, thecameracommand and a maximize request of the window end full screen first (an accepted agent effect, as for any user action that closes, minimizes, focuses or moves the window). A request while locked, without recent input, without the keyboard or outside Canvas gets the old reply.desktop_stateaddswindows[].fullscreen(the output name or null) andcapabilities.canvasFullscreen, read only; no tool, route, scheduled turn or generated HTML requests or ends it. Nothing is saved: a restart leaves it. Update the compositor and the core together; an old core ignores the field. Phase 8: the protected settingcanvasSharpZoom(off by default,/api/canvas-sharp-zoom-enabled) offers fractional scale and the viewporter to the clients and draws canvas windows below zoom 0.35 from a cached texture; no agent tool or generated HTML changes it. Turn the setting off before a rollback of the core or the compositor. Shared views (openspec/specs/shared-workspace-cameras/spec.md, phase 2): with a Canvas workspace on several outputs each output keeps its own chat window and floating chat state (/api/chat-dockwithoutput), both of the same conversation; under the live lease an approval shows in and is answered from only the chat of the agent view (the primary chat while that output chat is not bound), and the core and the host show a hidden chat for an approval only on that output. The agent camera actions move only the agent view (the view of the focus output when it shows the workspace of the turn, else the lowest-order view);desktop_stateaddsfocusOutput,canvasWorkspaces[].viewsandwindows[].views, and the refusalssame_workspaceandworkspace_sharedreach the tools with texts. -
A click on a workspace (openspec/specs/canvas-windows/spec.md, A click on a workspace; since 2026-11-06): only the protected bar calls
/api/workspace-show-all, which sendsworkspace_show_all(capabilities.workspaceShowAll): the camera of that view shows every window, and no window and no chat state changes. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it. Super+Shift+scroll (compositor input) takes the input request of Super+Left and Super+Right. -
Canvas window sizing (openspec/specs/canvas-windows/spec.md, Window-attached controls): the protected React
window-sizepanel follows the focused application on its output (capabilities.canvasWindowControls), with presets opened by right click on the outer window edge and no idle button. Dimensions appear only during a resize, next to the lower edge. The bottom bar contains neither. The compositor owns target and placement; plugins cannot use this panel id. Presets use/api/canvas-sizeand, since 2026-11-12 (owner: "Tiles do Canvas"), place the window as a tile of the usable area of the output at its pixel size, whatever the zoom: the area is the content area of the output without the column of the whole chat and with no fit margin, with the 12 gap between halves and quarters; the side comes from the window center in the visible area, as for a drop. The same holds for a drop on a tile, a tile assist choice and the client maximize. Each of them clears the fit target and animates only the view of that output to the zoom 1 camera (the center of its goal camera, rounded to whole pixels), so the window shows on its tile; another view of a shared workspace keeps its camera, and the unmaximize keeps the camera. The 100% logical-monitor cap still applies to pointer resizes, with client minimums respected. No agent tool, scheduled turn or generated HTML receives these controls.