docs(ui): state the type: 'form' action contract — in-shell, submit lands on the record (#7245) - #7417
Draft
os-help wants to merge 1 commit into
Draft
docs(ui): state the type: 'form' action contract — in-shell, submit lands on the record (#7245)#7417os-help wants to merge 1 commit into
type: 'form' action contract — in-shell, submit lands on the record (#7245)#7417os-help wants to merge 1 commit into
Conversation
… lands on the record (#7245) `type: 'form'` is the platform's first-class way to open an object's form, but nothing in the hand-written docs said what it promises the author. The docs described the route and the four `submitBehavior` kinds, and flatly labelled `thank-you` "(default)" — which is today's mode-blind renderer fallback, not the contract. State the ruled contract where authors read about form actions: - Action Protocol / Form Actions gains a "What `type: 'form'` promises" subsection — renders in-shell (the route stays, so deep-linking survives), internal submit defaults to a redirect to the created record, and an explicit `submitBehavior` always wins — plus a public-vs-internal table. - Forms guide §8 replaces the bare "(default)" marker with a mode-aware defaults table: `thank-you` for the public `/console/f/:slug` path, redirect-to-created-record for the internal path. - Forms guide §9 and the two action tables (`ui/actions`, protocol `Action Types`) restate the in-shell/lands-on-record clause and link the contract. - The public-collection guide says the explicit `thank-you` there is copy, not behavior, and points at the split. Where the shipped renderer does not match the contract yet, the pages say so inline rather than documenting the defect: a dated "current renderer status" note on both pages pointing at the ObjectUI half tracked from the #7245 thread. Part of #7245. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnGHxdcvU63spYLamVnpkX
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #7245 — the objectstack half only (the contract statement in hand-written docs). The renderer half lands in ObjectUI as a separate card, so this PR must not close the issue.
The ruling this implements
Maintainer ruling 2026-08-10 07:34Z on #7245, verbatim:
What was measured first
Where the current prose describes
type: 'form'/submitBehaviorbehavior, before writing anything:content/docs/protocol/objectui/actions.mdx§Form Actions/console/forms/:name"). Silent on chrome and on post-submit.content/docs/ui/forms.mdx§8thank-you"(default)" — mode-blind, i.e. today's renderer fallback stated as the contract.content/docs/ui/forms.mdx§9type: 'form'launchers — route only, silent on shell and submit.content/docs/ui/actions.mdxtype tableformrow, route only.content/docs/ui/public-data-collection.mdxthank-you; never says it is also the public default, so the split was invisible.Changes
protocol/objectui/actions.mdx— new#### What type: 'form' promisessubsection under Form Actions: renders in-shell (route kept, so deep-linking survives), internal submit defaults to redirect-to-created-record, explicitsubmitBehavioralways wins; plus a public-vs-internal table (audience / chrome / default). TheAction Typesrow gains the in-shell + lands-on-record clause.ui/forms.mdx— §8 drops the bare*(default)*marker from the kind table and gains a### The default is mode-awaretable (thank-youfor public/console/f/:slug, redirect-to-created-record for internal/console/forms/:name, with the reason for each). §9 and the top-of-page bullet restate it and link the contract.ui/actions.mdx—formrow links the contract.ui/public-data-collection.mdx— one paragraph: the explicitthank-youthere is copy, not behavior, and the internal path defaults the other way.Contract vs. shipped renderer — stated honestly, not documented as the contract
The console at the pinned
.objectui-shadoes not implement this yet (out-of-shell page,thank-youin both modes). Rather than documenting the defect, both pages carry a short dated "Current renderer status (2026-08-10)" note saying the renderer does not match yet, pointing at the ObjectUI half tracked from the #7245 thread, and telling authors to declaresubmitBehaviorexplicitly until it lands. Those notes come out when the renderer card lands.Surface boundary — checked, and one out-of-surface flag
Generated
content/docs/references/**andpackages/spec/src/**were treated as out of surface. Measured whether the contract text is really spec-produced:submitBehaviorisz.discriminatedUnion(...).optional().describe('Post-submit behavior')— the.describe()carries no default claim, and the generatedcontent/docs/references/ui/view.mdx:269reproduces exactly that neutral string. The schema has no.default(); the default is resolved by the renderer (FormPage's?? { kind: 'thank-you' }).domain:spec-surface.submitBehaviorinpackages/spec/src/ui/view.zod.ts(~line 2029) still says "thank-you(default) — show a confirmation panel". It is a source comment, not published to the docs site, but it will read as false once the renderer half lands. Worth adomain:spec-surfacefollow-up to make it mode-aware.Gates
Run locally in the task worktree, all green:
check:nul-bytes,check:role-word(44 baselined files, no new occurrences — the new prose avoids the ratcheted word),check:quick-reference-counts,check:doc-authoring,check:docs-audit-scope(incl. both self-tests; 179 hand-written docs in sync). Note: the card namedcheck:doc-formula-expressions, which does not exist inpackage.json— the nearest existing doc-corpus gate,check:doc-authoring, was run instead. CI's full farm is authoritative.Changeset
None. Docs-only diff touching no published package; the reader-visible behavior change belongs to the ObjectUI renderer half and should carry its changeset there, so a changeset here would announce a shipped change that has not shipped.
skip-changesetat review.Also observed, not fixed (kept the diff single-purpose)
The hand-written docs spell the console mount
/console/forms/:name(9 occurrences acrosscontent/docs+skills/), while the measured live URL in #7245 is/_console/forms/...andprotocol/objectui/actions.mdx:87itself uses/_console/. Fixing 2 of 9 would make it worse; it wants its own docs-accuracy card.Generated by Claude Code