docs(spec): make submitBehavior's TSDoc state the mode-aware default - #7473
Conversation
…7441) The JSDoc block above `FormViewSchema.submitBehavior` still claimed `thank-you` (default) — show a confirmation panel, which the maintainer's 2026-08-10 ruling on #7245 makes false for the internal path: `thank-you` stays the default only on the public `/console/f/:slug` path, while the internal `/console/forms/:name` path — where `type: 'form'` actions send operators — now defaults to redirecting to the record that was just created. An explicit `submitBehavior` wins in either mode. Rewritten to state both defaults and the reasoning behind each, mirroring the contract already landed in content/docs/protocol/objectui/actions.mdx and content/docs/ui/forms.mdx (PR #7417). Schema unchanged: submitBehavior stays .optional() with no .default(), and its .describe() string ('Post-submit behavior') is byte-identical — only the source comment changes. Fixes #7441 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016R9de1FqP7NvwKvqXi92Gh
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
Fixes #7441
What changed
packages/spec/src/ui/view.zod.ts, the JSDoc block aboveFormViewSchema.submitBehavior(~line 2029), still claimed:The maintainer's 2026-08-10 ruling on #7245 makes that mode-dependent:
thank-youstays the default only for the public/console/f/:slugpath, while the internal/console/forms/:namepath — wheretype: 'form'actions send operators — now defaults to redirecting to the created record. An explicitsubmitBehaviorwins in either mode.Before:
After:
The rewrite mirrors the contract already landed in
content/docs/protocol/objectui/actions.mdxandcontent/docs/ui/forms.mdx(PR #7417).Scope discipline
⛔ The schema itself is untouched:
submitBehaviorstays.optional()with no.default(), and its.describe()string ('Post-submit behavior') is byte-identical.git diffconfirms only comment lines changed. No acceptance-face change.Hypotheses verified
gen:docs) — HOLDS.pnpm --filter @objectstack/spec check:docsreports "231 generated files in sync with packages/spec" (same count PR docs(spec): state the RLSusinggrammar by what pushes down, not by a count (#6919) #7444 cited for the identical reason), andgit status --porcelain -- content/docs/references/is empty after the check.submitBehavior-referencing test files; the only matches (view-strictness-batch18.test.ts) pin schema behavior (strict-key rejection, discriminated-union error shape), never the JSDoc prose. No pin needed updating; no new gate machinery was added.Verification
Changeset
.changeset/submitbehavior-jsdoc-mode-aware-default.md— patch,@objectstack/spec, following PR #7444's precedent (TSDoc contract-text rewrite in published spec source ships a patch changeset even thoughgen:docsrenders nothing from it).Refs #7245 (the ruling) · #7417 (docs half, where this was flagged) · objectui#4109 (renderer half, not yet landed).
Generated by Claude Code