Skip to content

Artifacts

Canvas designs and prototypes

Canvas designs: frames at phone, desktop, or slide size, themes and brand kits, images, Present and Play, prototypes, the Allow network switch, HTML import, and containment.

  • 12 min read
  • 15 sections

Canvas designs and prototypes ​

Some work is not data and not prose. A screen, a slide, a landing page, or a clickable prototype needs a page of its own. In Canvas that is a design block: one or more HTML frames at a fixed size, drawn in a sealed frame inside the document.

A design is the highest tier in Canvas. Use it when the look or the behaviour is the deliverable; use typed blocks when the values are.

Sizes ​

SizePixelsFor
phone390 × 844A phone screen or flow
tablet820 × 1180A tablet screen
desktop1440 × 900A web page or desktop app screen
slide1920 × 1080A deck slide
documentFull column width, content heightAn article, spec, or imported page

A deck is a set of slide frames. A mockup is usually a phone or desktop design. A long-form page can be a document design, which grows with its content up to 12,000 px and then scrolls inside the frame.

Static and running ​

There are two tiers of design, and the difference is script:

  • Static. No script runs. The frame has no allow-scripts, no form posts, and no access to Octant's origin. This is the right tier for a screen, a slide, or a page that only needs to look right.
  • Running. The design declares runsScript and is drawn in a frame sandboxed to allow-scripts alone. It can respond to clicks and change its own state; it cannot read Octant's origin, make a network request, or open a same-origin page. The one exception to the network rule is a switch you set yourself; see Allow network. A running design waits for Run in the thread and starts on open in the sidebar.

No frame ever has both allow-scripts and allow-same-origin. That combination is what would let a page reach the app; the sandbox is the boundary, so it is never granted.

Themes ​

A design chooses what it inherits:

ThemeWhat the frame gets
workspaceThe app's semantic tokens, light or dark, plus the frame kit — the default for a document
noneIts own look only — the default for a device-size screen
brandThe Project's design system tokens, or its brand kit, on a neutral light base

A brand kit is a Project-level set of at most 32 tokens: color-*, font-*, radius-*, and space-*. Set it in the Project overview's Brand kit inspector. When a thread's Project has a kit, the agent is told to author designs with theme: "brand" and the same tokens. The design carries its own copy, so later edits to the kit change new designs, not old ones.

In a Work or Code Project whose design system (DESIGN.md) has tokens, the agent uses those instead of the kit, for documents, decks, websites, app screens, UI kits, and flows alike. Switching a Canvas to another design system redraws its brand designs in the new one.

A brand design is drawn from its tokens everywhere: the Canvas, Present, Play, the share viewer, a public link, and an HTML export all draw the same light-scheme page. It never reads the window's theme, so a shared design looks the same to everyone.

Images and assets ​

A design can declare up to 12 image assets:

SourceAllowed inNotes
Generated imageEvery kindA completed image job's attachment
Project fileWork and CodeResolved under the thread's folder and confinement
Browser captureWork and CodeA screenshot the Canvas's own thread kept

Markup names an asset as octant-asset:<id>; the renderer replaces it with a data: image before drawing, so the frame still loads nothing. A missing, refused, or too-large asset draws a labelled placeholder, and the agent's preview reports it.

Each image is capped at 3 MiB and a design at 5 MiB. SVG files are refused, because an SVG is markup a sniffer cannot tell from other text; inline SVG inside the frame already covers vector art.

A Chat design cannot use Project files or browser captures, because a Chat thread has no folder.

