CodelabDocs

Glossary

The words used to build with Codelab.

The shared vocabulary used in Codelab, its documentation, and its code.

Structure

App: A collection of pages and shared resources.

App target: Whether an app is a Web app or a Native app. The client that creates the app sets it, the website Web and the native app Native, and it never changes.

Codelab app: Codelab's own app, holding the COSS particles, the Brand Guide and the docs. It keeps the same id on every stage.

Locale: A language a published site can serve, with its script or region where the written form differs, such as en, zh-Hant-HK or pt-BR. The set is project.inlang's, which the locale module and each Vite app compile with Paraglide, and en is the base locale.

Locale slug: The URL prefix that serves a locale on every published site, such as zh-hk in /zh-hk/about. The base locale has none. A page's first route segment cannot be a locale slug.

Default locale: The locale an app's pages are written in, one of the locales it serves. A visitor asking for a locale the app does not serve is sent to it.

Current locale: The locale a page is rendered in, {{locale}}: the served locale on a published site, or the canvas's route locale in the builder.

Language switcher: A repeat over {{app.locales}}, one row per locale the app serves: its tag (locale), its own name (name), this page's absolute URL in that locale (href), and whether it is the current (isCurrent) or the default locale (isDefault). Following a row's link loads the page in that locale.

Translation: An element field's text in one of the compiled locales, stored per element, locale and field path. It is current while its source hash matches the field's text in the default locale; its status is derived from that match, never stored. Export, import, sync and clone copy it with its element.

Translatable: A field whose text is human text, which an app translates into its locales: a flavored Text field such as children, or a plain Text field marked translatable, such as alt, placeholder or aria-label. Only static text is translatable: a value bound to an expression never is. Identifiers, references, styles and selection keys (id, href, className, value) are not.

Translation unit: One translatable field's static text in an app's default locale, with the element and field path it sits at. A blank text is not one. Translating an app into a locale sends each distinct text of its units once, under a key, and replaces that locale's translations with what comes back for each unit's key, each with the hash of its unit's text.

Translation status: A translation's state in one locale, derived on each read and never stored: current while its source hash matches the field's default text, stale once that text has changed, missing with no translation (the field shows its default text), or bound when the text has a binding, which keeps it in the default language. The Props panel's Translations section shows it for each field and locale.

Page: An element tree in an app's route hierarchy. A Page is either a leaf or a Layout.

Layout: A Page that wraps child Pages and chooses where their content appears.

Outlet: The point in a Layout where its selected child Page appears.

Element: One node in a page or component tree. It has a kind, props, styles, and children.

Tree: Elements arranged as parents and children. A subtree is an element and its descendants.

Kind: The primitive or component an element renders.

Primitive: A supplied building block. Primitive elements form component trees; primitive functions form action chains.

Registry: A catalog of supplied primitives: element kinds with their props, or functions with their parameters.

Family: The library a primitive kind comes from, such as HTML, COSS, or Codelab. A primitive kind is a family and a name; a name is unique only within its family.

FamilyKind: A primitive kind's identity: its family and its name in that family, such as COSS Button. An element's primitive kind is a FamilyKind tagged Primitive, and a style rule's selector is a FamilyKind.

MUI: The Family of components from Material UI (@mui/material).

Ant Design: The Family of components from Ant Design (antd).

Chakra UI: The Family of components from Chakra UI (@chakra-ui/react).

SwiftUI: The Family of native iOS views from Expo UI (@expo/ui/swift-ui). They have no web build, so the web canvas draws each one as a placeholder captioned with its family and kind.

Jetpack Compose: The Family of native Android views from Expo UI (@expo/ui/jetpack-compose). The web canvas draws them as placeholders, like SwiftUI kinds.

Expo UI: The Family of cross-platform native views from Expo UI: the @expo/ui entry, which draws SwiftUI on iOS and Jetpack Compose on Android, and the @expo/ui/community drop-ins that are not already in it. The web canvas draws them as placeholders, like SwiftUI kinds.

Family provider: The library-level provider a Family's components need around the page, such as MUI's ThemeProvider. A page renders inside the family providers of the families its kinds come from; the file tree shows each as a read-only Provider row at the page root.

Component: A reusable element tree with an interface for its props.

Component key: A component's id and name, which identify it uniquely.

