Repository navigation
docs(forms): restructure the Forms docs into task pages - #6049
Conversation
authorize in Forms got only { id, name, email }, so a role check had to
read the Auth Session a second time. It now matches authorize in the
rest of ViteHub: true requires sign-in, and a function gets the whole
Auth user and session and may return a Response. rateLimit: true and
honeypot: true keep the default, so shared options typecheck. The docs
show how to protect a form, guard every form with one access route, and
share options.
There was a problem hiding this comment.
Important
Correct the deployment, access, and submission guidance before merging. The new guides send Cloudflare users to a migration command that does not reach native D1 and describe actions that Teams and the Console do not offer as shown.
Approach: Splitting the Forms docs by task is the right approach; each guide needs to describe what the user can do on that host or client.
Reviewed changes — I checked the rewritten docs and package README against the Forms implementation and the affected integrations.
- Setup and protection: Contact form tutorial, database setup, sign-in, roles, and request guards.
- Submitting and triaging: HTML and JavaScript clients, Vue and Formisch, MCP and chat, and inbox access.
- Reference and navigation: Server API, limits and diagnostics, cross-links, and legacy fragments.
Validation: 200 Forms tests and 24 focused docs tests passed. I also compared the old and new headings with the docs parser. I did not deploy to Cloudflare or test a live Teams client.
pullfrog(high) | 𝕏
Latest result Merged 6519625 directly: required checks passed and review threads were resolved. Final answersSession Merged 6519625 directly: required checks passed and review threads were resolved. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. Session Pushed 6519625 to resolve the Forms docs merge conflict. The repair preserves the task pages and documents when thrown ViteHub conflicts return HTTP 409. All prior review fixes remain intact. Lint and focused documentation assertions passed; the sandbox blocked the prerequisite build for the local docs suite. Awaiting hosted checks. |
Keeps the base version over this PR's changes: - docs/content/docs/forms/client.md: The repair deliberately replaces the error-only branches so they retain the server message and whole-form issues for every failed submission. - docs/content/docs/forms/configure.md: The repair retains the form schema note and adds instructions to migrate the deployed database. - docs/content/docs/forms/get-started.md: The repair deliberately replaces the deployment and inbox advice to distinguish local from deployed migrations and Console browsing from status writes. - docs/content/docs/forms/inbox.md: The repair deliberately replaces claims that the Console view can write with the documented read-only view and permissions for operation calls. - docs/content/docs/forms/index.md: The repair restores the published What you get anchor above the new feature cards and corrects the Console status-change claim. - docs/content/docs/forms/limits-and-errors.md: The repair replaces duplicate error listings with the generated catalog as required by the diagnostic contract and preserves server messages and whole-form issues in the example. - docs/content/docs/forms/protect.md: The repair replaces the incomplete standalone Auth Definition with an access-rule fragment for an existing role-enabled Definition. - docs/content/docs/forms/server-api.md: The base deliberately extends the original callback-response explanation to describe rejected submitForm redirects, and the repair places that explanation under Responses while retaining the PR's Inbox section.
@vite-hub/agent
@vite-hub/auth
@vite-hub/blob
@vite-hub/browser
@vite-hub/bundle
@vite-hub/channels
@vite-hub/choices
@vite-hub/cli
@vite-hub/cms
@vite-hub/codemods
@vite-hub/comments
@vite-hub/connections
@vite-hub/content
create-vitehub
@vite-hub/database
@vite-hub/device
@vite-hub/docs
@vite-hub/email
@vite-hub/env
@vite-hub/forge
@vite-hub/forms
@vite-hub/gateways
@vite-hub/i18n
@vite-hub/kit
@vite-hub/kv
@vite-hub/markdown-template
@vite-hub/mcp
@vite-hub/presets
@vite-hub/queue
@vite-hub/rate-limit
@vite-hub/realtime
@vite-hub/runtime
@vite-hub/sandbox
@vite-hub/schedule
@vite-hub/shell
@vite-hub/source
@vite-hub/sync
@vite-hub/ui
vite-hub
@vite-hub/web-container
@vite-hub/webhooks
@vite-hub/workflow
@vite-hub/workspace
commit: |
Keeps this PR's version over base changes: - docs/content/docs/forms/index.md: The task overview replaces the base's tagline, feature cards, and bare next links with corrected task copy and links, while keeping the new headline, LandingDemo, and Pick it when section and restoring the legacy What you get fragment. - docs/content/docs/forms/vue.md: The task guide replaces the base paragraph with its options-based introduction and a separate paragraph that preserves the base's shared control name, array decoding, and item-error rules. - packages/forms/README.md: The rewritten README replaces the base's full Vue introduction with a summary and retains its new shared-name error guidance and native form decoding details. Keeps the base version over this PR's changes: - docs/content/docs/forms/index.md: The base retires HeroFigure, so the rewritten Forms overview uses LandingDemo and keeps the PR's inbox guidance, task cards, and legacy fragments.
Keeps this PR's version over base changes: - docs/content/docs/forms/server-api.md: The task-page rewrite deliberately moves the base's protection and shared-options examples to Protect and Configure, with fragment redirects, while retaining the base's API behavior in the reference. - packages/forms/README.md: The rewritten lifecycle and services sections deliberately replace the base's older wording while preserving its authorization and identity contracts. Keeps the base version over this PR's changes: - docs/content/docs/forms/server-api.md: The base adds authorize: true, so the 401 row deliberately covers both an unsigned caller rejected by that option and an unsigned caller whose callback returned false.
Bundle sizeClient 5.12 MB
And 994 more routes.
Largest changes in the client
Largest changes in the server
And 19 more packages or files. Brotli sizes. Changes under 100 B are left out of the tables. Initial page load counts the JavaScript and CSS a route loads before it renders. Prerendered URLs count the JavaScript and CSS their HTML preloads (module scripts, modulepreload and stylesheets, not prefetch), and the HTML document. Components are the lazy-loaded components the page rendered: its HTML preloads them, but its route's static imports don't reach them. Measured by nuxt-bundle-analyzer for |
MCP eval dry run
Tool list sizeThe characters the model reads: the server instructions, and the name, description, and input schema of each tool.
|
Keeps the base version over this PR's changes: - docs/content/docs/forms/configure.md: Main now preserves ViteHub conflict statuses for JSON requests, so the task guide keeps the no-storage guarantee and links to the updated response contract instead of saying all non-h3 errors return 500.

Restructures and rewrites the Forms docs. Stacked on #6048, so the pages describe
authorize: true, a callback that returns aResponse, and booleanrateLimitandhoneypot.Fable 5.2 planned the page structure. Gemini 4 Neon wrote the copy. I checked the facts against
packages/forms/src.Why
The old section was split by where the code runs (server, Vue).
server-api.mdwas five guides and one reference in one page. "Who can send this form?" had answers in three places.submitForm()was on the Vue page. The inbox CLI was only in the tutorial.New pages
onSubmit, shared optionsauthorizecontext,FormSubmission, route, responses, retries, inbox, schema functions,guardRequest()origins,maxBytes,guardRequest()AutoForm,useFormAction(),FormHoneypot, FormischsubmitForm(),curl, page and anchorThe package README is also rewritten (first commit).
Links
No page is removed. Moved sections get fragment redirects in
docs/modules/vitehub-docs/redirects.ts. Links on other pages (node self-hosted, webhooks, MCP, agents, UI, auth, two diagnostics sources) anddocs/test/ui-section.test.tspoint at the new places.Checks
docssnippet check passes (1869 blocks, 0 failed).docs/test/ui-section.test.ts,docs-navigation.test.ts, andnuxthub-migration.test.tspass (24 tests)./docs/formslink and redirect target resolves to an existing heading, checked with the docs parser.🤖 Generated with Claude Code