Repository navigation
SS5: the product's own origin, and no Deploy to Vercel - #6
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SS5 (task SS-6) fixes two defects that
baseline-v1(619bb5d) ships in every product, ahead of abaseline-v2.What changed
1. The image links named localhost.
app/layout.tsxbuiltmetadataBasefromVERCEL_URL, which no Cloudflare build sets. Soog:imageandtwitter:imagewerehttp://localhost:3000/…on every deployed page.metadataBasenow comes fromNEXT_PUBLIC_SITE_URL, whichapps/web/component.yaml's buildCommand sets at build time:SITE_URLwhenintent.yamlsets one;https://supabase-starter-web-${ORUN_ENVIRONMENT}.your-workers-subdomain.workers.dev, which the rebrand rewrites to the product's Worker and subdomain.cacheComponents), andheaders()ingenerateMetadatawould make every static page dynamic.2. "Deploy to Vercel".
components/deploy-button.tsxand its uses inapp/page.tsxandapp/protected/layout.tsxare removed.sign-up-user-steps.tsxis left as upstream wrote it. It renders only whenVERCEL_ENVis set, so never on Cloudflare.One origin, one setting.
SITE_URLand uses it for Auth's Site URL and redirect allow-list, falling back to the same workers.dev URL. The runner exports an environment'senv:to every job in that environment, so both components see it.SITE_URLplus a redeploy of both components. The product's README,ai/context/operations.mdand BOOTSTRAP say so.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: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;Contract tests (manifest, phases, coverage, retouch, bootstrap-defer): pass.
testing/e2e.test.shat v2.78.4: passes. It checks that:/hasog:imageandtwitter:imagestarting withhttps://acme-supabase-web-stage.acme.workers.dev/;The rest of the tier is unchanged and passes too: lane steps, smoke check, routes, auth flow and RLS.
Terraform:
fmt,init -backend=falseandvalidatepass on the root. Evaluating the origin logic gives the workers.dev URL with noSITE_URL, andhttps://notes.acme.devwithSITE_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