You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conditionalFormatting on the object-view node has a SECOND read on the author-reachable kanban path — the #5097 host-surface exemption is narrower for this one key #5248
Found while implementing the ruled exemption on #5097. Filed unassigned, not claiming. No code change was made for it — #5097's ruling preserves the status quo either way (nothing declared, nothing removed).
What was measured
Measured on main at e03dfa5ea (and identical at #5097's base 9fbb9b52f).
The #5097 ruling exempts 27 keys read off the object-view node as HOST-COMPOSITION surface. Its stated basis is measured reachability: the renderListView delegation branch in packages/plugin-view/src/ObjectView.tsx is entered only when a host supplies the prop, and the registered renderer ObjectViewRenderer (packages/plugin-view/src/index.tsx:58) does not, so the schema-registration path documented to authors cannot reach those keys.
That basis holds for 26 of the 27. It is narrower for conditionalFormatting, which has a second read site outside the delegation branch:
packages/plugin-view/src/ObjectView.tsx:1094 — inside the host-only renderListView branch, with its 30 neighbours.
packages/plugin-view/src/ObjectView.tsx:768 — inside generateViewSchema's kanban branch, as the last fallback of kanbanConditionalFormatting (kanbanCfg.conditionalFormatting ?? activeView?.conditionalFormatting ?? (schema as any).conditionalFormatting), forwarded to the emitted object-kanban node.
The kanban branch is on the author-reachable path: renderContent delegates to renderListView only when the prop is present; otherwise, for a non-grid view type, it calls generateViewSchema(currentViewType) and hands the result to SchemaRenderer. That is exactly what ObjectViewRenderer does. So an author who registers an object-view node with a kanban view type and a top-level conditionalFormatting rule does get an effect today.
conditionalFormatting is not a declared member of ObjectViewSchema (derived from packages/types/src/objectql.ts + BaseSchema: 42 declared members, conditionalFormatting is not among them), and it is not in the object-view registry inputs (packages/plugin-view/src/index.tsx:71-86), so nothing on the authoring surface offers it and nothing rejects it — BaseSchema's index signature means tsc is silent too.
The question
One key is honoured on the authored path while being recorded as host surface. Three ways out, and it shapes the public contract, so it wants a ruling rather than a guess:
Declare conditionalFormatting on ObjectViewSchema (and add it to the object-view registry inputs) — it does something on the author's path, so the "declaring it would promise a surface that does nothing" argument does not apply to it.
Keep it exempt and narrow the kanban read — drop the (schema as any).conditionalFormatting fallback at :768 so the key is genuinely host-only, and let kanban conditional formatting be authored where it is declared. This changes behaviour for any document relying on the top-level rule, so it needs the usual liveness check first.
The exemption block added by #5097 names this asymmetry in full and points here, so a later sweep meets a statement rather than a flat claim. See packages/plugin-view/src/ObjectView.tsx (OBJECT_VIEW_HOST_COMPOSITION_KEYS), section "The one asymmetry".
Found while implementing the ruled exemption on #5097. Filed unassigned, not claiming. No code change was made for it — #5097's ruling preserves the status quo either way (nothing declared, nothing removed).
What was measured
Measured on
mainate03dfa5ea(and identical at #5097's base9fbb9b52f).The #5097 ruling exempts 27 keys read off the
object-viewnode as HOST-COMPOSITION surface. Its stated basis is measured reachability: therenderListViewdelegation branch inpackages/plugin-view/src/ObjectView.tsxis entered only when a host supplies the prop, and the registered rendererObjectViewRenderer(packages/plugin-view/src/index.tsx:58) does not, so the schema-registration path documented to authors cannot reach those keys.That basis holds for 26 of the 27. It is narrower for
conditionalFormatting, which has a second read site outside the delegation branch:packages/plugin-view/src/ObjectView.tsx:1094— inside the host-onlyrenderListViewbranch, with its 30 neighbours.packages/plugin-view/src/ObjectView.tsx:768— insidegenerateViewSchema's kanban branch, as the last fallback ofkanbanConditionalFormatting(kanbanCfg.conditionalFormatting ?? activeView?.conditionalFormatting ?? (schema as any).conditionalFormatting), forwarded to the emittedobject-kanbannode.The kanban branch is on the author-reachable path:
renderContentdelegates torenderListViewonly when the prop is present; otherwise, for a non-grid view type, it callsgenerateViewSchema(currentViewType)and hands the result toSchemaRenderer. That is exactly whatObjectViewRendererdoes. So an author who registers anobject-viewnode with a kanban view type and a top-levelconditionalFormattingrule does get an effect today.conditionalFormattingis not a declared member ofObjectViewSchema(derived frompackages/types/src/objectql.ts+BaseSchema: 42 declared members,conditionalFormattingis not among them), and it is not in theobject-viewregistryinputs(packages/plugin-view/src/index.tsx:71-86), so nothing on the authoring surface offers it and nothing rejects it —BaseSchema's index signature means tsc is silent too.The question
One key is honoured on the authored path while being recorded as host surface. Three ways out, and it shapes the public contract, so it wants a ruling rather than a guess:
conditionalFormattingonObjectViewSchema(and add it to theobject-viewregistryinputs) — it does something on the author's path, so the "declaring it would promise a surface that does nothing" argument does not apply to it.(schema as any).conditionalFormattingfallback at:768so the key is genuinely host-only, and let kanban conditional formatting be authored where it is declared. This changes behaviour for any document relying on the top-level rule, so it needs the usual liveness check first.(schema as any)从 object-view 节点读 31 个键转发给 renderListView,其中 27 个不是 ObjectViewSchema 声明成员 —— #5091 在 ObjectView 上的同形实例 #5097's comment block does today).Where it is recorded now
The exemption block added by #5097 names this asymmetry in full and points here, so a later sweep meets a statement rather than a flat claim. See
packages/plugin-view/src/ObjectView.tsx(OBJECT_VIEW_HOST_COMPOSITION_KEYS), section "The one asymmetry".Related
(schema as any)从 object-view 节点读 31 个键转发给 renderListView,其中 27 个不是 ObjectViewSchema 声明成员 —— #5091 在 ObjectView 上的同形实例 #5097 — the ruled exemption this was found under.(schema as any)读的 4 个键不在GRID_QUERY_INPUTS里 —— #4648 要消除的「渲染器读得到、声明面否认」在这些键上仍然存在 #5091 / PR test(plugin-grid): record the three grid keys ruled non-author surface, and stop at the fourth #5241 — the siblingobject-gridexemption whose pattern ObjectView 用(schema as any)从 object-view 节点读 31 个键转发给 renderListView,其中 27 个不是 ObjectViewSchema 声明成员 —— #5091 在 ObjectView 上的同形实例 #5097 follows.(schema as any)reads behind an explicit host-side prop contract.