Component label: Optional expression over an instance's props, shown beside that instance in the Explorer. Not unique; unlike the component key, it only labels.

Instance: One use of a component, with its own prop values and component state.

Convert to component: Moving an element and its subtree into a new component, and putting an instance of it where the element was. The moved elements keep their ids, props and bindings. One step in the app's history.

Repeat: A subtree rendered once for each item in an array.

Conditional rendering: A condition that determines whether an element and its subtree appear.

One Card component can have two instances, each with a different title.

Data

State: The current values used by an app, page, or component.

Store: A named collection of state fields and actions, scoped to an app, page, or component.

Scope: Where a store or hook is available: an app, page, or component. A hook can be shared across selected pages.

Prop: A named value supplied to an element or component.

Render keys: An element's own keys that decide whether it renders (renderIf) and how many times (repeatable, repeatSource). They sit beside its props, and no prop takes their names.

Field: A named declaration with a type and an optional default value.

Type: The values a field accepts, such as Text, Number, or Boolean.

Interface: A list of fields describing a set of named values, such as component props or function inputs.

InterfaceField: A field that is an entry of a stored, editable interface, with an id that identifies it in that list. Fields nested inside a type have no id: they are part of their parent field's document.

Schema: A named interface that can be reused within an app.

Expression: A value computed from the current context, such as {{stores.counter.count}}.

Namespace: The first name in an expression, such as stores, props or page, and the value it names: {{page.id}} reads id from the page namespace. The host fills the platform namespaces (session, page, locale, app); the element tree, stores and hooks around the expression fill the rest.

Expression context: Every namespace's value for one evaluation of an expression. Each renderer and action runtime fills the context it evaluates in.

Binding: A reference to a component, element, function, or file. Component bindings can supply props; function bindings can supply arguments.

Local id: The name a write call gives an element it creates, # then a name (#card), so the call's other entries can refer to it before the host mints its id (as in JSON:API's lid). An id never holds #, so a reference field takes either; a local id is never stored.

File: An image an app owns: uploaded, imported from a URL, or generated for it. An image prop or app setting binds to a file.

Image model: The AI model that generates an image for a file, such as Nano Banana 2 or GPT Image 2.5 Flare. generate_image and the image props panel pick one from the same list.

Image generation: The background work that generates the images one call asks for, after it is saved, and sets them on their elements in one undo step: each CodelabImage with a prompt and no src in add_elements, create_page or create_component, or generate_image on an existing element. Each element shows its placeholder until its image lands, and keeps it if generation fails. The newest request of an element wins. An element removed before its image is generated is not billed; one removed after leaves the call's images unset, as update_props refuses a write to a missing element.

Jsonb row: A table row kept as one JSON object inside another row's jsonb column, keyed by the schema's column names. A checkpoint keeps its app's rows (pages, components, elements, style rules and the rest of its structure) as jsonb rows.

Jsonb recordset: Jsonb rows read back as typed rows, so they can be written to their own table again. Restoring a checkpoint upserts its jsonb recordset.

Checkpoint: One step in an app's history: the app's rows as jsonb rows, taken before an edit, with the edit that followed. Undo restores the checkpoint before the current one. Its operation column names the kind of edit (add_class, update_element).

Checkpoint command: What a checkpoint's data holds (CheckpointCommand, history core): the edit's Command as the module that ran it received it (operation), the app's rows (snapshot), and what the edit changed (target). The server builds it from the Command; no entry point sends a checkpoint. A checkpoint with no edit (the Initial one, an agent batch) holds no Command.

Checkpoint target: What an edit changed, as History names it: an element's kind and its aria-label ({ kind: "button", ariaLabel: "Save" }), or a style rule's selector. An edit of several elements names the first.

Theme variable: A Tailwind theme variable an app names itself, in one of Tailwind's namespaces: color-brand, spacing-gutter, animate-dash, the name without --, with a CSS value. Its namespace's utilities then read it (bg-brand, p-gutter). The catalog's tokens are not theme variables; they change token by token.

Keyframes: The stops of an animation an app defines (dash), each styling its offsets (0%, 100%) with CSS declarations; @keyframes dash in the theme's CSS. A class plays it: animate-[dash_2s_linear_infinite], or animate-dash once a theme variable animate-dash names its timing.

