Skip to content

Declare the site's live preview (saas-parallel-baselining PB4) - #6

Merged
ruehowl merged 1 commit into
mainfrom
claude/declare-preview
Nov 4, 2026
Merged

ruehowl merged 1 commit into
mainfrom
claude/declare-preview

Conversation

@ruehowl

@ruehowl ruehowl commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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/web/component.yaml: spec.preview:
    preview:
      run:
      - sh
      - -c
      - pnpm install --frozen-lockfile --prefer-offline --filter "@app/web..." && node_modules/.bin/vite build && { node_modules/.bin/vite build --watch --logLevel warn & } && exec node_modules/.bin/wrangler dev --local --ip 127.0.0.1 --port 8787 --show-interactive-dev-session=false
      port: 8787
      path: /
      env:
        NODE_OPTIONS: --max-old-space-size=512
        WRANGLER_SEND_METRICS: 'false'
  • intent.yaml: preview: {component: web}.
  • .github/workflows/baseline.yml: orun v2.88.0 → v2.96.0, the first release that reads spec.preview, so the placement test's orun validate checks the declaration. ci.yml (the product's own lane pin) 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 Host and the browser's own Origin; the page is framed from a foreign origin):

Check Result
orun validate passes
orun preview start --json ready in 12.1 s (warm pnpm store)
GET / 200, 0.6 KB, "AI Agent Visibility — be readable on every agent surface"
foreign Host + Origin straight to the dev server 200
through the gateway stand-in, framed frame 200, no failed assets, hot-reload socket not opened
an edit reaches the frame no live reload; the server reloaded the edit, shown on a refresh (20.7s)
memory dev server 845 MB at its peak (page compiled, after an edit); the install peaks at 976 MB
orun preview stop stops it; port freed

Notes

  • This site has no Vite dev server: its pnpm dev is vite build && wrangler dev --local, the Worker serving the built dashboard. The preview runs the same, with the binaries called directly, plus vite build --watch in the background (the pattern mcp-stytch-todo's scripts/dev.mjs uses): an edit to src/react-app rebuilds dist/client, wrangler sees the new assets and reloads, and the next load of the page shows it. No page reloads itself (see below). orun preview stop stops both processes (they share the preview's process group); none is left behind.
  • --live-reload was tried and left out: wrangler refuses its reload WebSocket (/cdn-cgi/live-reload, 403) from the preview's Origin, and the page retries it without end.
  • --local, as pnpm dev has it: Workers AI is remote-only, so each page is enriched by upstream's fallback and the model is never called; the KV store is local. No ADMIN_TOKEN, so POST /api/resources and /api/refresh answer 401, as upstream ships. wrangler refuses a taken port; it does not check Host, so a foreign Host gets 200.
  • A page loaded in the second or so between a rebuild and wrangler's reload can get a 500 for the old bundle; the next load shows the edit.
  • Memory: ~0.27 GB workerd, ~0.25 GB the vite build --watch, the rest wrangler and its helpers.

Generated by Claude Code

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/web/component.yaml: spec.preview. It installs this app's packages
  only (--filter "@app/web..."), then runs the site's own `pnpm dev` (build
  the dashboard, then `wrangler dev --local`: a local KV store, remote
  bindings off, so Workers AI is never called) on 127.0.0.1:8787, with a
  `vite build --watch` beside it so a dashboard edit rebuilds dist/client
  and wrangler reloads on it; a 512 MiB heap cap; the tab opens /.
- intent.yaml: preview: {component: web}.
- 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
  product'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
ruehowl marked this pull request as ready for review November 4, 2026 21:01
@ruehowl
ruehowl merged commit a5e0582 into main Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants