# Import rendered designs

Use the URL or local preview the person asked for. Confirm the page and state
in the browser first. Capture what the browser renders, regardless of whether
the site uses React, Next.js or another stack. The source app needs no plugin
or source changes. Use an authorized fixture with sample data for gated
screens or onboarding; the importer starts a fresh browser profile and does
not inherit a signed-in tab.

Use the rendered mockup to show each intended screen. Keep exact UI copy on
the artboard and use a short caption or a connection to explain the state or
transition. Walk one success and one recovery as the user, checking each screen
with its nearest callout for the role, action, and destination. Review any
composition_feedback returned by the board write.

## Capture on the machine that can reach the page

From the HeadSpacer source checkout with its npm dependencies and Chrome or
Chromium installed, run:

    npm run capture:canvas -- http://127.0.0.1:3000/ --single --out page.headspacer.json

For one screen, keep --single; add --selector CSS to target a specific region.
Run once per screen or viewport and give each capture a distinct title with
--title. For a harmless local control that reveals a state, use --open CSS.
For a multi-step flow, drive an authorized local fixture in Playwright and
capture each settled screen; this imports screen states, not the app flow.
Use --part 'Name=CSS' or automatic section detection only when dissection is
wanted. --full-reference captures a long page in numbered screenshot tiles;
tiles are image nodes, not editable HTML.

The command returns the native board file, editable object IDs and warnings.
Check the editable list before promising a mockup. It reconstructs HTML/CSS,
embeds loaded raster images when they fit, and samples supported visual hover
changes on a bounded set of controls. The preview activates on click or tap.
Source JavaScript, network calls, navigation and form submissions stay out.
HTML and CSS each have a 16,000-character limit; images can be compressed or
omitted, and oversized regions can fall back to a screenshot. Say which
objects are editable and which are references. Verify the rendered result.

## Put it on the intended board

- Local: open the board file with the board menu, or add
  --publish-local http://127.0.0.1:4180 for a new room on a running local dev
  server. That link only works on this machine.
- New account board: review the portable document first. Use create_board
  with a title, a stable request_key and an optional design-only board
  document. Join the returned board_id and attach reference images separately.
- Existing board: join_board, read_board, then use edit_board to create the
  captured design-preview nodes in free space with fresh IDs. Preserve each
  node's html/css data. Keep screenshots as separate image nodes; use
  upload_image for approved local screenshots when available. For revisions,
  replace complete data with the current expected.data version. Use bounded
  batches and read back accepted writes.

Shared editable mockups need richElementsVersion 4 or later. Hosted MCP
contributes the resulting board objects; it cannot run the local importer,
read a localhost URL or drive a browser. If only a screenshot is available,
label it as a reference and keep any available HTML as code; do not claim
the screenshot is an interactive mockup.
