Skip to main content

Preview & Comments

Sandboxed preview​

Artifacts render inside a sandboxed iframe. HTML documents are served from the project's file URL (or inlined via srcdoc when forced); JSX renders with a vendored React 18 + Babel runtime. Nothing in an artifact can reach the host page.

How rendering is chosen​

  1. The agent writes real files into the project folder.
  2. The artifact manifest records kind and renderer.
  3. The renderer registry maps that to a viewer:
RendererViewer
htmlStandard preview with frame toggle
deck-htmlDeck viewer with slide navigation
motion-htmlMotion transport (play / scrub / frame-step)
react-componentJSX preview
markdownRendered markdown
brand-guidelineDesign spec / brand kit view

Files with no manifest fall back to shape detection — a document with class="slide" sections is treated as a deck even when the project kind says otherwise.

Preview controls​

ControlAction
Frame toggleDesktop / tablet / mobile widths; cycle with the toolbar
FullscreenOpen the preview in a modal overlay
RefreshRe-render the current artifact
TweaksEnter the interactive tweak board (see below)

Tweaks and inline comments​

The Tweaks toggle in the preview toolbar turns the artifact interactive. Clicking an element opens a comment composer tied to that element's selector, position, and current styles.

Tweaks on → click an element → type the change → Add & send
  • Comments are persisted per project and per file.
  • Each comment carries a snapshot of the target: selector path, bounding box, computed styles.
  • Sending a comment produces a surgical edit instruction referencing that snapshot, so the agent edits the element instead of regenerating the page.
  • Multiple pending tweaks queue up and can be sent as a batch or exported to the chat composer.
  • Comment status is tracked (open → addressed → resolved).

Targeted patching depends on the artifact's DOM structure. For structural changes, describe the change in chat instead — a rewrite beats three failed selector patches.

Board tools​

The tweak board also offers drawing tools (inspect, pod annotation, stroke). These are for annotating the preview, not for editing the artifact: they produce richer comment attachments.

Live todo progress​

The agent streams a todo plan that renders as a live card in the chat pane. Items move from in_progress to completed in real time.

  • Watch — see the plan before the artifact exists.
  • Interrupt — stop a run that is heading the wrong way.
  • Redirect — send a message mid-run to change course.
  • Continue remaining — when a run stops with unfinished todos, this resumes only what is left instead of redoing completed work.

Tool-call feed​

File reads, writes, searches, and shell calls render as tool cards in the chat pane. Each shows the tool, its input, and a compact result — enough to see what the agent touched without opening the file tree.

Motion transport​

Motion artifacts get a different viewer, because a timeline needs a transport rather than slide navigation.

ControlAction
Compose / Rendered tabsEdit-time preview vs the rendered MP4
Play / pauseDrive the playhead
ScrubSeek continuously
Frame stepMove one frame at a time
RenderRun the MP4 render from the viewer

Preview and render share one mechanism: both write the --od-t custom property. What you scrub is exactly what the renderer captures — that is the point of the data-od-* contract, and it is why scrubbing never drifts from the final output.

When a composition declares media layers (data-od-src), the compose tab shows the DOM layer only. Video and audio layers are composited by ffmpeg at render time.

See Motion.

Design system preview​

Opening a design system before selecting it shows:

  • DESIGN.md — the nine sections, rendered.
  • Swatches — the palette with hex values.
  • Component showcase — components.html rendered with the tokens.
  • Design spec — a structured token view.

File workspace​

The file panel shows the real on-disk project tree:

ActionNotes
BrowseFolder tree of the project working directory
OpenSyntax-highlighted viewer; HTML gets the preview
EditManual edit mode with undo/redo (⌘/Ctrl+Z)
DownloadPer-file chips
SearchProject-wide search
VersionsPer-file version history with restore
⌘/Ctrl+PQuick switcher over all project files

Version history​

Every saved file keeps snapshots with an id, timestamp, source (manual / agent), and label. You can read an old version and restore it in place — from the app, or from the CLI:

tfdesign files versions <projectId> index.html
tfdesign files version-read <projectId> index.html <versionId>
tfdesign files version-restore <projectId> index.html <versionId>

The same history is available over MCP with list_file_versions and get_file_version.