A field declares title: Text. A prop supplies title: "Hello". An expression computes a value. A binding selects a target. A store's scope decides where it exists; {{stores.cart.total}} reads it through the stores namespace. Scope is where something exists; a namespace is where an expression reads it.

Behavior

Event: An interaction or change, such as a click or an input value changing.

Function: A callable operation with inputs and an optional output. A binding can call a primitive function, an action, or a hook method.

Action: A named, reusable chain of function calls on a store. Calls run in order; the last call supplies the result.

Parameter: A declared input to a function or action.

Argument: A value supplied for a parameter when a function or action is called.

Hook: Configured behavior that provides values or methods, such as form state, query results, or a reference.

Render prop: A callback whose result is an element subtree. Its inputs are available to that subtree through render expressions.

A button's onClick prop can bind to an action. The action calls functions to update state or navigate.

Delivery

Maestro: The test runner that drives the native app on an iOS simulator, one flow per spec step.

Fixture: Data a test, screenshot or demo-video take creates for itself. It supports that scenario only and is never an invariant the app depends on; that is a seed. A test creates a fixture app.

Export: Read data out of a database as JSON: an app export file (each page and component with its element tree, plus the app's other rows), or the particle files pnpm cli particle-export writes. An export implies nothing about what the data is for.

Import: Write JSON into a database, with no invariant implied: uploading an app export file on the dashboard imports that app. pnpm cli app-sync exports an app from one stage and imports it into another, in memory, with no file.

Seed: Write data the application depends on as an invariant into a database, such as the particles or the Codelab app, from code or from JSON. What makes a write a seed is the invariant, not the source format. pnpm cli seed runs them: seed particles writes the committed particle snapshot onto test, and seed codelab-app creates the Codelab app when it is missing.

Fingerprint: The content hash of what a seed or fixture last wrote on a stage, stored per kind and name. A seed skips writing when its fingerprint is unchanged.

PR check: The fast, cheap check before a PR is called ready, run before every push: a current lockfile and Nx sync, and on each affected project a clean worktree, formatting, Oxlint (vocabulary included) and typecheck, and the unit tests whose own files changed (test:unit: test without *.db.test.ts). It does not run a dependent's tests. pnpm nx affected -t pr-check test:unit runs it.

PR gate: The full, costly gate: a frozen install, the affected Nx checks, build and test, then the builder e2e. The owner runs it now and then to check the repo's state, not on every PR or merge. pnpm pr runs it.

LLM spec: A Vitest spec that calls a live model (*.llm.test.ts), to measure how a real model uses the Agent's prompts and tools. test:unit never runs it; a package's test:llm target does, and each run that misses the cache pays for the model's tokens. A spec that calls another external service, such as Clerk, is an integration spec (*.int.test.ts, test:int).

Integration spec: A Vitest spec that calls a real outside service other than a model, such as Clerk (*.int.test.ts). test:unit and test:db never run it; a package's test:int target does, with the keys of one pulled stage. It stays apart from an LLM spec because it costs nothing per run.

Code smell: Code a reviewer would ask to restructure though it works: an ad-hoc type shape, regex and string surgery, a loop that accumulates, a prose error in a layer that should throw a typed one. The codelab/* Oxlint rules warn on the precise kinds; pnpm cli smells runs the noisier checks by hand. The codelab-code-smell skill says what to write instead.

Check: A scan of one kind of application data on a stage for what breaks its rules, with an optional fix. pnpm cli check runs every check, read-only unless given --fix; trees checks element trees against the tree rules.

Finding: One thing a check looked at (CheckFinding): a page or component, the problems it has (none when it passes), and the repair a fix makes or would make, or why none can.

Access

Guest: A visitor with no signed-in account, such as someone viewing the landing showcase. Guest requests run as the database's guest role, which can read only what public surfaces show.

User: A signed-in account. User and admin requests run as the database's authenticated role, limited to that account's rows.

Admin: A user whose role grants admin-only settings in Builder, such as an app's custom subdomain.

App member: A user an app's owner or another member invited to that one app. Every member has the owner's privileges: they read and edit the app's content, rename it, set its domain, delete it, and add and remove members. Nobody, the owner included, changes who owns it (apps.user_id); the owner is not an app member. Stored in app_members.

App access: Whether a user can work in one app: the owner and every app member can, anyone else finds no app (NotFoundError). There is one level. An entry point whose operation has effects outside the database (the Supabase connection, image generation, file storage, translation, running a function) and the app's own row (rename, domain, delete) check it with authorizeApp before the operation runs: appAccessMiddleware on a server function, appAccessRequestMiddleware on an API route. Services check none. Row-level security stays beneath it (accessible_apps): a row the caller cannot access is not found, and a write to one changes nothing.

App invitation: An email an app's owner or any app member invited to that one app, which belongs to no Codelab user yet. Held in Clerk, not in our database: a Clerk invitation whose public metadata names the app and the inviter, and Clerk emails it. There is no role: the invitee gets the owner's privileges like every member. The invitee's first sign-in with that email verified turns each of their app invitations into an App member, its inviter kept, and revokes the ones still pending. Any member can invite: they list, create and revoke the app's invitations. An email whose Codelab user has it verified adds that user as a member at once instead; the owner and existing members are refused.

Privacy policy: The landing page at /privacy stating what data Codelab collects, which services process it, and how to reach privacy@codelab.app.

Google Analytics: Google's page-view measurement on the landing site and the builder in production, identified by its measurement ID. Published apps never load it.

Architecture

Entry point: A way into Builder's operations. There are four: the UI (the Workspace and its controls), the Agent (the AI chat and the tools it calls), MCP (the tools an outside agent calls) and the CLI (pnpm cli). Each is a thin adapter: it parses its input into a command, calls the operation every entry point shares, and shapes the result for its caller. Lookups, checks, loops over commands, error aggregation and pricing rules belong to the operation, not the entry point, so two entry points never disagree. The one rule an entry point owns is its App access: its middleware checks it before the operation runs. create_env_var is one: the Agent and MCP share createEnvVarServerTool (packages/modules/builder/server/src/ai/app-resource.server.tools.ts), which parses the input, calls the createEnvVar service and returns the new variable's id, and the UI's RPC (env-var.rpc.ts) calls the same service.

Service: One server operation, a function in services/<verb>-<noun>.service.ts. It parses the command with the command's schema, reads what the command lacks through repositories, runs the module's validation, then writes and records the change in history. Every entry point that runs the operation calls the same service. It sends no SQL and holds no business rule: those belong to the repository and the domain layer. packages/modules/page/server/src/services/update-page.service.ts reads the app's pages, asks PageValidation.validateUpdatePage whether the page may move, and writes with PageRepo. A service is server-only: browser code reaches it only through its module's RPC.

Repository: Database access, in *.repo.ts: the queries, the scope and state guards a write checks in SQL, and the translation of constraint errors. It returns records. It holds no product rules or UI behavior and opens no transaction of its own. packages/modules/page/server/src/page.repo.ts holds PageRepo.get and PageRepo.upsert. A repository is server-only: only services and other server code call it.

Domain layer: The models, invariants, transformations, reference rules and factories, in core/**/domain/. It is pure input to output: no database, network, cache or React, and it never changes a value its caller owns. packages/modules/page/core/src/domain/page-tree.domain.ts holds PageTree.validatePlacement, which decides whether a page may sit under a parent.

Application layer: The commands every entry point shares, each with its one Zod schema, and the pure flows that combine domain operations into one operation, in core/**/application/*.application.ts. It holds no React, cache, network or database: a service runs it on the server, a use case in the browser. packages/modules/page/core/src/application/update-page.application.ts is the update_page command, whose schema the RPC, MCP's update_page tool and the updatePage service share.

Use case: The browser's orchestration of one Builder feature, a <Stem>UseCase class in client/**/use-cases/*.use-case.ts. It reads the cache through the cache's helpers, runs application and domain operations, and writes what they return back through those helpers. It uses no React and sends no request: the hook that calls it sends the RPC and reports a failure. In packages/modules/element/client/src/use-cases/add-element.use-case.ts, AddElementUseCase.addElement runs addElementFlow on the cached tree and returns the TreeDiff the hook saves.

Plan: What an application or service function decides before anything is written: the work it computed from the command and the state it read, which its caller then performs. A plan writes nothing, so one that fails leaves nothing to undo. A function that can fail returns its plan as a Result. addRootElementFlow (packages/modules/element/core/src/application/add-root-element.application.ts) returns an AddRootElementPlan (the new root, its props and the tree with it), which the Builder's use case writes to its cache and the server's tree insert saves. Not the Agent's Planning, the steps it takes before it replies.

Result: What an operation that can fail as expected returns, from packages/shared/kernel/src/utils/result.ts: { ok: true, value } or { ok: false, error }. An expected failure is the Result's error, never thrown. A write's validation returns every failure at once, as Zod issues in one ZodError, each at the path of the input it is about: ElementValidation.validateInsertTree returns Result<Plan, z.ZodError>, an issue at elements[3].props naming the call's fourth element. Another expected failure is the operation's typed error, such as AddElementError. Only an entry point turns the error into its own output: an RPC throws it to its error boundary, errorMiddleware, which renders a ZodError as its issues' messages alone, one per line in issue order, each once, and a tool answers { success: false, error: z.prettifyError(error) }. This is errors as values, as Effect has them, without the Effect runtime.

Branded id: An entity id typed as its kind's own brand, ComponentId = string & z.BRAND<'ComponentId'>, so a plain string or another kind's id fails typecheck. The brand is type-only; at runtime the id is a 10-character nanoid, as Postgres checks it. Its write side, built by brandedNanoid in packages/shared/kernel/src/utils/nanoid.write.schema.ts on Zod's z.nanoid, gives ComponentId.schema, ComponentId.parse and ComponentId.generate(); its read side, isComponentId, is nanoidGuard<'ComponentId'>() from nanoid.ts, with no Zod.

Builder

Screen: One stop on the screenshots tour, named by the Screen enum and selected with --screen. What sits under it, such as its tabs and open states, is photographed with it.

Workspace: The complete Builder interface around the editable app, including navigation rails, sidebars, canvas controls, panels, drawers, and overlays.

Shell: A page's frame: a navigation rail, sidebars and a main area side by side, over a status bar. Each area splits into a header and a body; a header is pinned above its body, docked (hidden behind a handle that reveals it on hover), or popped out (floating over the body, moved by its grip). A part that is absent takes no space, so a dashboard page is a main area alone. On mobile, the Shell's drawer frames the page instead, its side area a drawer that slides the page aside.

Orientation: Whether a navigation rail runs vertically, as the Workspace's icon rails do, or horizontally, as a strip of tabs. A rail's item marker and tooltips follow it.

Segmented control: One choice of a few, drawn as a row of icon buttons in a muted track; the pressed button is the value. The style panel uses it for text align, overflow, box sizing and other short scales.

Overlay: A Workspace surface opened by an action that floats over the canvas instead of docking in a sidebar: the Components palette, and on mobile the AI chat's drawer. An overlay is not a panel and has no rail item. On desktop the AI chat is two panels: the left sidebar is the tree of chat titles, and clicking one shows that chat's contents in the right sidebar's AI tab.

Canvas mode: How a page renders: Builder (selects and edits elements) and Preview (runs the page's behavior) are the Workspace's choices, with breakpoints following the canvas width. Published renders it as the published app does, with breakpoints following the device's viewport; a component preview in the builder renders Published with breakpoints following the preview's width.

Full-screen: The internal canvas layout setting that hides Workspace chrome. The Zen mode control uses it with Preview.

Zen mode: Preview canvas mode with Workspace chrome hidden. Entering Zen mode selects Preview and enables full-screen; switching to Builder exits Zen mode.

Editor read-only: An editor restriction that prevents editing content. It is separate from canvas mode and Zen mode.

Workspace view: A derived description of the Workspace as it is currently presented. It does not own or persist the underlying settings, navigation, or app state.

Workspace view intent: A partial desired Workspace view. Unspecified parts remain unchanged; the Workspace reconciles the intent through the same operations used by its visible controls.

Native host: The Codelab native app, hosting the Workspace's canvas in a WebView. It draws its own panels around the canvas, so inside a Native host the canvas is always full-screen.

Bridge: The message channel between the WebView and its Native host. The WebView owns the editing session: it reports a Selection snapshot, and runs each Command the native panels send through the operation its own control uses.

Selection snapshot: The Bridge message that tells native panels what to show: the active container, the selected element with its fields and props (or none), and whether undo and redo are available. Nothing stores it; it is not a history snapshot.

App snapshot: The Bridge message carrying the app's own lists native panels pick from, such as its stores, pages and components. What the registry and the style schemas fix, native reads from those modules instead. The WebView posts it once per session and again when a list changes, so a Selection snapshot carries only the selection.

Tree snapshot: The Bridge message carrying the active container's element tree as the native tree panel lists it: each element in document order with its parent, depth, row label, kind and props, expressions resolved against the app's stores and the session. The WebView posts it when the tree changes. On iOS, a tree with SwiftUI or Expo UI kinds draws from it with native views, over the WebView.

Chat snapshot: The Bridge message carrying the active agent chat as the AI panel shows it: its messages, whether a reply is streaming, any error, and the changes waiting for the user's approval. The WebView posts it as the chat changes, throttled while a reply streams.

Status snapshot: The Bridge message carrying the work state the web status bar shows: the open app's checkpoints and history position, whether edits are saved, the open page's publish state, elements with invalid props, and credits left. The WebView posts it as any of it changes.

Command result: The Bridge's answer to one Command, success or the failure's message, matched to the Command by an id the Native host assigns.

Inline components: A Workspace view setting that exposes component internals as selectable elements while preserving the shared component definition.

Inline layouts: A Workspace view setting that exposes wrapping Layout internals as selectable elements while preserving the Layout and Page structure.

Recipe: A tailwind-variants tv() definition that styles one Workspace component: a slot per styled part and a variant per state. Call sites pass the state; the recipe supplies every part's classes.

Type role: How prominent a piece of Workspace text is within its region: caption, label, body, title or heading, least to most. A Text category or a Recipe picks the role (text-body); the theme decides its size for the device and Density.

Density: How tightly a screen packs its text. Compact is the default, for the Workspace; a screen that is read rather than worked in, such as the Dashboard, is comfortable, with its text half a step larger on a desktop.

Story: A Storybook example that renders one Workspace component in chosen states, kept beside the component in a *.stories.tsx file.

Sound: An audio clip for a demo video, a sound effect or a music track, kept in the private codelab-landing bucket.

Grid track: One row or one column of a CSS grid. Grid columns and grid rows take the same track tokens: a count from 1 to 12, none, or subgrid.

Color: The value of a text, background, border, outline, SVG fill or stroke, accent, or caret style, stored by kind: a keyword, a palette color (white, or a hue at a shade such as red-600), an exact CSS color, or a CSS variable. Only a color's scale composes it into a class, such as bg-red-600/50 or text-[#FF216F].

Color keyword: A CSS word that stands for a color instead of naming one: none, inherit, current, or transparent.

Hue: A color's palette name, such as red, slate, or white.

Shade: A hue's lightness step, from 50 (lightest) to 950. black and white have none.

Angle: The degrees a linear or conic gradient turns, such as 45 in bg-linear-45. A negative angle turns the other way.

Style modifier: The condition a style applies under, such as hover, focus-visible, before, dark, group-hover, data-[state=open], or * for every child. Tailwind calls these variants; here a variant is a recipe's. An element's styles keep each modifier's own breakpoints, so md:hover:bg-white/10 is the hover modifier at md. A breakpoint is not a style modifier.

Agent

Agent: The AI assistant in the Builder. It answers questions about the app and makes changes to it, one change at a time, which the user corrects with the next message. An Agent is of one of two kinds: a Bot or a Worker.

Credit spend: One AI call that cost credits, recorded in credit_spends: what it was for (chat, search, translation, image or logo), its model, and its cost as the provider reported it, or its tokens at the provider's published rates. The plan's 30-day allotment pays first, and the rest comes off the top-up balance in the same write.

Credits exhausted: A user whose credits are spent: what the plan has left over the last 30 days and the top-up balance come to nothing. Every AI call is refused, with the same top-up dialog, until a top-up: the Agent's chat before a prompt starts a turn and before each model call, search, and images.

Microcent: The unit credits are kept in: a millionth of a cent. One AI call often costs a fraction of a cent (a short chat call, about 0.0003 ¢), so spends and the top-up balance are whole microcents.

Dashboard chat: An agent chat that belongs to no app, opened from the Dashboard (the screen listing the user's apps). Its agent lists, creates, updates and deletes the user's apps, each change applying at once except a deletion, which waits for approval, and its tools run on the server instead of on a canvas.

Product record: An app's internal design context, kept as one markdown document: who uses the app and for what, and what design work must preserve. The agent reads it before design work and saves it once the user has confirmed its facts. Visitors never see it, unlike the app's public description.

Run: One agent turn of a chat: the reply to one prompt, through its tool calls and approvals. The harness runs it on the host that holds the chat's session log, and a dropped or reloaded client rejoins it from the log instead of asking the agent again. When that host stops, another host runs the turn again to its end, so a run never stays running after its server died. A run belongs to its chat's user.

Test run: One attempt of an e2e test: a retry is a new test run. A test run is one trace, and its id is that trace's id: its page sends the run's W3C trace context to the app as cookies, and every request's span continues it, the chat's Bot and Worker spans included, so one Axiom trace holds the whole attempt (the Test run timing dashboard reads it). It is not a Run: a test run can hold several of its chat's runs.

Harness: The agent's runtime (TanStack AI's harness). It runs each agent chat as one long-lived session: it makes the model calls, retries a transient failure, caches the prompt, compacts a long transcript, and writes every turn to the chat's session log. A chat's tools, prompts and middleware come from its chat plugin, set up once when the session opens, with what stays the same for the chat (its owner, its app, the owner's MCP servers); each call reads its turn and run (the Workspace outline, the user). Its turn plugin holds only what is one turn's, set up again at every turn: its activity, its tool timings and its trace.

Capability: A value one harness plugin provides and a later plugin reads by its name (TanStack AI's createCapability). The chat plugin provides the chat it read, and each turn reads it from there instead of reading the chat again.

Agent profile: A named configuration of the Agent (TanStack AI's agent profiles): its system prompt and the tools it gets. A chat picks its profile with the agent setting. The registry kinds a profile builds with are the registry's own data, a kind filter found by the profile's name: whole families and single kinds, less the kinds it leaves out. A canvas turn lists only those kinds and refuses a call that writes another. coss-ui, the first, builds with COSS UI, Radix Themes for layout and HTML for structure, and leaves out the HTML that COSS styles (a form's label, a table).

Session log: An agent chat's durable record, in Postgres: its transcript, its settings (the chat's model), and every turn's events. One host at a time holds a chat's log, on a lease it renews; a host whose lease runs out loses the chat to the next host's worker, which resumes the chat from its log.

Input offer: A prompt sent to an agent chat whose session log no host is running, or another host holds. The log keeps it until the host that runs the chat takes it as the chat's next turn, so a prompt sent while a host stops is not lost.

Provider key: A user's own OpenRouter key for the agent, saved encrypted on the server for their account. The agent's turns use it instead of Codelab's key, on every device; the client reads it back only masked (its last 4 characters).

Bot: The kind of Agent the user talks to in a chat. It plans a request into tasks (todo_write), split by feature: each a slice through the pages, components and stores it touches, with what done means for it and the tasks it needs. It starts a Worker for each once what it needs exists, and checks each result against its done-means, links included, against the outlines of what was written.

Task: A unit of a request the user cares about: an item the Bot plans with todo_write, with its own title, a status, its results and the decisions it asks of the user. Tasks are what the user works with, and they live in the Bot's Inbox. A task is not one-to-one with how the Agent does it: chats and Worker runs are the Agent's working detail, which the user does not manage, and one task can span several Worker runs, since a fix is a new Worker. Its title is its own, not a chat's title or a Worker's label.

Inbox: What a Bot has: the list of its Tasks, interleaving the tasks of its different chats, shown as the root item of the Chats tree, the left sidebar's tree of chat titles. The Bot is the Agent that does the work; its Inbox is where the user sees and handles the Tasks.

Worker: The kind of Agent that does one task in the background, started by a Bot. Given the task's title, what done means and a brief with every fact it needs, it changes the app with the chat's server tools and looks up what it needs (element kinds, skill references, the web), then reports. Its target is everything it writes: each page and component, and the app's shared parts when it makes stores, actions, theme or components. It sees only its task and the outlines of its target, read from the server when it starts (load_page_outline reads one again), not the chat. Workers whose targets share nothing run at once, and the Chats tree shows each under its chat. Not TanStack's harness worker (createHarnessWorker), which runs the chats no host holds.

Coding-agent Worker: A Worker whose task a coding agent (Claude Code or Codex) does in the user's own Sandbox, signed in with that coding agent's own login, so it runs on the user's subscription. It writes with the same server tools as a Worker, which run on Codelab in the chat, so the open canvas shows its changes as they happen. It waits up to 30 minutes for the Sandbox, then fails with why; a Worker has 10.

Sandbox: Where the user's Coding-agent Worker tasks run: today a machine the user paired with Codelab in Settings → Sandboxes, by name, with a key of its own. Its Runner runs each task in a TanStack sandbox of its own (defineSandbox), with the Worker's tools as its only tools. Revoking it signs the Runner out.

Runner: The program on a Sandbox (@codelab/runner) that waits for the user's Coding-agent Worker tasks, runs each with the coding agent it names, and answers with the report. It connects out to Codelab and needs no browser tab open.

Command: The unit of work: one intent against one target, such as updating one element or styling one theme selector. It is the one shape every entry point (the UI, the Agent, MCP and the CLI) parses and passes to the operation that carries it out: one <Verb><Noun>Command typed from one <verb><Noun>CommandSchema, in the module's core, such as AddRootElementCommand (packages/modules/element/core/src/application/add-root-element.application.ts). What the operation also needs, such as the state its service read or the user, is a separate argument, not a field on a wrapper. "Input" is not a term we use: no type or schema is named …Input. Most canvas tool calls carry one command; the style_* tools carry a list, one per target, and add_elements one command with a flat list of new elements, one tree in one place; a style command's target is an element or a kind, whose style rule styles every element of that kind. A command that edits properties carries its changes.

Changes: The patch a command carries to edit properties: only the keys to change, where null clears one. A style command's changes are a partial of one style domain's state, and a nested object merges into the current value; props changes replace each named prop whole.

Planning: The steps the agent takes before it makes a change or replies, such as reasoning and looking up element kinds. Planning changes nothing.

Recently added: The elements the agent's last add_elements call added. The canvas highlights them from the first one it streams until the next change: the user's next message, or the agent's next canvas edit.

Approval: The user's decision to apply or reject a call the agent makes. Publishing and deleting an app wait for it, since undo can't reverse them, and so does an image from a pricier model, since it costs money: every other change applies at once, and undo reverts it.

Permission: Whether one agent call runs at once, waits for approval, or is refused, decided on the server from the call's tool and input. An image from the cheapest model runs; one from a pricier model waits.

Server tool scope (ServerToolScope): What a server tool shared by the agent and MCP takes from the one calling it: the user, the user's own transaction for each call, where the records a write saved go, and how the images a write asks for are generated (in the background in an agent chat, in the call over MCP and for a coding agent). A tool that works in an app also takes that app (ServerToolApp), the host's, never the tool's input: a Builder chat's is its app, and an MCP call's is the app it names, as MCP's registration alone adds appId to the tool's input. A host with no app (the Dashboard chat) provides none and has no tool that works in one.

Activity: The timed steps of the agent's current reply, such as connecting tools or generating a response.

Workspace outline: The context of a canvas chat's turn, describing the Workspace for that turn: the current location, the app's pages with their URLs, the active component's data, the Workspace view, and the outlines of the containers on the canvas, the selected element marked. The server builds it when each turn starts (a prompt, a wake, a recovery), from the saved app and the canvas the browser last sent with a prompt: the open page or component and the Workspace view, which the chat keeps in its plugin state. It is never part of the transcript.

Design reference: A real website the agent finds for the user to base a design on, with a screenshot, palette and fonts. The agent takes its layout, spacing, type scale and colour, never its text, brand or images. References come from the Design references MCP server preset (Inspo), which a user switches on in AI settings.

Outline: A container's element tree as indented text for the agent, one element per line with its id, kind, props and content. A page outline shows a Page, including a Layout; a component outline shows a Component. The Workspace outline carries the outlines of the containers on the canvas, and load_page_outline and load_component_outline return one on request.

The agent plans, then makes its change; only publishing, deleting an app and an image from a pricier model wait for approval. Activity shows what the agent is doing until it replies.

On this page