App interfaces
App interfaces from the built-in skills in Executor 2.0.0-beta.79.
This page covers Private app UI from the built-in skills shipped with Executor 2.0.0-beta.79. It contains app-authoring/ui.md.
Next: App interfaces · Desktop app
Private app UI
Author app UIs as React SPAs. React is the only supported UI framework for now.
Add ui/index.html, a module script such as ui/main.tsx, and styles. The host
compiles browser assets alongside the server build. Declare react and
react-dom in the app’s package dependencies. The local product opens
each configured app on its own localhost subdomain.
Use local React components or browser-compatible npm component libraries. Declare library dependencies and include their required styles and assets. Do not assume that the host runs custom build plugins required by a library.
Tailwind CSS v4 compilation is built in. Import ./style.css from ui/main.tsx
and start the stylesheet with @import "tailwindcss";. No Tailwind dependency,
config file or build script is needed. Use complete class names in React code;
the build scans the browser bundle, including imported components and lazy
chunks. Customize tokens with CSS @theme. Use @source inline("...") for
classes supplied only at runtime. Do not use filesystem @source paths or
JavaScript @config and @plugin files. Plain CSS and library styles still work.
The full Tailwind import includes Preflight, which resets browser button and
form styles. Importing only theme.css and utilities.css omits those resets;
use that split only when you supply the required base styles yourself.
For hosted apps, discover and call appUi.location after deploying:
return await tools.executor.appUi.location({
path: { organization: "<approved-organization-id>", app: "<app-id>" },
});
The response is
{ status: "ready", url: "https://<app-slug>.<org-slug>.executor.website", name, icon, menuBar }
on Executor Cloud. Self-host uses its configured app domain. name is the
app’s name for a window or launcher; icon and menuBar say whether the active
version has ui/icon.svg and ui/menubar.html (see Desktop app below). Use the returned
URL rather than constructing one. Before the first deploy it fails with
AppNotDeployed. status: "unavailable" has url: null and a reason:
"no_ui" when the active version has no UI, as for tool-only apps, or
"no_app_domain" when the host has no app domain (on self-host the operator
sets EXECUTOR_APP_UI_BASE_URL; a localhost dashboard needs none). "pending" and "failed"
report the setup of the team’s app domain. Deploying builds and activates the UI;
there is no separate publish step. Give the URL to the user to open in a
browser. The browser completes sign-in using their Executor session. MCP
credentials do not grant a browser session. A 403 response alone does not
prove the URL is correct or that the UI renders; invalid hosts also return it.
Verify the actual page before claiming that the UI works.
Use an available authenticated browser session for that check. A fresh profile
may stop at sign-in. Successful tool calls or rows added by someone else do not
verify the page’s layout, controls or optimistic interactions.
Import createAppClient, queryReference, and mutationReference from
apps/client. Import server operation types only from index.ts; put shared
schemas in a separate file. Use client.queryAtom(reference, input, outputSchema)
with useAppQuery from apps/react, and client.mutate(reference, input, outputSchema) for explicit writes. client.query(reference, input, outputSchema)
reads once. Both operation types may fetch external APIs. External changes do
not invalidate subscriptions, and rolling back a SQL transaction cannot undo
external effects. All callbacks use Promises; the framework runs Effect internally.
Do not include an app ID or credentials in browser code. The host binds both
identity and authentication. Compiled imports and ui/public/ files are retained
with the version. Import images and fonts from scripts or CSS. In ui/index.html,
reference files with relative URLs. From script code, request ui/public/ files
by absolute path, such as fetch("/data.json"). The page has no <base>, so
links, # fragments and history URLs resolve against the page itself. Each
activation automatically reloads open pages. SSR, React Server Components and
public sharing are not part of this version.
ui/index.html is the app’s main page. Build further screens as React routes:
any path without a dot serves that page. App responses send
Content-Security-Policy: frame-ancestors 'none', so no page can be framed,
not even in an <iframe> on the app’s own origin.
ui/public/ files are served at the page’s origin exactly as they are, with
their content types: scripts, styles, JSON, web manifests, images, fonts, audio,
video, .wasm (application/wasm), .glb models and .html pages among
them. Unknown extensions are application/octet-stream. They may be binary.
ui/index.html may load a prebuilt script or stylesheet from ui/public/
directly, such as <script type="module" src="/assets/index.js">; it is
served as it is, not compiled. A compiled file may not take the path of a
public file. Public files support byte ranges and revalidate against their
content, so media seeks and unchanged files are cheap. Each version serves
its own files; activating an older version serves its files again.