From 7c7c9fa3b1cd4cb57c7d2100b84b30feab3e8a7e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Nov 2026 20:51:14 +0000 Subject: [PATCH] Declare the site's live preview (saas-parallel-baselining PB4) 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 Claude-Session: https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z --- .github/workflows/baseline.yml | 21 +++++++++++++-------- apps/web/component.yaml | 17 +++++++++++++++++ intent.yaml | 7 +++++++ 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/.github/workflows/baseline.yml b/.github/workflows/baseline.yml index ccdbd73..afcc4cf 100644 --- a/.github/workflows/baseline.yml +++ b/.github/workflows/baseline.yml @@ -60,8 +60,11 @@ jobs: # Tier 1. THE BLUEPRINT, READ AND PLACED BY THE BINARY A BOOTSTRAP RUNS. # - # Pinned at the bootstrap floor (BOOTSTRAP.md), not the product's lane pin: - # every test here reads YAML with PyYAML, which parses anything well-formed; + # Pinned at v2.96.0, not the product's lane pin: at or above the bootstrap + # floor (v2.88.0, BOOTSTRAP.md), and the first orun that reads a + # component's `spec.preview`, so the placement's `orun validate` checks the + # product's live preview too. Every test here reads YAML with PyYAML, which + # parses anything well-formed; # only the pinned orun can say whether the document is one a bootstrap can # run. `--status` parses it, validates every hook against the action # registry, compiles every `when` and narration template, and writes @@ -72,15 +75,16 @@ jobs: # then web, enforced — and a --resume that changes nothing). The floor is # v2.88.0 (the task set-up in the background, the landings checked in the # box, the deploy credentials minted in one `secrets` reconcile per - # provider), newer than the product's lane pin (v2.78.4, ci.yml), so the - # product's own plans here read the per-edge `modeRules` as its CI does. + # provider), and the pin is newer than the product's lane pin (v2.78.4, + # ci.yml), so the product's own plans here read the per-edge `modeRules` as + # its CI does. blueprint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: sourceplane/orun-action@v1.2.0 with: - version: v2.88.0 + version: v2.96.0 - uses: pnpm/action-setup@v4 with: version: 10.12.1 @@ -123,8 +127,9 @@ jobs: # stand-in for Supabase's Auth and Storage — its smoke, the app, the # functions (a merge as the signed-in user through Hyperdrive, the MCP # server) and the Cron Trigger draining the attachments queue. - # Pinned at the bootstrap floor (v2.88.0): the offline bootstrap reads the - # blueprint, and the floor is newer than the product's lane pin (v2.78.4), + # Pinned at v2.96.0, above the bootstrap floor (v2.88.0), the first orun + # that reads `spec.preview`: the offline bootstrap reads the blueprint, and + # the pin is newer than the product's lane pin (v2.78.4), # which is all the lane steps need. The runner image carries PostgreSQL 16 # (not started); the test starts its own on a random port. product: @@ -133,7 +138,7 @@ jobs: - uses: actions/checkout@v6 - uses: sourceplane/orun-action@v1.2.0 with: - version: v2.88.0 + version: v2.96.0 - uses: pnpm/action-setup@v4 with: version: 10.12.1 diff --git a/apps/web/component.yaml b/apps/web/component.yaml index 1740a2f..8b34feb 100644 --- a/apps/web/component.yaml +++ b/apps/web/component.yaml @@ -79,6 +79,23 @@ spec: - profile: deploy when: triggerRef: github-push-main + # How the site runs itself for orun.work's live Preview tab + # (saas-parallel-baselining PB4): `orun preview` starts this, and a coding + # session keeps it running while it works, so the person watches it change + # as it is built. The dev server binds the box's loopback only, on a fixed + # port, and installs first, so a checkout the session has not installed yet + # still comes up. + # --strictPort makes Vite fail rather than move to another port when 5173 is + # taken. + 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 parameters: nodeVersion: "22" pnpmVersion: "10.12.1" diff --git a/intent.yaml b/intent.yaml index eb6ba47..b39c263 100644 --- a/intent.yaml +++ b/intent.yaml @@ -57,6 +57,13 @@ compositions: cloudflare-domain: stack-tectonic db-migrate: stack-tectonic +# The live preview (saas-parallel-baselining PB4): the component orun.work's +# Preview tab shows while a coding session works on the site. Its own +# `spec.preview` (apps/web/component.yaml) says how it runs; `orun preview` +# runs it. +preview: + component: web + discovery: roots: - apps/