Repository navigation
Declare the bot's live preview (saas-parallel-baselining PB4) - #6
Merged
Merged
Conversation
orun.work's Preview tab shows a coding session's dev server, live from its
box: `orun preview` (orun v2.96.0) runs what a repository declares, and the
session keeps it running while it works.
- apps/bot/component.yaml: spec.preview. It installs this app's packages
only (--filter "@app/bot..."), builds the libraries the Worker imports
from their dist/ (packages/*, the pages among them), then runs
`wrangler dev --local` on 127.0.0.1:8787 with local KV; the tab opens
/, the bot's home page, whose /rpc answers. `--local` keeps remote
bindings off: Workers AI has no local mode, and wrangler would otherwise
open a remote session that needs a Cloudflare credential and stop
without one. wrangler refuses a port that is taken rather than moving.
- intent.yaml: preview: {component: bot}.
- baseline.yml: orun v2.88.0 -> v2.96.0, the first release that reads
spec.preview, so the placement's `orun validate` checks it. ci.yml (the
bot's own lane pin) is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z
ruehowl
marked this pull request as ready for review
November 4, 2026 20:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The baseline declares its live preview, so orun.work's Preview tab can show a coding session's dev server (saas-parallel-baselining PB4).
apps/bot/component.yaml:spec.preview:intent.yaml:preview: {component: bot}..github/workflows/baseline.yml: orunv2.88.0→v2.96.0, the first release that readsspec.preview, so the placement test'sorun validatechecks the declaration.ci.yml(the bot's own lane pin,v2.78.4) is unchanged.Nothing about how the baseline builds or deploys changes.
Checked
From a clean clone, with orun v2.96.0, and through a local stand-in of the preview gateway (the dev server sees a local
Hostand the browser's ownOrigin; the page is framed from a foreign origin):orun validateorun preview start --jsonreadyin 40.8 s (warm pnpm store)GET /Host+Originstraight to the dev serverorun preview stopgen-component-docs.py --checkNotes
packages/webis the bot's pages (a Vite single-page app built into one HTML string that@bot/coreserves at/,/help,/init,/admin), not a component of its own. Its Vite dev server alone has no/rpc(it proxies one only to a deployment named inCTW_DEV_TARGET, a per-product value), so the preview runs the Worker, which serves the pages and answers their/rpcfrom local KV — the page a person opens on a deployed bot.@bot/coreand the other libraries from theirdist/, so the preview builds them first (pnpm --filter "@app/bot^..." run build, as the Worker's own build does through turbo); that is most of the start time. An edit underapps/bot/srcreloads the Worker (the check edited the bot's name,apps/bot/src/identity.ts); an edit underpackages/shows after the libraries are rebuilt (a restart). A server-rendered page has no live reload, so the tab shows an edit on its next refresh.wrangler dev --local(the app README'sdev:local, "no account: local KV, no Workers AI"). Without it wrangler starts a remote proxy session for theAIbinding, and with no Cloudflare credential in the box it fails and exits. The Telegram secrets are never in a preview, so the home page saysTELEGRAM_TOKEN is not setand the bot answers no chat.Address already in use), so the preview fails rather than moving.Generated by Claude Code