Skip to content

fix(plugin-grid): object-grid 的 data 输入按契约声明为 ViewData 对象 - #5108

Merged
yinlianghui merged 2 commits into
mainfrom
claude/issue-5090-grid-data-input-decl
Aug 18, 2026
Merged

fix(plugin-grid): object-grid 的 data 输入按契约声明为 ViewData 对象#5108
yinlianghui merged 2 commits into
mainfrom
claude/issue-5090-grid-data-input-decl

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #5090

问题

GRID_QUERY_INPUTS(packages/plugin-grid/src/index.tsx)把 data 声明成
{ type: 'array', label: 'Static Data', description: 'Inline rows, …' },
而契约是 ObjectGridSchema.data?: ViewData(packages/types/src/objectql.ts:556)。
ViewData 是 spec 以 provider 辨识的联合,四支全是 strict 对象
(object / api / value / schema),没有数组那一支。

也就是说:这条声明描述的是 staticData(objectql.ts:637,any[],已 @deprecated,
其 JSDoc 明写 "Use data with provider: 'value' instead")的形状 —— 而 staticData
正是 #4648 裁定明确不发布的那批已弃用别名之一 —— 却挂在 canonical 键 data 的名下。

两个方向都会伤到作者,实测:

写法 契约(tsc / spec) 保存门禁(改前)
data: [ …行… ](照声明面写) TS2322,拒绝 通过
data: { provider: 'value', items: [...] }(唯一合法) 通过 type-mismatch

编译探针(strict,对 packages/types/dist)复现卡面第 4 条:

error TS2322: Type '{ id: number; }[]' is not assignable to type
'{ provider: "object"; object: string; } | { provider: "api"; … } | …'

保存门禁那一侧实测(manifestFromConfigs + validateTree,真实注册表):改前
{ provider: 'value', items: [...] } 得到 type-mismatch: prop "data" expected an array
—— 平台在它唯一合法的写法上自相矛盾。这是 #4041 的形状换了一个键:
声明面与实现/契约指向相反的东西。

改法(只动声明面)

关于 type 是否应声明成 ['object', 'array']

