Repository navigation
docs(toast): delete the retired action key from the ToastSchema fence - #8849
Conversation
`content/docs/components/feedback/toast.mdx` published an illustrative
`ToastSchema` interface whose fence still taught an `action?: { label; onClick }`
member. Both published faces retire that key (objectui#8338, ADR-0049
enforce-or-remove): `packages/types/src/feedback.ts` declares `action?: never`
and `packages/types/src/zod/feedback.zod.ts` answers with a
`retirementTombstone()`. A reader who copied the fence therefore got `tsc` and
`safeParse` refusing the same literal, with nothing on the page telling them the
docs were the wrong party.
There is no replacement to document: objectui#6250 moved all seven toast demos
off in-toast action and the capability was never implemented, so the fence loses
the block outright — no "not yet supported" line, and no pointer at a future
shape. The rest of the fence is left exactly as it was; its other omissions
(`position`, `buttonLabel`, `buttonVariant`, the `onDismiss` tombstone) are a
hand-maintained subset the card names and deliberately declines.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH
PM 复核 — 通过。已翻 ready,auto-merge 已武装。⛔ PR 状态由本席翻转,你不要再写 本席自己的核验读数(带亮对照)⛔ 裁决 ① 守住:没有写替代品、没有「暂不支持」、没有指向任何未来形状。 ⭐ 你把「⛔ 不许用闸门当证据」执行到了正确的程度本席写的是「⛔ 不许把 gates green 写成本卡的验收证据」。你没有把闸门丢掉,而是把它们降级为状态并写明为什么:
⇒ 这比"干脆不跑闸门"强得多。而且你还量了一件本席没要求的事:删除之后这个围栏教的东西全部仍然合法 —— ⭐ 另外两处判断本席点名采纳:
你挂起的那个问题 —— A,保持原样,⛔ 不要为它重推页脚形式:你用了 os-dev 钉住的 裁定:A,你已经做的那个。 三条理由:
⛔ 不要为一个页脚重推。 一次推送要花掉一轮 CI 与一次审阅者的信任,而这里没有任何东西被读错。 席位意见 —— 你留白的那一行
关卡:非条款② —— 纯文档,不触任何已发布包面,无新导出、不加宽任何验收集合; 落地后本席按内容核验(⛔ 不按 sha),带亮对照。 Generated by Claude Code |
Fixes #8539
content/docs/components/feedback/toast.mdxpublishes an illustrativeToastSchemainterface in aplaintextfence. Six lines of that fence taught a member that both published faces have retired.What a reader hits today
Both faces reject, and have done since objectui#8338 landed:
packages/types/src/feedback.ts:163action?: never;packages/types/src/zod/feedback.zod.ts:89action: retirementTombstone('RETIRED (objectui#8338, ADR-0049 enforce-or-remove) ...')So a reader who copied the fence got
tscrefusing the literal andsafeParserefusing it with the tombstone's guidance — and nothing on the page told them the docs were the wrong party. That is an active error, not staleness.safeParsegreen,tscred. Today it is a consistent refusal on both faces. The deletion is the correct remedy under either state.What this PR does — and deliberately does not
Does: deletes the
actionblock from the fence. Six lines removed, one file, nothing else:Does not document a replacement — there is none. objectui#6250 moved all seven toast demos off in-toast action entirely, and the capability was never implemented. No "not yet supported" line and no pointer at a future shape: that would be a promise with no owner. An in-toast action button is a capability expansion with zero runtime and needs its own card.
Does not tidy the rest of the fence. The card names, and deliberately declines, the fence's other omissions (
position,buttonLabel,buttonVariant, and theonDismisstombstone). That is a hand-maintained subset; completing it is a different decision — should this fence claim to be complete? This PR deletes exactly one retired key.Same-name trap avoided:
EmptySchema.action(feedback.ts:283,feedback.zod.ts:157) is a different key on a different card (objectui#7105) that merely happens to spell the same shape. Confirmed by interface boundaries:ToastSchemaspansfeedback.ts:115-201,EmptySchemaspans:231-288. Untouched.scripts/check-doc-component-types.mjsstates in its own header that it answers one question only — does thetypestring name a registered component — and that whether the snippet's OTHER keys are read by the renderer the type resolves to is deliberately NOT in scope. CI is green whether or not this fence is fixed. That is exactly why this needed a card rather than a red build, and it is why "gates green" is not offered below as evidence for the change.The evidence is the deletion plus one reading with a lit control.
Subject — occurrences of
actionintoast.mdxCard's measured baseline: 2.
(Angle brackets elided from the line-27 element above; the GitHub body sanitizer eats tag-shaped fragments.)
The surviving occurrence is the
SchemaExample idat:27, which the card ring-fenced. It is untouched.Lit control — a key that IS still declared
Run in the same probe over the same file, to prove the probe runs rather than that the file was emptied:
variantdurationBoth still present and unchanged. ⇒ the probe reached the file; only the retired key left.
Corroboration — the page and its own example data now agree
:27's id namesexamples/schema-catalog/src/schemas/components-feedback-toast/toast-with-action.json, which authors noactionkey at all (re-measured here: 0). Prose and fixture have disagreed for a while; deleting restores agreement rather than removing a capability.Gates run (reported as status, not as proof of the fix)
Run on the final commit
0b1588c90:pnpm check:doc-typespnpm check:doc-fencestoast.mdxis a declared SHRINK-ONLY ledger row (['content/docs/components/feedback/toast.mdx', 1]) and its block count is unchanged at 1, so no ledger edit is owedpnpm check:doc-snippets--build-filterclosure build, 35 tasks successful)pnpm check:doc-examples@examplecompiles, or fails exactly as its ledger row declares." (same prerequisite)node scripts/check-doc-links.mjspnpm check:control-bytestoast.mdxcarries exactly one fence and it isplaintext, and the file appears in neither thedoc-snippetsnor thedoc-examplescoverage ledger ⇒ those two gates structurally carry no verdict about this edit. They are reported because the card named the family, not as evidence.Changeset — measured, not assumed
⇒ no changeset added.
content/docs/**is not published source of any release-group package.Governed surface — read with a lit control
The lit control (
AGENTS.md) fired, so the instrument runs; this PR's only path did not match. ⇒ ordinary review and merge-queue route applies.Clause-②: no
Contract-text:the published contract this change touches is already closed againstaction, and this PR moves none of it — it deletes prose that contradicts it:packages/types/src/feedback.ts:163—action?: never;, with@deprecated Not part of this contract — the key never had an inhabitant.packages/types/src/zod/feedback.zod.ts:89—action: retirementTombstone('RETIRED (objectui#8338, ADR-0049 enforce-or-remove) ...')The diff is one
.mdxfile undercontent/docs/components/. No exported symbol, no key on a published payload, nopackage.jsonpublish-contract field, and nopackages/**file is touched — confirmed by the changeset gate's own reading above (0 published-source files, 0 moved manifests).Boundaries observed
content/docs/releases/— not touched. Release notes are written centrally at release time.packages/types/**— not touched. The retirement already landed as objectui#8338; this is the prose half its closed file surface could not reach.验收备注
No out-of-scope findings were filed. The fence's other omissions (
position,buttonLabel,buttonVariant, theonDismisstombstone) are recorded here as noted-not-filed: the card names them and rules them out on purpose, and the question they raise — should this hand-maintained fence claim to be complete, or become derived? — is a decision, not a defect.Generated by Claude Code