Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/web-console-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ incremental cache / tag cache / queue — this app has no R2/KV/D1 bindings
and runs fully session-authenticated, so no persistent caching layer is
needed.

## Live preview

`orun preview` runs the console the way a coding session on orun.work does,
for its **Preview** tab (`spec.preview` in `component.yaml`, named by
`preview:` in `intent.yaml`). It is the console alone: `next dev` on
127.0.0.1:3001, talking to the product's deployed **stage** API, with only
its own packages installed and a 1 GiB heap, so it fits beside the agent in
the session's box. No Worker runs locally. Token-free pages (`/`, `/login`,
`/demo`) render in full; pages behind sign-in show the sign-in prompt.

```sh
orun preview start # waits for :3001
orun preview status
orun preview logs web-console-next
orun preview stop
```

## Parity vs. apps/web-console

| Surface | web-console (Vite) | web-console-next (Next 15) |
Expand Down
27 changes: 27 additions & 0 deletions apps/web-console-next/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,33 @@ spec:
- profile: deploy
when:
triggerRef: github-push-main
# The live preview for orun.work's Preview tab (saas-parallel-baselining
# PB4): `orun preview` runs this, and a coding session keeps it running
# while it works, so the person watches the console change as it is built.
#
# KEPT SMALL ON PURPOSE. It is for looking at the UI, inside the coding
# session's own box (1 vCPU, 3 GiB, shared with the agent):
# - the console alone, `next dev` on the box's loopback. No Worker runs:
# no `needs`, so none of the thirteen workers, Postgres or wrangler start;
# - its API is the product's deployed STAGE (CONSOLE_DEPLOY_ENV=stage);
# - only the console's own packages are installed (`--filter ...`);
# - `next` itself, not `pnpm exec next` (two idle pnpm processes, ~200 MB);
# - its heap is capped at 1 GiB, so it can never starve the agent.
# Measured: up in ~17 s, ~830 MB with three pages compiled.
# The token-free pages (the landing page, /login, /demo's mock gallery)
# show in full. Pages behind sign-in show the sign-in prompt: stage's
# sign-in does not return to a preview host.
preview:
run:
- sh
- -c
- pnpm install --frozen-lockfile --prefer-offline --filter "@saas/web-console-next..." && exec node_modules/.bin/next dev -H 127.0.0.1 -p 3001
port: 3001
path: /
env:
CONSOLE_DEPLOY_ENV: stage
NODE_OPTIONS: --max-old-space-size=1024
NEXT_TELEMETRY_DISABLED: "1"
parameters:
nodeVersion: "22"
pnpmVersion: "10.12.1"
Expand Down
7 changes: 7 additions & 0 deletions intent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ compositions:
cloudflare-domain: stack-tectonic
db-migrate: stack-tectonic

# The live preview (saas-parallel-baselining PB4): the one component orun.work's
# Preview tab shows while a coding session works on the product. The console
# alone, against the deployed stage API; its `spec.preview` says how it runs
# (apps/web-console-next/component.yaml), and `orun preview` runs it.
preview:
component: web-console-next

discovery:
roots:
- apps/
Expand Down
Loading