Present, Play, Run ​

  • Present draws a deck one slide at a time. N toggles presenter notes; the notes panel is the presenter's and never appears in a share, a public link, or an export.
  • Play draws all frames of a static design in one page so fragment links (#frame-id) show the right one.
  • Run starts a running design's script inside its sealed frame.

A deck's notes are like speaker notes: useful while you present, deliberately not part of the artifact.

Allow network ​

A prototype has no connection. You can give the prototypes of one Canvas a filtered one with the Allow network switch. It is off by default, it belongs to that Canvas alone, and only you can set it: an agent, a routine, and a paired phone cannot. A browser you paired yourself can.

Turning this on lets the Canvas's content reach the open internet

While the switch is on, a running prototype can send anything the Canvas holds (its markup, its images, and whatever you type into it) to any public address on the internet, through this computer's connection. Turn it on only for a prototype you trust with that content.

Where it is available. The switch is offered in the desktop app and when you open Octant in a browser on the computer that runs it. A browser you paired yourself is offered it too, and the switch applies to pages run on the host: that browser runs no prototype itself. The phone does not offer the switch, and a device paired below Full or introduced by a hub gets none of it. See what a paired browser can do.

To turn it on:

  1. Open a Canvas that holds a prototype in the sidebar.
  2. Open the Canvas's More menu and choose Allow network….
  3. Read the notice and turn on Allow network.
  4. Run the prototype again. A prototype that was already running keeps the rules it started with.

While the switch is on, the Canvas header shows Network on, which opens the same dialog, and every prototype of that Canvas says Network on above its frame, in the sidebar and in the thread, whether it is running or not. Turning the switch off stops the prototype's requests at once.

What it allows. The prototype's script can fetch http and https addresses on the public internet. Octant on this computer makes each request for the page, so the request comes from this computer's address. A request is a GET, or a POST whose body is JSON (at most 256 KiB); any other method or body is refused. The script can also load an image or a font from a public address (an img element's src, a FontFace, or a url() in a style the script adds), and Octant fetches those the same way, passing on only a response that really is an image or a font. No request carries a cookie, a sign-in, or a header the page chose, such as Authorization or an API key; only the status, the content type, and the body come back. There is no WebSocket. Everything else about the sealed frame stays as it was: the design's own markup and style sheets still name no remote image, font, stylesheet, or embedded page, and the page submits no form.

How long it lasts. Each running prototype gets its own access, which lasts an hour and is renewed while the prototype stays open in the window that ran it. Stopping the prototype, closing its window, or leaving the Canvas lets it lapse. If it lapses (for example, the computer slept for more than an hour), run the prototype again.

What is always refused, on the first request and on every redirect:

  • Octant itself, your files, and anything else on this computer, including localhost.
  • Your local network and private address ranges, link-local addresses (which include cloud metadata addresses), and the private overlay networks that paired devices and hubs use.
  • An address with a user name or password in it, or on a port other than the standard web ports.
  • A response larger than 5 MiB, a POST body larger than 256 KiB, a request that takes longer than 30 seconds, more than 4 requests at once, or more than 60 a minute for the Canvas. The page is told why.

What never carries the switch. It stays with the Canvas on this computer. A share, a public link, an export, a saved HTML file, and the agent's own preview are all made without it, so someone reading your share never fetches through your computer.

Mockups and UI kits ​

A mockup block builds an editable screen from a catalog of interface components rather than hand-written HTML. It carries structured layout rules, token-backed visual styles, responsive breakpoints (compact, medium, expanded), reusable component definitions with one-level slot overrides, and interactive states, drawn in the Artifact's theme or design system.

  • Direct editing and precision tools. Select any node (or multi-select several) to edit copy inline, adjust spacing, alignment, layout, or semantic style tokens in the inspector, measure layer distances with gap rulers, align or distribute selected layers, or swap a repeated token across a selection as one undoable edit.
  • Non-destructive agent patches. When you ask an agent to revise a mockup, it can target specific nodes via mockupEdits so unrelated manual edits survive intact and overlapping field changes report exact conflicts.
  • Preview stress-test bar. Test a screen under narrow viewports, enlarged text scale, long labels, and empty data as pure view state without modifying the document.
  • TSX handoff. Choose More › Save mockups as TSX to export dependency-free React TSX components for mockup blocks.
  • UI kit recipe. A UI kit recipe pairs a token table with a component sheet in the kit's own palette, showing every control in every state. Use it when the deliverable is the design system, not one screen.

Interactive flows and scenarios ​

A flow block turns screens into a clickable UX prototype without writing HTML or script:

  • Direct authoring. Add and edit navigation edges, modal/sheet/drawer overlays, form-validation rules, and loading, failure, and recovery transitions right on the flow board.
  • Deterministic replay (FlowPlayer). Record up to 12 named scenarios with sample data (for example, happy path, validation error, and failed payment recovery) and step through them in FlowPlayer. Because transitions and states are structured data, reviewers can reopen the exact state a comment refers to, and custom design HTML frames remain available whenever a prototype needs bespoke script behaviour.

Directions and comparison ​

When exploring alternatives, you can branch a screen or section into up to 16 persistent named Directions inside the same Artifact instead of duplicating the document:

  • Each direction records its origin version and block, status (active, chosen, or discarded), and decision rationale.
  • Compare two directions side by side at matched scale, inspect differences block by block, and adopt compatible changes into another direction while preserving unrelated manual edits.
  • Comments and decisions capture the element, viewport, version, direction, and prototype state so teammates can reopen the exact context later or continue from an earlier direction in another authorized thread.

Static design anchors ​

On a static design frame, authors and agents can mark specific elements with data-octant-id="<id>". Those static anchors let you attach a single element from a custom HTML frame to a Chat, Work, or Code turn or anchor a comment to a frame without loosening the frame's no-script, no-same-origin sandbox.

Import an HTML page ​

Import HTML… brings one page you already have into a new Canvas. It accepts a file or pasted markup up to 256 KiB.

  • The page becomes one document-size design with theme: "none", so it keeps its own look.
  • Head and body styles become the design's stylesheet; the body's markup becomes the frame.
  • External scripts, stylesheets, images, fonts, media, embedded pages, form destinations, non-fragment links, and unsupported meta settings are removed, and the window lists what was taken out.
  • A page that still contains a script or an event handler becomes a running design. No import chooses a looser tier.

The page came from outside Octant, so the Canvas is marked as outside content; later agent reads are marked too, including the thread it was imported into. The Canvas title is what you typed or the file name, never the page's <title>.

Redesign an existing site ​

The website-redesign recipe uses the Browser and a design:

  1. The agent opens the page in the thread's Browser.
  2. It takes a screenshot the thread keeps.
  3. It declares the capture as an asset and shows it in a before frame.
  4. It draws the after frame as HTML and CSS itself.

It never fetches the site's own images, styles, or fonts into a frame. Browser captures are used in the Canvas preview but are left out of a share, a public link, and an export.

Containment ​

The rules are deliberately strict, because markup is the one block that could reach outside:

  • Static frames run no script, submit nothing, and cannot use the app's origin.
  • Running frames get allow-scripts and nothing else.
  • No remote image, stylesheet, font, or embedded document. Link preloads and @import are refused however they are spelled.
  • Links may only point at a fragment in the same design.
  • The preview browser is started with no route out, including WebRTC, and the page's policy forbids connections.
  • A running prototype reaches the network only while you have turned on that Canvas's Allow network switch, and then only public addresses, through Octant on this computer.
  • A shared design is shared as written; the approval card says so, and a recognisable secret in the markup refuses the share.

When a design looks wrong ​

WarningMeaning
design-frame-overflowThe frame's content is wider than its page
design-contrast-below-targetText reads below 4.5:1 (3:1 for large text)
design-script-errorA running design threw an uncaught error while loading
design-not-measuredThe preview ran out of time before reading a frame; it is not clean, just unread
design-asset-unavailableA declared image could not be resolved, with the reason

The first four are measured in the drawn page, not computed from the document, so they only appear when a browser drew the preview. If no Chromium is available, the layout warnings still return and the result says that no picture was taken.

Next ​

Octant documentation · local-first by design