Quality gate & brand art
Headless render check, auto-repair and generated imagery. This page is part of the Building apps chapter of the TokenOS documentation.
- Build quality gate & brand art Two v5 additions make sure what you see in the preview is a working product: a headless render check that catches runtime errors before a build is called done, and brand art generation that replaces imaginary image paths with real assets. Render gate Delivering a degraded build is deliberate: you keep the files, the plan and the preview URL, and the badge tells you precisely what failed. Two rounds is the limit so a stubborn error does not silently burn credits. Brand art Generated apps reference imagery like /media/hero.png or /media/logo.svg . Before the preview is built, every such reference is resolved to a real file: Raster images (hero, feature, backgrounds) are generated with Google's Gemini image model ( gemini-3.1-flash-image-preview , “Nano Banana”) from a prompt derived from the product plan and design system. Capped at 4 AI images per build ( MAX_AI_IMAGES ).
- SVG assets (logo, icons, extras) are produced procedurally from the design tokens so they are crisp at every size.
- References are normalised to relative media/… paths so they work in the preview, in hosted copies and in a downloaded project.
- Bytes are stored in project_assets with a disk cache and materialised into <preview>/media/ ; Go Live and static deploys carry them along.
If image generation is unavailable, a tasteful generated placeholder in the app's palette is used so layouts never break — the badge and the build log tell you when that happened.
Related checks
After the Vite bundle is written, a headless Chromium (Playwright) loads the preview exactly as the IDE iframe would, with the wallet bridge in no-op mode.
Console errors, uncaught exceptions, failed module loads and React render errors are collected; a screenshot is captured once the app settles.
If anything blocking was recorded, the errors plus the offending files are sent back to the model with repair guidance. The preview is rebuilt and re-checked. Up to 2 rounds (RENDER_GATE_MAX_ROUNDS).
The final status is stored in result.render and shown as the Render badge in the IDE. The task is only marked completed after this step.
Mounted with no blocking errors on the first attempt.
Errors were found and fixed automatically within the repair rounds.
Review the change list; the repaired files are listed.
Preview has runtime errors that two repair rounds could not fix. The build is delivered, but flagged.
Click Fix it (pre-fills a repair prompt with the exact errors) or Re-check after your own edit.
The check could not run (bundler unavailable, timeout).
Open the preview manually; Re-check when the environment is back.
Wait — Mission Control streams the rounds.
Why a build can be “completed but flagged”
Lint gate on deploy: the ruff blocker set (E722, F601, F821, F823, E9) must be clean on the backend and oxlint on the frontend.
Protected runtime files are never passed through the JSX sanitizers, which previously caused “address is not defined” failures.
Harness verification adds an isolated LLM evaluator and a Jev acceptance check on top of the render gate.
Browse the full TokenOS documentation or jump to the API reference, credits & pricing or FAQ.
About TokenOS
TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.
Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.