docs(protocol): widget-contract 的 Theme 段停止教 #3494 已删除的 density,token 词表按 #5021 重写 (#5291) - #5454
Merged
Merged
Conversation
…en 词表按 #5021 重写 (#5291) `content/docs/protocol/objectui/widget-contract.mdx` 的 Theme 段散文与 YAML 示例 都在教 `density`(「`density` is one of `compact`, `regular`, or `spacious`」+ 示例里的 `density: regular`)。该键在 #3494 就被删了,而 `ThemeSchema` 自 #4001 批 15 起是 `.strict()` —— 照抄本页示例必然 parse 失败。拒绝本身是响亮且带处方的 (`THEME_RETIRED_KEY_GUIDANCE` 的 `density` 墓碑),问题在于平台自己的权威文档把 作者送进了那次拒绝;对从这一页取样写主题的 AI 作者尤其贵。 原示例其实有两处解析失败——除 `density` 外,`colors:` 下只有一行注释,YAML 解析成 `null`,而 `colors` 必填且其 `primary` 必填。现在的示例是一份真能通过 `ThemeSchema` 解析的完整主题。 同时把整段 token 词表刷新到 #5021 之后: - 逐一列出 `ThemeSchema` 的十个可写键,并给出每个键实际落到 document 上的 CSS 变量 ——`colors` 出门时的改名(`surface` → `--card`、`text` → `--foreground`、 `error` → `--destructive` …)、`borderRadius.base` / `shadows.base` 发裸 `--radius` / `--shadow`、`typography` 自 #5021 起只剩 `fontFamily.base` (发 `--font-sans`)、`customVars` 逐字发出。 - 新增 Callout 点名两批退役键:#3494 的八个,以及 #5021(`@objectstack/spec` 17.0.0, ADR-0049)的 `animation` / `zIndex`、`typography` 四条排版标尺、 `fontFamily.heading` / `mono`;处方统一是 `customVars`(逐字节等价替代),并给出 `os migrate meta --from 16`。 每条断言都对着 `packages/spec/src/ui/theme.zod.ts` 与 objectui `ThemeEngine.ts` 逐键核过:16 个退役键全部被拒、10 个活键全部被接受。 不碰 `content/docs/references/**` 与 `content/docs/releases/`。Docs-only。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GX3sL71LFq8m2usg6VqTSE
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
os-zhuang
marked this pull request as ready for review
August 5, 2026 12:38
akarma-synetal
pushed a commit
to akarma-synetal/framework
that referenced
this pull request
Aug 6, 2026
…talled the release (objectstack-ai#5292) (objectstack-ai#5467) The gate's failure message offered "an empty changeset" and the `skip-changeset` label as two equal ways out, and the comment above the counter called them "on par". They are equal to THIS gate's counting, but not downstream: the label is a gate-level exemption that produces no input for changesets/action, while an empty-frontmatter changeset is a real input to it. When every pending changeset is empty the action takes its `hasChangesets && !hasNonEmptyChangesets` branch, prints "All changesets are empty; not creating PR" and returns in 0 seconds -- no version PR, no publish, Release run green. That is objectstack-ai#4898, which stalled 17.0.0-rc.2. The message was therefore an active mis-prescription: it handed a known release-stalling input to whoever had just hit the wall. Rewritten to three ranked routes, with the label preferred and the empty changeset demoted to a warned last resort that names objectstack-ai#4898. The counting logic is untouched: an empty changeset still counts, so today's precedent (objectstack-ai#5453 / objectstack-ai#5454, both merged behind empty changesets) stays valid. Claude-Session: https://claude.ai/code/session_01GX3sL71LFq8m2usg6VqTSE Co-authored-by: Claude <noreply@anthropic.com>
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.
Fixes #5291
前提已核(against
origin/main@01c0baef9)issue 正文是线索不是规格,先证伪再动手。该页确实仍停在 #3494 之前:
content/docs/protocol/objectui/widget-contract.mdx:319散文:「… anddensityis one ofcompact,regular, orspacious」:325YAML 示例:density: regularpackages/spec/src/ui/theme.zod.ts的THEME_RETIRED_KEY_GUIDANCE里density是一条 [P2] Aspirational-config disposition: reconcile-or-prune the still-dead props from the 2026-06 liveness audit (Theme / Translation / Job / Webhook) #3494 墓碑,ThemeSchema自 未知键静默剥离仍是全仓默认:把 #3405 的 strict 收紧从一个 schema 推广到整个可授权面(ADR-0078 完整性闸门) #4001 批 15 起.strict()派发口径的前置条件也已满足:PR #5289 已 MERGED,#5021 的退役面已在
origin/main的theme.zod.ts上落定。用可执行的方式钉住「照抄即失败」
把该页
## Theme段的 YAML fence 抽出来喂给真正的ThemeSchema(即defineTheme()/defineStack({ themes })跑的那一段)。方向是在跑之前定的:改前红、改后绿——这一单里被改的是示例本身,规则(ThemeSchema)没动,所以这是最普通的那个方向,没有反转。改前(
origin/main的页面),两处失败而不是一处:colors:底下只有一行注释,YAML 解析成null,而colors必填、其primary必填。issue 只点了density,但「照抄本页 = 构建失败」这条主张实际由两个缺陷共同成立,所以两个一起修——只修density的话,照抄的人仍然拿到一次失败,缺陷的标题依旧成立。改后(本分支):
词表刷新:每条断言逐键核过,不是照抄 issue 正文
派发口径明确要求以
origin/main的实际墓碑为准。退役面与活键都对着theme.zod.ts、发出的 CSS 变量对着 objectuipackages/core/src/theme/ThemeEngine.ts核过:COLOR_TO_CSS_MAP确认改名:surface→--card、text→--foreground、textSecondary→--muted-foreground、disabled→--muted、error→--destructivegenerateBorderRadiusVars/generateShadowVars确认base发的是裸--radius/--shadowgenerateTypographyVars确认fontFamily.base发--font-sanscustomVars确认逐字发出(缺--前缀时补上)并用第二个 harness 把页面的主张与 schema 对齐扫了一遍——16 个退役键必须被拒、10 个活键必须被接受:
两个 harness 都是一次性的,已在提交前删除,不进仓库。
改了什么
ThemeSchema的十个可写键,并用一张表给出每个 token 键实际落到 document 上的 CSS 变量。shadows/typography.fontFamily.base/customVars三个此前没露过面的活键)。Callout type="warn"(与本页widget.performance那段同一形状)点名两批退役键:[P2] Aspirational-config disposition: reconcile-or-prune the still-dead props from the 2026-06 liveness audit (Theme / Translation / Job / Webhook) #3494 的八个,主题引擎发出的 9 组 CSS 变量零消费方(--font-size-*/--z-*/--duration-*…):ADR-0049 该判去留 #5021(@objectstack/spec17.0.0, ADR-0049)的animation/zIndex、typography四条排版标尺、fontFamily.heading/mono。处方统一是customVars,并说明它是逐字节等价的替代,附os migrate meta --from 16。范围严格限定在该页 Theme 段。⛔ 未碰
content/docs/references/**(生成物)与content/docs/releases/。同页其它段落不在本单范围。门禁(真实输出)
另外用
@mdx-js/mdx单独编译了这一页(MDX compile OK),因为本次新增了表格与 Callout。grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]'自查该页无控制字节。Changeset:
.changeset/widget-contract-theme-token-vocabulary.md(docs-only,空 frontmatter,releases nothing——沿用http-protocol-discovery-two-shapes.md的先例)。🤖 Generated with Claude Code
https://claude.ai/code/session_01GX3sL71LFq8m2usg6VqTSE
Generated by Claude Code