fix(www): use v1 docs URL in agent onboarding prompt during pre-release - #1816
Conversation
|
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the fix resolves the reported bug and the tests pin it.
Reviewed changes
- Dynamic
FALLBACK_DOCS_URL(arkenv-v1.vercel.appduring pre-release,arkenv.js.orgfor GA) so copied agent prompts reference the v1 docs site whilealpha/rcis active. getDocsUrlnow readsNEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL/NEXT_PUBLIC_VERCEL_URL(client-bundle carried) alongside the server-side Vercel vars, and skips aarkenv.js.orgproduction host while a release tag is set.- Unit tests extended — new coverage for the
NEXT_PUBLIC_*client path, thearkenv.js.orgskip, and the v1 fallback. Verified green (227 passedin the www suite).
I confirmed the premise live before merging: https://arkenv-v1.vercel.app/llms.txt serves the v1 docs (Core concepts, @arkenv/core/@arkenv/standard) while https://arkenv.js.org/llms.txt still serves v0 (@arkenv/cli) — consistent with the preview workflow aliasing v1 branch builds to arkenv-v1.vercel.app while deploy-www.yml only promotes main.
ℹ️ GA flip depends on an explicit empty RELEASE_TAG
RELEASE_TAG defaults to "alpha" when unset, and the new FALLBACK_DOCS_URL is keyed off it. At GA, returning the fallback to arkenv.js.org requires the release-tag env var to be explicitly set to an empty string — not just removed — or copied prompts keep pointing at arkenv-v1.vercel.app (and the CLI tag stays @alpha). This mirrors the existing initCommand mechanism, so it's likely already in the plan; worth confirming the runbook says "set to empty", not "remove".
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@pullfrog review |
There was a problem hiding this comment.
ℹ️ No critical issues — one formatting nit inline.
Reviewed changes (incremental since the prior pullfrog review of 2aa03f7)
- Extracted a
firstNonEmptyhelper ingetDocsUrlthat prefers the first non-empty trimmed value across theNEXT_PUBLIC_*/ server-side var pairs, replacing the??chains (this also lets an empty-stringNEXT_PUBLIC_*fall through to the server var instead of short-circuiting). - Hardened the pre-release guard to strip an
http:///https://scheme before comparing the production host toarkenv.js.org— addressing the prior review's scheme-prefixed-host finding — with a new regression test forhttps://arkenv.js.org. - Added
NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL/NEXT_PUBLIC_VERCEL_URLtobeforeEachstubs (test isolation fix) and a new client-sideNEXT_PUBLIC_VERCEL_URLresolution test.
Verified locally: full www suite 228 passed (includes release.test.ts + install-panel.test.tsx). Both prior Pullfrog threads were resolved by the author and the underlying concerns are addressed in the new commit.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the fix is correct and the tests pin it; one coverage gap worth closing (inline).
Reviewed changes (re-review of the current head; the prior pullfrog review was against 2aa03f75, these bullets highlight what's new since)
- Pre-release docs-host guard —
getDocsUrlnow ignores aarkenv.js.orgproduction host (bare or scheme-prefixed) while a release tag is set, so v1 deploy servers resolve the preview host instead of the v0 domain. firstNonEmptynormalization — the??/trim/trailing-slash handling is consolidated into one helper applied to the site, production, and preview hosts, and now readsNEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL/NEXT_PUBLIC_VERCEL_URLahead of the server-side Vercel vars.- Dynamic fallback —
FALLBACK_DOCS_URLis tag-driven (arkenv-v1.vercel.appduring alpha/rc,arkenv.js.orgat GA) instead of hardcoded. - Test coverage — the client-side
NEXT_PUBLIC_*path, thearkenv.js.orgskip (both bare andhttps://forms), and the v1 fallback are all pinned; these assertions fail against the pre-fix behavior.
I verified the tests green locally (release.test.ts + install-panel.test.tsx, 19 passed) after building the workspace deps. The prior review's GA note (an explicit empty RELEASE_TAG, not removal) is already covered by docs/LAUNCH_RUNBOOK.md:22 ("Set RELEASE_TAG = \"\"") and the Vercel domain cutover at docs/LAUNCH_RUNBOOK.md:70.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
No changeset is needed here: this PR only updates the private |
|
Acknowledged - this is a review trigger rather than an actionable code comment. No code change or changeset is needed. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Summary
Resolves an issue where the "Copy prompt" button copied an onboarding prompt linking to
https://arkenv.js.org/llms.txt(the v0 docs site) instead ofhttps://arkenv-v1.vercel.app/llms.txt(the v1 site during pre-release).Root Causes
FALLBACK_DOCS_URLinapps/www/lib/config/release.tswas hardcoded tohttps://arkenv.js.org.InstallPanelis"use client"), non-NEXT_PUBLIC_*variables (VERCEL_PROJECT_PRODUCTION_URLandVERCEL_URL) are omitted from client bundles and evaluate toundefined, always triggering the fallback.VERCEL_PROJECT_PRODUCTION_URLis populated witharkenv.js.org(the primary domain of the v0 deployment) across all deployments. BecausegetDocsUrlcheckedVERCEL_PROJECT_PRODUCTION_URLbefore preview URLs, it resolved to the v0 domain.Changes
FALLBACK_DOCS_URLto dynamically resolve based onRELEASE_TAG:https://arkenv-v1.vercel.appduring pre-release (alpha/rc).https://arkenv.js.orgwhen graduating to GA (emptyRELEASE_TAG).getDocsUrlto ignorearkenv.js.orgfromVERCEL_PROJECT_PRODUCTION_URLwhileRELEASE_TAGis set, preventing pre-release prompt copy from referencing v0 docs.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URLandNEXT_PUBLIC_VERCEL_URLalongside server environment variables.apps/www/lib/config/release.test.ts.Test Plan
pnpm --filter=www test -- lib/config/release.test.ts components/page/install-panel.test.tsx --runpnpm typecheckpnpm biome check apps/www/lib/config/release.ts apps/www/lib/config/release.test.ts