docs(protocol/objectui): widget-contract 不再教已删除的 PerformanceConfig (#4996) - #5023
Merged
xuyushun441-sys merged 1 commit intoAug 4, 2026
Merged
Conversation
…4996) 「Performance」小节把 #3896 删掉的 `PerformanceConfigSchema` 描述成「共享的、可用的」, 还给出它当年所在的确切路径;`WidgetManifest` 接口块也列着 `performance?: PerformanceConfig;`。 该页不是生成物,没有闸门会自动纠正它。 议题悬着的前提问题(那是 objectui 自己的字段还是被退役的 spec 键?)用代码即可判定: `WidgetManifestSchema` 就在本仓 `packages/spec/src/ui/widget.zod.ts:273`,其 `performance` 已是 `retiredKey(...)`(`z.never()`)—— 不只是没了,而是 parse 时会被拒。生成的 `references/ui/widget.mdx` 早已标注 `[REMOVED]`,只有这份手写页在反着说。 取改写而非整段删:虚拟滚动没退役,只是换了载体 —— 活的开关是 list 形态视图上的顶层 `virtualScroll`(`ListViewSchema`,view.zod.ts:909)。本节改成说真话,并用 warn callout 点明该键 17.0.0 起被拒、请删掉。顺带修掉同一次删除留下的第二个活指针:layout-dsl.mdx 把 responsive 参考页描述为含 performance 配置,而那页生成出来已零 performance 内容。 其余 `PerformanceConfig` 出现全部是历史记述(墓碑、CHANGELOG、changeset、release notes、 liveness 台账、ADR-0021、审计日志),按 #4832 的区分标准保留。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018iARDqtrhQgz6fVHDeDkbQ
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
xuyushun441-sys
marked this pull request as ready for review
August 4, 2026 00:35
xuyushun441-sys
deleted the
claude/issue-4996-widget-contract-performanceconfig
branch
August 4, 2026 00:39
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 #4996
前提复核(先核实,再动手)
议题的三条前提逐条验过,全部仍然成立(基线
origin/main@bf1edeffd):content/docs/protocol/objectui/widget-contract.mdx两处:第 159 行接口块里的performance?: PerformanceConfig;,以及第 309 行「Performance」小节整句「supplied through the sharedPerformanceConfigschema (packages/spec/src/ui/responsive.zod.ts)」。没有被别的 PR 顺手改过。packages/spec/src/ui/responsive.zod.ts:331现在只有墓碑注释;responsive.test.ts:94记着用例随 schema 一并移除。POST /data/sharing/rules绕过SharingRuleSchema:criteria缺失或拼错静默变成"共享该对象全部记录",与 ADR-0049 "never seeded as a permissive match-all" 直接冲突 #3896 的理由写在 changeset 与 CHANGELOG 里:每个performance载体都是「可写但无人读」 —— 没有任何 renderer 或 runtime 读过 performance 块,而一个没有消费者的导出 schema 会被发现它的人当成能力(refactor(spec)!: remove the plugin sandboxing / integrity / approval config that never existed (#3896 follow-up) #3950 先例)。议题悬着的那个决定,用代码判掉了
议题说「需要 objectui 分片确认一句再动笔」,因为不确定 manifest 的
performance是 objectui 自己的字段还是被退役的那三个 spec 键。不需要确认:WidgetManifestSchema就住在本仓 ——packages/spec/src/ui/widget.zod.ts:273。所以那两个分支都不成立,真实情况比它们更强:retiredKey()返回的是一个带error提示的z.never()(见packages/spec/src/shared/retired-key.ts:60)。也就是说这个键不只是「没了」,而是会在 parse 时被拒:照着这份文档写performance:的 manifest 今天直接校验失败。而生成的
content/docs/references/ui/widget.mdx:113早已如实标注[REMOVED] ... Delete the key.。生成面与手写面对同一个键给出相反指令 —— 这正是 #4914 那个形态:两套并存,读者(很可能是 AI 作者,ADR-0033)可能撞上死的那套。手写页不是生成物(packages/spec/scripts/下没有生成器写它),所以没有闸门会自动纠正,它才活到今天。处置:改写,不是整段删
议题给的两个分支之外还有第三种,也是正确的那种。虚拟滚动这个真实用例并没有退役,只是换了载体 —— 活的开关是 list 形态视图上的顶层布尔
virtualScroll(ListViewSchema,packages/spec/src/ui/view.zod.ts:909),#3896 的 release notes 也是这么写的。整段删掉会让记得旧键的作者失去落点,于是本节改成说真话:performance?: PerformanceConfig;删除(aria?: AriaProps保留 —— schema 上它仍然活着);virtualScroll的确切位置;warncallout 点明该键在 17.0.0 被移除、现在会被拒、请删掉 —— 与生成面的措辞对齐,让迁移中的作者不会把它再加回来。顺带修掉同一次删除留下的第二个活指针:
layout-dsl.mdx的 Related Resources 把/docs/references/ui/responsive描述成「Responsive and performance configuration」,而那页生成出来已经零 performance 内容,改为「Breakpoint layout and scoped responsive styles」。同目录、同一个被删 schema 的余波,属任务允许的「必要的关联引用」。活指针 vs 历史记述(按 #4832 的区分标准)
全仓复查
PerformanceConfig,其余出现全部是历史记述,一律保留:responsive.zod.ts墓碑注释、responsive.test.ts说明、packages/spec/CHANGELOG.md、两份既往 changeset、content/docs/releases/v17.mdx、packages/spec/liveness/README.md台账、docs/adr/0021当时的决策记录、docs/audits/审计日志、spec-property-retirementskill 的举例。未触碰content/docs/releases/。闸门
check:docs-audit-scope如预期不受影响 —— 改内容不改路径。附空 frontmatter changeset(纯文档,releases nothing)。