Skip to content

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

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/nuxt dev --host 127.0.0.1 --port 3000 --strictPort
      port: 3000
      path: /
      env:
        NODE_OPTIONS: --max-old-space-size=512
        NUXT_TELEMETRY_DISABLED: '1'
  • 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 site'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 16.5 s (warm pnpm store)
GET / 200, 23.0 KB, "Nuxt Boilerplate"
foreign Host + Origin straight to the dev server 403
through the gateway stand-in, framed frame 200, no failed assets, hot-reload socket connected
an edit reaches the frame hot update in 0.5s
memory dev server 816 MB at its peak (page compiled, after an edit); the install peaks at 1105 MB
orun preview stop stops it; port freed

Console errors in the frame: Nuxt DevTools: Failed to check parent window; SecurityError: Failed to read a named property 'NUXT_DEVTOOLS_DISABLE' from 'Window': Blocked a frame with origin "http://abc123def456.orun-preview.app:13000" from accessing a cross-origin frame.
at http://abc123def456.orun-preview.

Notes

  • --strictPort (@nuxt/cli 4.0.1): tried on a spare port held by another listener, nuxt dev --port 3999 printed "Port 3999 is in use, using port 3001 instead" and served there; with the flag it exits 1 ("Port 3999 is already in use (--strictPort is enabled)"). orun also refuses to start a preview whose port is in use.
  • Nuxt binds the port at once and answers with its loading page (503, "Starting Nuxt…") while the first build runs; the page reloads itself into the site when it is ready. So ready (16.5 s, the port answering) comes before the first 200 at / (25.4 s). The check above framed the site after its first 200.
  • Hot reload: Vite's socket is on the dev server's own port (/_nuxt/?token=…), not a separate 24678, so it works through the single forwarded port (connected through the stand-in; an app.vue edit hot-updates in 0.5 s). A foreign Host straight to the dev server gets 403 from Vite's allowedHosts; the gateway sends Host: 127.0.0.1:3000, so no change is needed.
  • Nuxt DevTools (on in nuxt.config.ts, unchanged) cannot work inside a cross-origin frame: it logs "Failed to check parent window" (it reads a flag on window.parent) and its server ignores the frame's cross-origin RPC connection. The site itself is unaffected.
  • Memory: ~0.82 GB: nuxt dev ~0.62 GB, its forked Vite/Nitro child ~0.07 GB, and ~0.12 GB of workerd for Nitro's Cloudflare dev emulation (wrangler's platform proxy over wrangler.jsonc).

https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z


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 `nuxt dev` on 127.0.0.1:3000
  with a 512 MiB heap cap and Nuxt's telemetry off; the tab opens /.
  --strictPort makes it exit rather than move when 3000 is taken (without
  it Nuxt moves to the next free port). Its hot reload socket is Vite's, on
  the same port (/_nuxt/), so it works through the one forwarded port.
- 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
  site'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:59
@ruehowl
ruehowl merged commit 26e4914 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