Skip to content

SS5: the product's own origin, and no Deploy to Vercel - #6

Merged
ruehowl merged 1 commit into
mainfrom
claude/blissful-ptolemy-c5ajf8
Oct 15, 2026
Merged

ruehowl merged 1 commit into
mainfrom
claude/blissful-ptolemy-c5ajf8

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

SS5 (task SS-6) fixes two defects that baseline-v1 (619bb5d) ships in every product, ahead of a baseline-v2.

What changed

1. The image links named localhost.

  • app/layout.tsx built metadataBase from VERCEL_URL, which no Cloudflare build sets. So og:image and twitter:image were http://localhost:3000/… on every deployed page.
  • metadataBase now comes from NEXT_PUBLIC_SITE_URL, which apps/web/component.yaml's buildCommand sets at build time:
    • the environment's SITE_URL when intent.yaml sets one;
    • otherwise https://supabase-starter-web-${ORUN_ENVIRONMENT}.your-workers-subdomain.workers.dev, which the rebrand rewrites to the product's Worker and subdomain.
  • This follows postgres-drizzle-starter's buildCommand. The origin is set at build rather than read per request: the pages are prerendered (cacheComponents), and headers() in generateMetadata would make every static page dynamic.

2. "Deploy to Vercel".

  • components/deploy-button.tsx and its uses in app/page.tsx and app/protected/layout.tsx are removed.
  • The tutorial's Vercel-only step in sign-up-user-steps.tsx is left as upstream wrote it. It renders only when VERCEL_ENV is set, so never on Cloudflare.

One origin, one setting.

  • The supabase root reads the same SITE_URL and uses it for Auth's Site URL and redirect allow-list, falling back to the same workers.dev URL. The runner exports an environment's env: to every job in that environment, so both components see it.
  • A custom domain is therefore SITE_URL plus a redeploy of both components. The product's README, ai/context/operations.md and BOOTSTRAP say so.
  • The rebrand's list of protected upstream links drops the deploy link and the demo URL, since nothing references them any more.

How it was verified

  • Repo checks: pnpm install --frozen-lockfile, wire:fixture (no diff), typecheck, lint, test (25 tests), build. All pass.

  • testing/rebrand.test.sh: passes, with a new case for the buildCommand's default origin.

  • testing/leak.test.sh: passes.

  • testing/placement.test.sh (orun 2.79.0): passes. It checks that:

    • the product's build sets NEXT_PUBLIC_SITE_URL="${SITE_URL:-https://acme-supabase-web-${ORUN_ENVIRONMENT}.acme.workers.dev}";
    • main.tf's Auth origin is SITE_URL, else the same workers.dev URL;
    • no app file links to Vercel's clone flow.
  • Contract tests (manifest, phases, coverage, retouch, bootstrap-defer): pass.

  • testing/e2e.test.sh at v2.78.4: passes. It checks that:

    • the served / has og:image and twitter:image starting with https://acme-supabase-web-stage.acme.workers.dev/;
    • both images are served;
    • no "Deploy to Vercel" appears.

    The rest of the tier is unchanged and passes too: lane steps, smoke check, routes, auth flow and RLS.

  • Terraform: fmt, init -backend=false and validate pass on the root. Evaluating the origin logic gives the workers.dev URL with no SITE_URL, and https://notes.acme.dev with SITE_URL=https://notes.acme.dev/.

The blueprint's module list did not change. As before, nothing was applied or deployed live.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk


Generated by Claude Code

Two defects baseline-v1 shipped in every product:

- og:image and twitter:image named localhost. app/layout.tsx built
  metadataBase from VERCEL_URL, which no Cloudflare build has. It is now
  NEXT_PUBLIC_SITE_URL, baked in by component.yaml's buildCommand: the
  environment's SITE_URL when intent.yaml sets one, else
  https://<repo>-web-<env>.<subdomain>.workers.dev (rebranded). Baked at
  build rather than read per request, because the pages are prerendered
  (cacheComponents).
- The header offered "Deploy to Vercel", cloning upstream's example to
  Vercel. components/deploy-button.tsx and its two uses are gone.

One origin, one setting: the supabase root reads the same SITE_URL for
Auth's Site URL and redirect allow-list, falling back to the same
workers.dev URL, so a custom domain is SITE_URL plus a redeploy of both
components (README, "Custom domain"). The rename's upstream list drops the
deploy link and the demo URL, which nothing carries any more.

Tests: the e2e asserts the served home page's og:image and twitter:image
start with the stage Worker's own origin, that both images are served, and
that no "Deploy to Vercel" appears; placement checks the build bakes the
product's origin, Auth follows SITE_URL, and no app file links Vercel's
clone flow; rebrand covers the buildCommand's default origin.

Task SS-6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
@ruehowl
ruehowl marked this pull request as ready for review October 15, 2026 21:09
@ruehowl
ruehowl merged commit 044c48a into main Oct 15, 2026
6 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