<UI>. The UI still
runs in the browser, talks to the Gateway through gateway-react, and can
keep the same .smithers/ui/<workflow>.tsx file: only ownership changes. The
workflow TSX names the UI entry, so any Gateway that registers the workflow
serves the right UI without out-of-band launcher code.
Before
Older launchers mounted UI from the Gateway side:.smithers/gateway.ts
.smithers/ui/release.tsx
file; an explicit workflow declaration replaces it.
After
Add<UI> inside the workflow’s root <Workflow>:
.smithers/workflows/release.tsx
ui option:
.smithers/gateway.ts
entry paths resolve relative to the workflow file when entryFile is
provided; existing self-mounting UI files ending in
createGatewayReactRoot(<App />) can stay as-is.
Entry vs Source
Useentry for existing Gateway UI files:
source for a browser-safe module that exports a React component; the
Gateway mounts it with React and passes props plus boot metadata:
source at the workflow module itself: it often imports Node/Bun
APIs, agents, prompts, and database setup that can’t run in the browser.
Checklist
- Add
UIto the workflow’ssmthrsimport. - Add
<UI entry="../ui/<workflow>.tsx" title="..." />as a direct child of the root<Workflow>. - Remove
ui: { entry, title }fromgateway.register; keepentryFile. - Leave the browser UI file in
.smithers/ui/<workflow>.tsxunless converting it to thesourcecomponent-export shape. - Verify with
bunx smthrs gatewayand open/workflows/<workflow>or runbunx smthrs ui RUN_ID.
<UI> during register(); the component renders nothing
into the workflow graph and never executes client code on the backend.