Skip to content

docs: stop telling self-hosters to ship dist/ alone - #3565

Merged
kojiwakayama merged 2 commits into
mainfrom
fix/dx-20260811-b2-3
Aug 11, 2026
Merged

kojiwakayama merged 2 commits into
mainfrom
fix/dx-20260811-b2-3

Conversation

@kojiwakayama

Copy link
Copy Markdown
Contributor

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:

For a non-Cloud target, run veryfront build and ship the dist/ output.

Follow that literally and you ship a dead backend. The page's own default
scaffold (veryfront init, ai-agent template) contains
app/api/ag-ui/route.ts and agents/assistant.ts, and neither survives the
build:

$ veryfront build
  ✓ Built in 6.41s
    1 page, 0 chunks, 1 asset
    14.51 KB in dist

$ find dist -type f
dist/_redirects
dist/_veryfront/app.js
dist/_veryfront/client.js
dist/_veryfront/hydration-runtime.22f7158e.js
dist/_veryfront/hydration-runtime.js
dist/_veryfront/manifest.json
dist/_veryfront/prefetch.js
dist/_veryfront/router.js
dist/_vf/css/ef279860....css
dist/favicon.svg
dist/index.html
dist/sw.js

Every file is a client-side artifact. Serving a directory that contains only
that dist/ confirms it:

serve cwd GET /api/ag-ui
project root (source + dist) 405 (route exists, POST-only)
a directory holding only dist/ 404 (route absent)

So a developer who ships dist/ to a static host or a container gets the chat
UI rendering fine and /api/ag-ui 404ing, with nothing in the output
explaining 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 build producing browser assets and
veryfront serve loading routes, agents, workflows, and tasks from the project
source at request time is the intended design - the sibling guide
docs/guides/deploying.md already ships the whole project via COPY . . plus
deno task start. The Getting Started page contradicted it.

This page is the upstream source for the published site:
veryfront-docs/.github/workflows/update-reference.yml copies
veryfront-code/docs/getting-started/ into veryfront-docs/docs/code/getting-started/,
so editing veryfront-docs directly would be overwritten on the next sync.
The fix belongs here.

The change

  • Prerequisites: another host needs a runtime that can run veryfront serve
    from the project directory
    , not one that can "serve the build output".
  • Build: say what dist/ actually holds, and that API routes, agents,
    workflows, and tasks are not compiled into it.
  • Deploy somewhere else: ship the whole project directory, build on the host or
    ship dist/ alongside the source, then run veryfront serve. States the
    failure mode a dist/-only host produces so the symptom is searchable.

Regression test

tests/docs/guide-content.test.ts - "does not present dist/ as a
self-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 serve vs
veryfront start contract), and it runs under deno task docs:validate in 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.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 90042d5e-952c-42e4-b2bf-782cbefc2dc9

📥 Commits

Reviewing files that changed from the base of the PR and between 718355c and a869835.

📒 Files selected for processing (3)
  • docs/getting-started/deploy-project.md
  • docs/guides/deploying.md
  • tests/docs/guide-content.test.ts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/getting-started/deploy-project.md Outdated
Comment thread docs/getting-started/deploy-project.md Outdated
`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.
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 1114e69 Aug 11, 2026
33 checks passed
@kojiwakayama
kojiwakayama deleted the fix/dx-20260811-b2-3 branch August 11, 2026 10:39
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.

1 participant