docs: stop telling self-hosters to ship dist/ alone - #3565
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6691028521
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`veryfront build` emits browser assets only. The Deploy project page told readers to "run `veryfront build` and ship the `dist/` output" for a non-Cloud target, which leaves API routes and agents behind. Pin the corrected wording with a guide-content contract test.
Address review on #3565. - The dist/-only failure mode is host-dependent: `veryfront serve` over a dist/-only directory 404s, but a static host honoring the generated `_redirects` (`/* /index.html 200`) answers the SPA HTML with a 200. Describe the missing backend rather than promising a status code. - docs/guides/deploying.md is what the corrected section links to, and its prose still offered "the build output" as a self-hosting target while its own Dockerfile ships the whole project. Align the prose and pin it with a matching content contract.
6691028 to
a869835
Compare
Found during a DX dogfood walk of https://veryfront.com/docs/code/getting-started/deploy-project.
Symptom
The Deploy project page's "Deploy somewhere else" section said:
Follow that literally and you ship a dead backend. The page's own default
scaffold (
veryfront init, ai-agent template) containsapp/api/ag-ui/route.tsandagents/assistant.ts, and neither survives thebuild:
Every file is a client-side artifact. Serving a directory that contains only
that
dist/confirms it:GET /api/ag-ui405(route exists, POST-only)dist/404(route absent)So a developer who ships
dist/to a static host or a container gets the chatUI rendering fine and
/api/ag-ui404ing, with nothing in the outputexplaining why. The Prerequisites bullet ("any container or Node-compatible
runtime that can serve the build output") reinforced the same wrong model.
Root cause
Documentation only.
veryfront buildproducing browser assets andveryfront serveloading routes, agents, workflows, and tasks from the projectsource at request time is the intended design - the sibling guide
docs/guides/deploying.mdalready ships the whole project viaCOPY . .plusdeno task start. The Getting Started page contradicted it.This page is the upstream source for the published site:
veryfront-docs/.github/workflows/update-reference.ymlcopiesveryfront-code/docs/getting-started/intoveryfront-docs/docs/code/getting-started/,so editing
veryfront-docsdirectly would be overwritten on the next sync.The fix belongs here.
The change
veryfront servefrom the project directory, not one that can "serve the build output".
dist/actually holds, and that API routes, agents,workflows, and tasks are not compiled into it.
ship
dist/alongside the source, then runveryfront serve. States thefailure mode a
dist/-only host produces so the symptom is searchable.Regression test
tests/docs/guide-content.test.ts- "does not present dist/ as aself-contained self-hosted deployment".
That file is where this repo already pins doc claims that drift against real
behavior (runtime floors, Deploy/Push wording, the
veryfront servevsveryfront startcontract), and it runs underdeno task docs:validatein CI.The assertion is a content contract rather than a runtime test because the
defect is a false claim in prose, not a code path: it forbids the exact old
sentence and requires the corrected framing. Whitespace is normalized so the
test pins wording, not line wrapping.
Confirmed failing before the doc edit for the right reason
(
ship the \dist/` output` still present), passing after.