feat(spec):detail 块补 typed stageField 键#2455
Closed
baozhoutao wants to merge 1 commit into
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
The detail-page synth (@object-ui/plugin-detail) already reads def.detail?.stageField to drive or disable the auto status-path stepper (record:path), but it only survived via the detail block's .passthrough(), so authors got no type/autocomplete and no way to discover the switch. Declare it explicitly alongside renderViaSchema/hideReferenceRail/ hideRelatedTab: string forces a status field, false/null disables the stepper (for non-linear status picklists). .passthrough() kept for back-compat. Type matches the synth's string | false | null. Closes #2452
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.
问题
objectui 详情页 synth(
@object-ui/plugin-detail的buildDefaultPageSchema/detectStatusField)在没有手写 record page 时会自动合成详情页,自动探测状态字段在记录顶部渲染有序状态进度条(Lightning Path 风格的record:path)。非线性status(正常/暂停/作废)被画成进度条不合适;objectui objectstack-ai/objectui#2066 已支持detail: { stageField: false }关闭(synth 读def.detail?.stageField)。但
detail.stageField此前只靠detail块的.passthrough()放行,没有 typed 键 → 作者(及 AI)写它时没有任何类型 / 自动补全,也无从发现这个开关。改动
packages/spec/src/data/object.zod.ts的detail块里,与renderViaSchema/hideReferenceRail/hideRelatedTab并列,补一个 typedstageField键(带.describe()),并在块上方的 doc-comment 补一条说明。保留.passthrough()。类型与 synth 读取的
string | false | null一致:字段名 → 强制用该字段;false/null→ 关闭进度条;省略 → synth 自动探测。自测
pnpm gen:schema✅(1681 schemas,eager 求值新 union 无误)tsc --noEmit✅@objectstack/specpatch纯类型 / 发现性改动,运行时行为不变(passthrough 早已放行)。原 skill 文档方案(#2453)一次加太多,已放弃。
Closes #2452