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..." && exec node_modules/.bin/vite --force --host 127.0.0.1 --port 5173 --strictPort
      port: 5173
      path: /
      env:
        NODE_OPTIONS: --max-old-space-size=512
  • 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 19.7 s (warm pnpm store)
GET / 200, 3.3 KB, "Atomic CRM"
foreign Host + Origin straight to the dev server 403
through the gateway stand-in, framed frame 200; requests in flight cancelled (net::ERR_ABORTED) by Vite's one dependency-optimizer reload, none refused; hot-reload socket connected
an edit reaches the frame hot update in 1.0s
memory dev server 1102 MB at its peak (page compiled, after an edit); the install peaks at 1165 MB
orun preview stop stops it; port freed

Console errors in the frame: Failed to load resource: net::ERR_CONNECTION_REFUSED

Notes

  • The preview is the app's own dev script (vite --force), run directly with --host 127.0.0.1 --port 5173 --strictPort over vite.config.ts's host: true: the CRM's single-page app only. Its Worker (dev:worker, Hyperdrive, the /functions the dev server proxies to 127.0.0.1:8787) is not started, so no Hyperdrive connection string is needed. Nothing is added to env.
  • What it cannot show: the CRM behind sign-in. The dev server reads .env.development (a local Supabase at 127.0.0.1:54321, the Supabase CLI's default), which a preview does not have: the browser's call to it is refused (the one console error), and the app shows its first-run page, "Create the first user account", which cannot complete. The sign-in, sign-up and every other page's code still hot-reloads.
  • The cancelled requests are all net::ERR_ABORTED: vite --force re-bundles the dependencies on every start, and on the first page load Vite finds more of them and reloads the page once ("optimized dependencies changed. reloading"), cancelling the requests in flight. With a warm dependency cache the same frame loads with no failed request. A foreign Host straight to the dev server gets 403 from Vite's allowedHosts; the gateway forwards with a local Host (127.0.0.1:5173), so no allowedHosts change is needed.
  • Memory: ~1.1 GB, all in the one Vite process (dependency pre-bundling of react-admin, Radix, nivo …); the 512 MiB cap bounds only its V8 heap.

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 app's own `vite --force` (the
  CRM's single-page app, not its Worker) on 127.0.0.1:5173 with
  --strictPort (fail, never move to another port) and 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 20:54
@ruehowl
ruehowl merged commit 2cee0a8 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