不。ComponentInput.type 的数组形(#3832)语义是「任一支接受即放行」,而其文档明确要求
「只声明契约接受 AND 渲染器解析的支」。数组这一支渲染器解析、契约拒绝,不满足合取;
声明它等于继续发布一个 tsc 与 spec 都拒绝的形状,正是 #4648 carve-out 拒绝的那一步。

#5068 / #4648 的关系

钉子(提取式,非化石值)

新增 packages/plugin-grid/src/__tests__/gridDataInputContract.test.ts,两侧都不写死:

  • 声明面的支从注册表读出;
  • 期望值ViewDataSchema 自己的判定推导(每个粗粒度支一个代表值,取 schema 接受的那些)。
    任一侧漂移即红:spec 若放宽 ViewData 接受数组,或声明面长出契约拒绝的支。
  • 编译期一半用 @ts-expect-error 钉住「ViewData 没有数组支」;它由本包
    tsconfig.test.json 编译(spec-symbol-parity.test.ts 的「编译期」断言从未被编译 —— 整个 tripwire 是哑的 #3181),ViewData 一旦放宽,该指令变成未使用 → tsc 红。

之所以自建钉子:「声明的支是否匹配契约」本来就没有门禁(#4971 已就此立卡),
现有 parity 门禁只判键名。

验证

  • pnpm exec vitest run packages/plugin-grid/75 files / 668 tests passed
  • 控制台声明面消费方 4 个套件(parity / union-specimens / ga-honoured / binding-reach)
    95 passed
  • 仓根 turbo run type-check --concurrency=281 successful, 81 total
  • node scripts/check-control-bytes.mjs → OK

反向验证(先书面预判,再跑)

变异 预判 实测
(a) 声明退回 type: 'array' 新钉子 4 条红(两个 tag × 两条断言);编译期一半保持绿(它读契约不读声明) 一致:4 failed / 6 passed,expected [ 'array' ] to deeply equal [ 'object' ]
(a') 同一变异下的保存门禁 方向翻转 一致:{ provider: 'value', … }expected an array;裸数组 → 无诊断
(b) 探针塞假 provider 名 推导集塌成 [],比较两侧同时红 → 自证期望值真来自 schema 一致:expected [] to deeply equal [ 'object' ]expected [ 'object' ] to deeply equal []
(c) spec 声明的 alias(rows / data / objectName)是否 parse 时折叠 我预判会折叠(类比 VIEW_FILTER_OPERATOR_ALIASES 的 "folded to canonical on parse") 预判错,如实记录:四个 alias 拼写全部 safeParse 失败。ViewData 的 strictObject aliases 是拒绝时的报错提示机制,不是接受。结论对本 PR 有利 —— description 里教的 items / object / schemaId / read 四个 canonical 键实测全绿,教任何 alias 都会是错的

(c) 这条把预判写反了,按纪律照实报,不修饰成「符合预期」。


Generated by Claude Code

`GRID_QUERY_INPUTS` 把 `data` 声明成 `{ type: 'array', label: 'Static Data',
description: 'Inline rows, …' }`,而契约是 `ObjectGridSchema.data?: ViewData`
—— spec 以 `provider` 辨识的联合,四支全是 strict 对象(object / api / value /
schema),没有数组那一支。也就是说这条声明描述的是 `staticData` 的形状,而
`staticData` 正是 #4648 裁定明确不发布的已弃用别名。

两个方向都会伤到作者:照设计器面板(或生成的 sdui-intrinsics.d.ts)写
`data: [ …行… ]`,渲染能跑但 `tsc` 报 TS2322、spec 解析也不过;而唯一同时满足
两者的 `{ provider: 'value', items: [...] }` 反被本仓自己的保存门禁报
`type-mismatch` —— 因为声明的 `array` 支只接受数组。平台在它唯一合法的写法上
自相矛盾,正是 #4041 的形状换了一个键。

改动只在声明面:type 改为 `object`,label 改为 `Data Source`,description 如实
列出四支 provider 并说明内联行走 `{ provider: 'value', items: [...] }`。
`ObjectGrid.tsx` 的数组容忍支路不动(#5068 家族),它与 `staticData` 同等地位
—— 作为后向兼容被读取,但不作为授权面发布。

钉子取提取式:声明面的支从注册表读出,期望值由 `ViewDataSchema` 自己的判定推导,
两侧任一漂移即红;编译期一半靠 `@ts-expect-error` 钉住 `ViewData` 没有数组支。

Fixes #5090

Co-authored-by: Claude <noreply@anthropic.com>
上一提交在 `GRID_QUERY_INPUTS` 前插入了 #5090 的说明段,`const` 与其后三处
`ComponentRegistry.register(` 的行号整体后移 21 行,README 里四处按行号指路的
引用因此失准(145 → 166、181 → 202、193 → 214、216 → 237)。

只改行号,不改任何叙述;`src/index.tsx:80` / `:88` 两处在插入点之前,未动。

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 25.3 KB 350 KB
Entry file index-Ca5xEeyB.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 9.56KB 3.59KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 8.92KB 3.41KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 25.13KB 5.40KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.79KB
auth (createAuthenticatedFetch.js) 6.34KB 2.43KB
auth (index.js) 2.71KB 1.22KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.02KB 0.88KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 502.20KB 112.21KB
core (index.js) 4.11KB 1.62KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 159.03KB 44.08KB
fields (index.js) 234.25KB 58.48KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.35KB 1.38KB
i18n (pickLocalized.js) 3.69KB 1.73KB
i18n (provider.js) 23.12KB 7.62KB
i18n (useDisplayLocale.js) 2.84KB 1.45KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 39.16KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.35KB 3.31KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.42KB 1.42KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.81KB 0.83KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.75KB 18.37KB
plugin-chatbot (index.js) 181.21KB 43.14KB
plugin-dashboard (index.js) 127.85KB 32.73KB
plugin-designer (index.js) 212.39KB 42.83KB
plugin-detail (index.js) 241.12KB 60.43KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 123.21KB 29.85KB
plugin-gantt (index.js) 164.10KB 39.87KB
plugin-grid (index.js) 197.97KB 53.15KB
plugin-kanban (index.js) 52.72KB 14.54KB
plugin-list (index.js) 111.17KB 26.99KB
plugin-map (index.js) 18.72KB 6.09KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 41.97KB 11.33KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 83.81KB 20.49KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 27.53KB 9.41KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.28KB 0.68KB
react (schema-input.js) 1.45KB 0.83KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (index.js) 4.77KB 2.16KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 10.76KB 3.17KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 6.92KB 2.40KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.05KB 1.52KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 25.3 KB 350 KB
Entry file index-Ca5xEeyB.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 9.56KB 3.59KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 8.92KB 3.41KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 25.13KB 5.40KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.79KB
auth (createAuthenticatedFetch.js) 6.34KB 2.43KB
auth (index.js) 2.71KB 1.22KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.02KB 0.88KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 502.20KB 112.21KB
core (index.js) 4.11KB 1.62KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 159.03KB 44.08KB
fields (index.js) 234.25KB 58.48KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.35KB 1.38KB
i18n (pickLocalized.js) 3.69KB 1.73KB
i18n (provider.js) 23.12KB 7.62KB
i18n (useDisplayLocale.js) 2.84KB 1.45KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 39.16KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.35KB 3.31KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.42KB 1.42KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.81KB 0.83KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.75KB 18.37KB
plugin-chatbot (index.js) 181.21KB 43.14KB
plugin-dashboard (index.js) 127.85KB 32.73KB
plugin-designer (index.js) 212.39KB 42.83KB
plugin-detail (index.js) 241.12KB 60.43KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 123.21KB 29.85KB
plugin-gantt (index.js) 164.10KB 39.87KB
plugin-grid (index.js) 197.97KB 53.15KB
plugin-kanban (index.js) 52.72KB 14.54KB
plugin-list (index.js) 111.17KB 26.99KB
plugin-map (index.js) 18.72KB 6.09KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 41.97KB 11.33KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 83.81KB 20.49KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 27.53KB 9.41KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.28KB 0.68KB
react (schema-input.js) 1.45KB 0.83KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (index.js) 4.77KB 2.16KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 10.76KB 3.17KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 6.92KB 2.40KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.05KB 1.52KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Collaborator Author

PM 验收:ACCEPT(session_01GTRjn8xBqp75dk7kFupVRt,objectui 分片)

实物核验:merge-base 671c0d320 = 派发基线(dev fetch 时与 PM 读数一致);head 516f6ab11;4 files, +227/−5;标识 grep msg/diff 双零,trailer 唯一正确;content/docs/releases/** 零触碰;README 改动仅 4 处行号锚点(自身插入 21 行的后果,采信)✅。声明 diff 亲读:type: 'object' + ViewData 四臂如实描述 + 注释块把「为什么不声明数组臂」写成 #4648 carve-out 的自洽逻辑 ✅。

CI 亲读:15/20 终态全绿零失败(Build & E2E、Lint、Live E2E、Bundle Analysis 等全 success);余 4 个 Test shard + Type Check 在跑(started 00:44,无任何失败信号),本地对应面已直接覆盖(plugin-grid 全量 668/668、仓根 type-check 81/81)—— 与 PR #5105 同口径,把尾格终态交给 auto-merge 门(绿才合、红不合),意外转红 PM 下一跳处置。

验收要点:

  1. 词汇表侦查按派发词的停止条款走到了正确的另一侧:ComponentInputControlType 已含 'object'(11 literals 之一)⇒ 零契约变更;sdui.manifest.json/sdui-intrinsics.d.ts 是无提交产物的 build-time codegen ⇒ 无 drift 门可欠。刻意不声明 ['object','array'] 的论证是本单最硬的一格 —— 数组臂过不了「契约接受 ∧ 渲染器解析」的第一个合取项,声明它等于继续发布一个 tsc 与 spec 都拒绝的形,正是 [Decision] spec 17.0.0 GA declares four new authorable object-* blocks and new keys on three existing ones — what does objectui publish as authoring surface? #4648 carve-out 拒绝过的那一步。
  2. 用户可见影响不是断言而是实测:经真实 save gate(manifestFromConfigs + validateTree)量出修前「唯一同时过 tsc 与 ViewDataSchema 的写法被报 type-mismatch」—— object-grid 的 inputs 声明 filters(复数),渲染器只读 filter(单数):按已发布词汇写筛选条件静默无效 #4041 同形一键之隔;A' 变异把修前状态精确复现,changeset 中心主张有直接证据。
  3. (c) 预判错误如实报告是范本:类比 VIEW_FILTER_OPERATOR_ALIASES 预判 spec 的 aliases fold-on-parse,实测四个 alias 拼法 safeParse 全 FALSE —— 它是拒绝消息设施而非接受面(feat(components,plugin-detail): 五个 GA 键发布为 inputs,page:tabs 补上被发布的那个拼写的读点 (#4668) #5009/ObjectMapSchema(types)声明的键几乎与 ObjectMap 实际读的键无交集:map 块整体未建模,组件 props 类型写的是 ObjectGridSchema,每处 map 读取都走 as any #5018 的区分)。错误预判顺带证明了新 description 教的四个 canonical 键全部 parse 绿、教任何 alias 都会是错的。这一格已记入案头。
  4. 双半钉子各抓各的变异(声明半读 GRID_QUERY_INPUTS、契约半读 ViewDataSchema,mutation (a) 下前红后绿)—— 不冗余的论证在钉子文件里自带。
  5. 纪律细节:--root 用法自纠弃用重跑(pnpm --filter @object-ui/app-shell test 跑的是 @object-ui/console 的 22 个文件,app-shell 自己的 276 个一个没跑,却报绿 #3378 门)、探针不为测量买包边(用后即删,committed pin 从 ViewDataSchema 派生)、mdx 候选查重后零立卡(已被 content/docs/plugins/plugin-{form,grid,view}.mdx 三处 import type 从错误的包导入真实类型 —— 照抄即 TS2305(#5011/#5013/#5014 第二条的文档站镜像) #5086/content/docs/plugins/plugin-grid.mdx 整片示例教 type: 'grid' + header / accessorKey 列词汇表 —— 落到 CSS Grid 布局容器,列声明被 strict 的 ListColumn 拒绝(#5065 的文档站镜像) #5087 双覆盖)、Cyrillic 字符混入自查删除。

三件套照常:本评论 → undraft → auto-merge(SQUASH)。


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 18, 2026 00:50
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 27c9cbd Aug 18, 2026
21 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5090-grid-data-input-decl branch August 18, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation plugin tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

object-grid 声明的 data 输入类型是 array(内联行),而契约类型是 ViewData(对象)—— 照设计器写出的元数据 spec 解析不过

2 participants