Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Add individual component documentation pages with live demo infrastructure - #136

Merged
huangyiirene merged 4 commits into
mainfrom
copilot/add-component-documentation
Jan 21, 2026
Merged

huangyiirene merged 4 commits into
mainfrom
copilot/add-component-documentation

Conversation

Copilot AI commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Restructures component documentation from category-based pages (e.g., form.md containing all form components) to individual pages per component (e.g., form/button.mdx, form/input.mdx) with live interactive demonstrations.

Changes

Demo Infrastructure

  • ComponentDemo: Renders ObjectUI schema as live component with title/description
  • DemoGrid: 2-column responsive grid for multiple demos
  • CodeDemo: Side-by-side schema + rendered output
  • ObjectUIProvider: Client component that imports @object-ui/components to trigger registry auto-registration

Documentation Structure

  • 32 individual .mdx files across 8 categories: basic/, form/, layout/, data-display/, feedback/, overlay/, disclosure/, complex/
  • Each page includes: description, interactive examples, TypeScript schema definition
  • Category-level meta.json files for sidebar navigation
  • Updated components/index.md with category overview

Example Component Page

---
title: "Button"
description: "Trigger actions with customizable styles"
---

import { ComponentDemo } from '@/app/components/ComponentDemo';

<ComponentDemo
  schema={{
    type: 'button',
    label: 'Click Me',
    variant: 'default'
  }}
  title="Basic Button"
/>

Dependencies

  • Added @object-ui/{components,core,react,types} as workspace dependencies to site package
  • Updated pnpm-lock.yaml

Screenshot

Component overview page showing new category-based navigation:

Component Overview

Known Issue

ComponentDemo shows "Unknown component type" errors. Component registry population in Next.js SSR context needs investigation - likely a timing issue with side-effect imports during SSR vs client hydration.

Original prompt

在文档站点中,按组件分类介绍每一个组件,并调用对应的组件演示组件显示效果。每个组件一个文档。


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel

vercel Bot commented Jan 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 21, 2026 3:42pm
objectui-site Error Error Jan 21, 2026 3:42pm

Request Review

@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 请按照fumadocs 规范,在文档中嵌入组件演示效果

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@vercel
vercel Bot temporarily deployed to Preview – objectui-docs January 21, 2026 15:41 Inactive
Copilot AI changed the title [WIP] Add documentation for each component with demos Add individual component documentation pages with live demo infrastructure Jan 21, 2026
Copilot AI requested a review from huangyiirene January 21, 2026 15:45
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies apps labels Jan 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1553.12KB 365.90KB
core (index.js) 0.53KB 0.28KB
data-objectql (ObjectQLDataSource.js) 11.05KB 2.64KB
data-objectql (hooks.js) 5.62KB 1.43KB
data-objectql (index.js) 0.62KB 0.36KB
designer (index.js) 1.46KB 0.51KB
plugin-charts (AdvancedChartImpl-DazADGz5.js) 74.89KB 15.82KB
plugin-charts (BarChart-CRc8MAtI.js) 551.60KB 127.51KB
plugin-charts (ChartImpl-DVw_7KEd.js) 3.17KB 1.10KB
plugin-charts (index-CdgY2AuM.js) 12.39KB 3.83KB
plugin-charts (index.js) 0.21KB 0.16KB
plugin-editor (MonacoImpl-B7ZgZJJG.js) 18.15KB 5.59KB
plugin-editor (index-Dl3HAAqu.js) 10.07KB 3.31KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-kanban (KanbanImpl-CUWM-JC-.js) 76.50KB 20.46KB
plugin-kanban (index-BV3FWhCb.js) 11.86KB 3.67KB
plugin-kanban (index.js) 0.18KB 0.15KB
plugin-markdown (MarkdownImpl-BRkYjVWf.js) 256.79KB 64.50KB
plugin-markdown (index-D_CdfEXQ.js) 9.59KB 3.16KB
plugin-markdown (index.js) 0.19KB 0.15KB
react (SchemaRenderer.js) 1.44KB 0.73KB
react (index.js) 0.32KB 0.23KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (registry.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

Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

@huangyiirene
huangyiirene marked this pull request as ready for review January 21, 2026 15:53
@huangyiirene
huangyiirene merged commit 8f6fa7a into main Jan 21, 2026
Copilot AI requested a review from huangyiirene January 21, 2026 15:54
Copilot stopped work on behalf of huangyiirene due to an error January 21, 2026 15:54
os-justin pushed a commit that referenced this pull request Sep 15, 2026
…t-arm blocks

Ruling objectui#8348 Q2-C (decision batch #136 item 3, maintainer 「同意」).
「8348 以协议为准」 retired the bare-array `data` shorthand at the shared
record-source ladder, but the authored key had a SECOND carrier the ruling did
not reach and that outranked the first: `SchemaRenderer` spreads every
non-metadata node key as a React prop, and `ObjectGrid` (`passedData`),
`ObjectMap` (`dataProp`) and `ObjectGantt` each lift a `data` PROP with an
unconditional `Array.isArray` ahead of the ladder. An authored
`data: [ …rows… ]` therefore still drew end-to-end.

`SchemaRenderer` now skips that key for blocks whose published `data` row is
the `ViewData` OBJECT arm, so it reaches them only as `schema.data`, judged by
the row. The arm is answered by one new reading in `@object-ui/core`,
`recordSourceDataArmForType`, for the one consumer that cannot be handed the
arm as a parameter — a renderer generic over every registered type.

⛔ The `data` PROP is untouched (option B refused): a host that hands down rows
it already fetched still reaches every block, and still outranks the authored
key. Array-arm blocks (`object-calendar`) are untouched by kind.

The ladder emits no runtime signal of its own — measured, and it corrects the
card's premise — so a `__DEV__` warn-once names the key, the arm and the
spelling that works, rather than letting the retirement land as a page that
quietly stopped drawing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeoGH6X7MtfbjcRDscyXi1
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…t-arm blocks (objectui#9571) (objectstack-ai#9578)

Fixes objectstack-ai#9571

Executes objectui#8348 Q2-C — decision batch objectstack-ai#136 item 3, maintainer
「同意」 on the seat's recommendation. Not a decision; execution.

## What was wrong

「8348 以协议为准」 (batch objectstack-ai#83) retired the bare-array `data` shorthand at the
shared record-source ladder. The authored key had a SECOND carrier the
ruling did not reach, and it is the one that wins: `SchemaRenderer`
spreads every non-metadata node key as a React prop, and `ObjectGrid`
(`passedData`), `ObjectMap` (`dataProp`) and `ObjectGantt` each lift a
`data` PROP with an unconditional `Array.isArray` at higher priority
than the ladder. An authored `data: [ ...rows... ]` therefore still drew
end-to-end. AGENTS.md #0.1: one key, one honoured spelling — the
tolerated second carrier is the defect.

## What this does

`SchemaRenderer` no longer spreads an authored `data` key for a block
whose published `data` row is the `ViewData` OBJECT arm. The key reaches
such a block only as `schema.data`, judged by the row. One new reading
in `@object-ui/core` answers the arm —
`recordSourceDataArmForType(type)` — for the one consumer that cannot be
handed the arm as a parameter, a renderer generic over every registered
type.

⛔ The `data` PROP is untouched. Option B (gating the prop on the arm)
was refused: that prop is how a host such as `plugin-list`'s `ListView`
hands down rows it already fetched. `...props` is spread LAST in
`SchemaRenderer`, so a host still delivers its rows and still outranks
the authored key; a host that renders the block component directly never
passes through here at all. Both legs are pinned.

Array-arm blocks are untouched by kind: `object-calendar`'s published
row is `z.array(...)`, so its bare array is on-contract and keeps the
prop seat. Every type the reading does not list keeps today's behaviour
verbatim — the default is the no-change direction, so the table's mere
existence re-decides nothing.

## Three PM mechanism assumptions, measured

**(a) The card's title mislocates the file — CONFIRMED, with one
refinement.** The symbol is `packages/react/src/SchemaRenderer.tsx`, so
the package is `@object-ui/react`. `git grep -nw` finds THREE
definition-shaped hits, not two: the real one, the
`packages/vscode-extension` test fixture the PM named, and a third in
`scripts/__tests__/check-component-surface-parity.test.ts` (a fixture
string). Neither extra is the renderer.

**(b) The "two blocks" census is WRONG — there are THREE.**
`ObjectGantt` does exactly what the card describes: it passes
`'view-data'` to the shared ladder, and its `reload` opens with a
`data`-prop check (`(rest as any).data && Array.isArray(...)`, step "1.
Check for data prop (Unified ListView)"), plus a sibling `hasHostData`
read. So it is an object-arm block whose prop carrier outranks the
ladder.

⚠️ This PR covers it, and that is the ruling's own scope rather than a
widening. Ruling C is stated over the ARM, not over a block list:
excluding gantt would require either a two-name allowlist — the second
de-facto contract AGENTS.md #0.1 forbids — or a false row in the arm
table. ⛔ No gantt source file is touched, and gantt's own `data`-prop
reader is not changed. Flagged for the seat: if the ruling was meant to
be block-scoped rather than arm-scoped, that is a one-line change to the
arm table and a re-read of this paragraph.

`ObjectTree` and `ObjectKanban` also lift a `data` prop with
`Array.isArray`, and are correctly outside the ruling: tree's arm is
`'undeclared'` (no published face declares a `data` row) and kanban's
published row is the array arm and walks no shared ladder at all.

**(c) The array-arm boundary — CONFIRMED at the boundary, and the change
does not depend on it.** `plugin-calendar/src/index.tsx`'s
`resolveExternalData` is `Array.isArray(raw) ? raw : undefined`, and
nothing is spread from `rest`. But the stronger fact is that the strip
is keyed on the arm: `object-calendar` is the `'array'` arm, so it is
not stripped at all. Pinned as a control in the new `packages/react`
file rather than in `plugin-calendar`, which is outside this card's file
surface.

## ⚠️ A card premise that is FALSE: "the retired-spelling signal the
ladder emits"

The acceptance asks that the signal the ladder already emits be what the
author sees. Measured: **the ladder emits nothing.**
`resolveRecordSourceConfig` returns `null` and falls through silently;
`validateSchema` — the `__DEV__` pass in `SchemaRenderer` — never reads
`data` against a block's row; no `console.warn` exists anywhere on that
path. The refusal is loud at authoring time (`os validate`, the save
gate, the zod row) and mute at render time.

Without a signal this ruling lands as a page whose rows were on screen
yesterday and are gone today, with nothing naming the dropped key — the
"author gets a success receipt" shape AGENTS.md #0.1 and `ObjectGrid`'s
own column diagnostic exist to prevent. So the strip site emits one
`__DEV__` warn-once naming the key, the arm and the spelling that works.
It lives inside `SchemaRenderer.tsx`, inside the declared file surface,
and is read-only.

## ⭐ A trap the registry-derived pin caught on its first run

One `ComponentRegistry.register()` call produces SEVERAL keys, and
`SchemaRenderer` looks the arm up with the raw `schema.type`. The first
draft of the arm table carried a row for bare `grid` — which is **not**
a grid key: `plugin-grid` registers its `view` alias with `skipFallback:
true` precisely so the bare key stays with `@object-ui/components`'
LAYOUT grid container. That row would have stripped `data` from a block
that declares no `data` row at all. The table's rows are now the
measured registry keys (`object-grid`, `plugin-grid:object-grid`,
`view:grid`; `object-map`, `plugin-map:object-map`, `view:map`, `map`;
`object-gantt`, `plugin-gantt:object-gantt`), and the pins read them
back off `ComponentRegistry.getAllTypes()` grouped by resolved renderer
— so a new alias without a row goes red instead of quietly answering
`'undeclared'`. A control pins that bare `grid` is a different renderer
and answers `'undeclared'`.

## Pins, and that they can go red

New:
`packages/react/src/__tests__/SchemaRenderer.dataPropArm-9571.test.tsx`
(23 tests) — per-key refusal on the object arm, the key still reaching
`schema.data`, array-arm and undeclared-arm controls, the two host-path
legs, a byte-identical-bag leg, the dev warning firing and not firing,
and the bare-`grid` control.

Updated: `gridBareArrayDataRefused-8348.test.tsx` row 3 and
`ObjectMap.schemaDataShorthand.test.tsx` row 3 — both previously
asserted "through `SchemaRenderer` the array still draws, from the PROPS
channel", which is exactly the sentence this card retires. Both files'
docblocks are rewritten to say what is true now rather than left
describing the old tree.

The card asks that the new pins be shown able to go red, honouring
`ObjectCalendar.recordSourceMembers-8314.test.tsx`'s warning about a pin
that cannot fail. The ablation (mutate, prove the mutation reached disk,
run, restore, prove the restore) is recorded in the report on
objectui#9571.

## Acceptance notes

Out of scope, noted and not filed:

- `plugin-grid/src/index.tsx`'s `gridNeedsDataSource` still carries `if
(Array.isArray(schema?.data)) return false;` — an escape hatch meaning
"this placement can draw without an adapter". objectui#8348 already made
its stated reason false at the ladder; this PR makes it false at the
remaining carrier too. Consequence: a grid authored with a bare `data`
array, an `objectName` and NO adapter now draws nothing while the "no
data source" gate stays silent. The new `__DEV__` warning names the
dropped key, so the author is no longer told nothing at all. That file
is source, not a pin, and is outside this card's declared file surface —
reported for the seat rather than repaired here. Dedupe words:
`gridNeedsDataSource`, `requiresDataSource`, bare array escape hatch,
ElementDataSourceGate, objectui#5378 item 2.
- `ObjectGantt`, `ObjectMap` and `ObjectGrid` each still read the `data`
prop through an `as any` / untyped `rest` bag, so nothing type-checks
the one prop this card just made single-purpose. Observation, not a
defect. Noted, not filed. Successor: whoever next types those props
bags.

## 本轮改动的中文速读

改了什么:`SchemaRenderer` 不再把作者写的 `data` 键当 React prop 铺给「object 臂」的区块(grid
/ map / gantt),该键只以 `schema.data` 到达,由区块自己发布的行裁决。宿主传的 `data` prop 一字未动。

为什么改:8348 的裁决在阶梯上落了地,却漏了优先级更高的第二条载体,于是裁决对作者不可见 —— 写裸数组照样出数据。

风险与回滚:风险面是「object 臂」的三个区块;数组臂(日历)按类不受影响。回滚 = 还原 `SchemaRenderer.tsx`
里那一段 strip 与 `@object-ui/core` 的新读数,两处都是加法。

---
_Generated by [Claude
Code](https://claude.ai/code/session_01XeoGH6X7MtfbjcRDscyXi1)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…k pair (objectui#9511) (objectstack-ai#9712)

Part of objectstack-ai#9511 — this branch lands the part of the ruling that measured
clean and
carries the rest back to the card. ⛔ It does **not** complete the card:
one of
the five doors is still open by measurement, so there is no closing
keyword in
this body on purpose.

Clause-②: yes

Executing director batch objectstack-ai#136 item 5, letter **B** (maintainer 「同意」
2026-09-15T15:20Z): a record id at the `DataSource` boundary is a
string.
objectui#9333 narrowed `update`; this branch narrows three more doors.

## What landed

| declaration | before | after |
|---|---|---|
| `DataSource.delete` — `id` | string OR number | **string** |
| `DataSource.bulkUpdate` — `ids` | ReadonlyArray OF (string OR number)
| **ReadonlyArray OF string** |
| `DataSource.bulkDelete` — `ids` | ReadonlyArray OF (string OR number)
| **ReadonlyArray OF string** |
| `UseViewDataResult.fetchOne` — `id` (`@object-ui/react`) | string OR
number | **string** |

⚠️ The type spellings in that table are written as WORDS (`OR`,
`ReadonlyArray
OF`). GitHub's body sanitizer eats tag-shaped fragments even inside
backticks,
and it has previously collapsed both columns of exactly this kind of
before/after table into the same string.

Plus the thing the ruling's acceptance asks for: the `DataSource`
docblock now
states the rule once, for the whole interface, including why the last
door is
still open — so the next reader does not rediscover the asymmetry.

The three one-layer-in declarations the ruling names
(`TransactionOperation.id`,
`UserPreferenceRecord.id`, `resolveRecordId`'s return) were **already
narrowed**
by the merged objectui#9501; verified by symbol on this tree. `fetchOne`
is the
one the compiler added to that list.

## What did not land, and why

⚠️ **This section was re-derived after the at-tier review failed its
first
version.** The earlier text said `findOne`'s remaining readers resolve
to two
authorable metadata keys, with six of them in `@object-ui/plugin-form`.
That was
false, and it shipped in the docblock and the changeset as well as here.
What
follows is re-measured on this branch; the docblock and the changeset
now carry
the same corrected reading.

`DataSource.findOne` keeps `string OR number`. The compiler enumerated
nine
in-tree call sites for it; one was `fetchOne` (narrowed here), and the
other
eight split two ways.

**Three read AUTHORABLE metadata keys.** `ObjectForm.tsx` reads
`ObjectFormSchema.recordId` (`packages/types/src/objectql.ts` + its zod
mirror);
`DetailView.tsx` reads `DetailViewSchema.resourceId` at two sites
(`packages/types/src/views.ts` + `zod/views.zod.ts`). ⚠️ A sibling
declaration of
the same key, `DetailSchema.resourceId`, lives in `crud.ts` +
`zod/crud.zod.ts`
and is **not** read by either red site — four declaration sites of
`resourceId`
across four files, owned by two symbols. Measured against the BUILT
mirrors,
with a lit control in the same pass:

```
ObjectFormSchema.safeParse({type:'object-form', objectName:'accounts', mode:'edit', recordId: 42})
  -> success = TRUE, and the parsed document KEEPS 42 as a number
ObjectFormSchema.safeParse({… recordId: '42'})            -> TRUE
LIT CONTROL  ObjectFormSchema.safeParse({… recordId: {}}) -> FALSE (invalid_union)
DetailViewSchema.safeParse({type:'detail-view', objectName:'accounts', resourceId: 42})
  -> TRUE
LIT CONTROL  DetailViewSchema.safeParse({… resourceId: {}}) -> FALSE (invalid_union)
```

**Five read a `recordId` on their OWN exported schema face** —
`DrawerForm`,
`ModalForm`, `SplitForm`, `TabbedForm`, `WizardForm`, each declaring its
own
`FormSchema` interface in its own file and exporting it from
`packages/plugin-form/src/index.tsx`. Those faces are TypeScript-only,
i.e. the
same class as `UseViewDataResult.fetchOne`, which this PR narrows:

| instrument | the five | lit control | corpus |
|---|---|---|---|
| occurrences in the zod mirror tree | 0 each | `ObjectFormSchema` = 5 |
`packages/types/src/zod/` |
| node-type string literal outside tests | 0 each | `'object-form'` = 34
| `packages/*/src`, `apps/*/src` |

Both instruments fire on the control, so those zeros are readings rather
than
dead queries.

**They still cannot narrow ahead of the decision, and that is measured
too.**
`ObjectForm` BUILDS all five of those schemas from its own authorable
`ObjectFormSchema`. Narrowing the five alone was probed on this branch:
the five
declarations were rewritten to `string` (landing proven on disk — five
files
injected, zero left wide), the packages rebuilt, and `ObjectForm.tsx`
answered
`TS2322` at five hand-off sites, one per delegated form, each reading
`Types of property 'recordId' are incompatible`. The probe was restored
with
`git checkout HEAD --` and an empty `git status` proves it.

⇒ closing `findOne` means either **narrowing a published authoring
face** (author
JSON that validates today stops validating — an accept-set change the
ruling does
not name) or **converting at a reader** (which the ruling's own "the
conversion
lives in one typed place" argues against). Both are decisions, not
implementations, so they are carried to the card rather than picked here
— and
the five TypeScript-only faces travel with that decision instead of
ahead of it.

Second, independent block on the authorable half:
`packages/types/src/objectql.ts`
and `packages/types/src/zod/objectql.zod.ts` are the declared file
surface of
in-flight card objectui#9606. The dispatch order for this card says to
stop and
report rather than edit them, so this card yields on that half.

## Measurements

Every exit code was captured to disk before any pipe.

| gate | exit | printed verdict |
|---|---|---|
| `turbo run build type-check --filter='!@object-ui/site'
--concurrency=2 --continue` | 0 | `Tasks: 88 successful, 88 total` |
| `examples/byo-backend-console` → `pnpm run type-check` | 0 | `tsc
--noEmit`, no diagnostics |
| `@object-ui/core` → `pnpm run type-check` | 0 | `tsc --noEmit && tsc
-p tsconfig.test.json`, no diagnostics |
| `vitest run packages/types/ packages/react/` | 0 | `Test Files 290
passed (290)` · `Tests 5778 passed (5778)` |
| `vitest run packages/data-objectstack/` + the two bulk-path files | 0
| `Test Files 68 passed (68)` · `Tests 918 passed (918)` |
| `pnpm --filter @object-ui/types --filter @object-ui/react run lint` |
0 | `362 problems (0 errors, 362 warnings)` — all pre-existing |
| `node scripts/check-changeset-presence.mjs` | 0 | 3 source files of 2
released packages, 1 changeset declared |
| `node scripts/check-changeset-no-major.mjs` | 0 | `No changeset
declares a major bump.` |
| `node scripts/check-changeset-fixed.mjs` | 0 | `All workspace packages
are in the changeset fixed group.` |
| `node scripts/check-new-cross-file-line-citations.mjs` | 0 | `0 new
citation(s)` |
| `node scripts/check-control-bytes.mjs` | 0 | scanned 7813 tracked text
files |

### The opposite-answer probe, per door

A temporary probe under `packages/types/src/__tests__/` (removed before
the first
commit) called each door with a numeric id and was compiled by
`tsc -p packages/types/tsconfig.test.json`:

- **before** the narrowing: exit **0** — all four numeric calls
accepted.
⭐ Lit control in the same file and the same run: `update`, already
narrow on
`main`, produced exactly one `TS2345`. So the instrument reports
numeric-id
  refusals; the four zeros were absence, not a dead query.
- **after** the narrowing: exit **2** — `findOne` `TS2345`, `delete`
`TS2345`,
`bulkUpdate` `TS2322`, `bulkDelete` `TS2322`, while the four string
calls beside
  them stayed legal.

### Ablation of the new pin

`packages/types/src/__tests__/data-source-id-surface-9511.test.ts` was
ablated by
widening `delete`'s `id` back, from a committed tree:

- mutation proven on disk: injected spelling present (1), byte size
53257 → 53266,
  blob `805d1269` → `619d0d9a`
- ablated `vitest`: exit **1** — `Tests 1 failed | 8 passed`, message
  `DataSource.delete declares a record id wider than the protocol.`
- ablated `tsc -p tsconfig.test.json`: exit **1** — `TS2344` on the
`Equal` row and
`TS2578` (unused directive) on the `@ts-expect-error` call-site control,
i.e.
  both designed failure modes
- restored with `git checkout HEAD -- packages/types/src/data.ts`;
restoration
proven by blob equality (`805d1269` both sides) and an empty `git diff
HEAD`

### Probe: can the five TypeScript-only form faces narrow on their own?

No, and the answer is a build, not an argument. The five `recordId`
declarations
were rewritten to `string`; the mutation was proven on disk (five files
carrying
the injected spelling, zero left wide) before anything was read.
`plugin-form`
then failed to build with `TS2322` at five `ObjectForm.tsx` hand-off
sites —
`ObjectForm` constructs each delegated schema from its own authorable
`ObjectFormSchema`. (`plugin-designer`'s failures in the same run are
cascade:
`TS7016`, no `plugin-form` dist.) Restored with `git checkout HEAD --`,
proven
by an empty `git status`.

### Cost attribution, per door

With `findOne` alone widened back and the other three doors narrowed,
the whole
repo builds: `Tasks: 43 successful, 43 total`, exit 0. ⇒ `delete`,
`bulkUpdate`
and `bulkDelete` have **zero** call sites in this monorepo that had to
change;
the entire call-site cost of this card belongs to `findOne`.

## Acceptance notes

- The ruling cites `data.ts` at three line addresses; all five members
were
located **by symbol** instead, and no line address was written into any
  published text here.
- Noted, not filed: `data.ts` carries an **orphaned** docblock — the
"Universal data source interface" comment sits about seventy lines above
`export interface DataSource`, immediately before the `GlobalSearchHit`
comment, so `DataSource` itself had no attached doc at all. That is why
the
rule went into a **new** block attached to the interface rather than
into that
one. Left in place deliberately: moving it is a different defect class
from
this card's, and no in-flight PR or reader is blocked by it. Successor:
none
  identified.

## Review posture

⛔ Draft, ⛔ not enqueued, ⛔ no auto-merge — the PM runs an at-tier
contract
review first. `needs:contract-review` is hung on this PR as well as on
the card.

Generated by Claude Code in session `session_01UanLVj6xvbS6puBCewLr8L`
(session
URL repeated here as prose because a later edit downgrades the footer
below).

---

_Generated by [Claude
Code](https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L)_


---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
… array as 「no adapter needed」 (objectstack-ai#9783)

Fixes objectstack-ai#9580

`Clause-②: no`

`object-grid`'s 「no data source」 gate stops treating a bare `data` ARRAY
as evidence that a
placement can draw rows without an adapter.

## The defect

`gridNeedsDataSource` in `packages/plugin-grid/src/index.tsx` enumerates
the escape hatches that let
THIS placement draw rows without a runtime adapter, and
`Array.isArray(schema.data)` was one of
them. Both carriers of that shorthand had already been retired:

- objectui#8348 (「8348 以协议为准」, decision batch objectstack-ai#83) at the shared
record-source ladder — this
  block's published `data` row is the `ViewData` OBJECT arm;
- objectui#9571 (ruling objectui#8348 Q2-C, batch objectstack-ai#136 item 3,
maintainer 「同意」) at the props
channel — `SchemaRenderer` no longer spreads an authored `data` as a
React prop for a block on
  that arm.

⇒ an authored array draws **nothing**, while the predicate still
answered 「this placement needs no
adapter」. So a grid authored with a bare `data` array, an `objectName`
and no adapter rendered the
EMPTY SHELL that objectui#5378 item 2 exists to replace, with the one
diagnostic addressed to exactly
that situation staying silent. The warn-once objectui#9571 added at the
strip site is `__DEV__`-only;
this gate is the production-facing half.

⛔ The bare-array CARRIER is **not** re-opened — that was ruled twice.
Only what the gate SAYS moves.

## The change

- `packages/plugin-grid/src/index.tsx` — one line removed from the
predicate
(`Array.isArray(schema?.data)`), and the docblock that enumerates the
hatches re-derived: it had
also carried the now-false clause that `getDataConfig` folds an array
`data` into inline rows.
-
`packages/plugin-grid/src/__tests__/gridNeedsDataSourceBareArray-9580.test.tsx`
— the pin, 8 rows.
- `.changeset/9580-grid-needs-datasource-bare-array.md` — `patch` on
`@object-ui/plugin-grid`; the
behaviour of a published block moves, so this is not a `skip-changeset`
change.

## Premises re-verified on `origin/main` before writing anything

The card is written in the conditional (「After objectui#9571 lands」).
Re-taken on
`f0b49792159de76697b06109bfe7760938e463a0`, which is this branch's base
and was `origin/main` at
branch time:

| Premise | Reading |
|---|---|
| `SchemaRenderer` no longer spreads an authored `data` for a
`view-data`-arm block | TRUE — the strip is live in
`SchemaRenderer.tsx`, gated on `'data' in componentProps &&
recordSourceDataArmForType(type) === 'view-data'` |
| `gridNeedsDataSource` still returned false for
`Array.isArray(schema?.data)` | TRUE — the line was present in
`packages/plugin-grid/src/index.tsx`, unmoved |
| objectui#9571's mitigation is `__DEV__`-only | TRUE — the strip site
calls `reportRefusedDataPropSpread` under `if (__DEV__)`, and that
function's own docblock says 「Read-only and `__DEV__`-only」 |

⇒ the defect exists as written; `premise_still_valid: true`.

## The pin can go red — measured, not asserted

The repair was committed first, then the removed line was planted back
through
`ablation-replace.mjs` (literal anchor, hit count declared, write
verified against the DISK and
against `git hash-object`, restore proven by blob-equals-HEAD plus an
empty `git diff HEAD`).
Predicted direction before running: 转红 — rows 1-2 fail, every control
holds.

```
ablation-replace: ok mutation landed: anchor 1 -> 0, blob b0c0ade -> d9f649b0cf7a
  × 1. REPRODUCTION: bare `data` array + `objectName` + no adapter => the gate FIRES   1067ms
  × 2. ...and it says the sentence the family says, naming THIS block and object       1015ms
 Test Files  1 failed (1)
      Tests  2 failed | 6 passed (8)
ablation-replace: ok restored: blob == HEAD (b0c0ade) and `git diff HEAD` is empty
```

With the repair in place the same file is `Tests 8 passed (8)`. The
ablation runs entirely against
SOURCE — the root vitest config aliases `@object-ui/react` to
`packages/react/src` and the block
itself is imported relatively — so there is no `dist/` leg for it to be
true-but-unbuilt in.

Rows 3-8 are the controls that a repair reaching too far would break:
the declared
`data: { provider: 'value', items: [...] }` form, the deprecated
`staticData` array, the data-scope
`bind`, the `data` REACT PROP a host such as `plugin-list`'s `ListView`
uses to hand down rows it
already fetched (the leg objectui#9571 deliberately kept), the
`objectName` clause, and a grid that
HAS an adapter.

## Local verification

Gate list hand-derived from this repo's `package.json` and
`.github/workflows/` —
`scripts/pm/dispatch-gates.mjs` lives only in `objectstack` and refuses
to answer for this repo.
Exit codes were redirected to files and read from there, never from a
pipeline's tail.

| Check | Verdict |
|---|---|
| `pnpm exec vitest run
packages/plugin-grid/src/__tests__/gridNeedsDataSourceBareArray-9580.test.tsx`
| exit 0 — `Tests 8 passed (8)` |
| `pnpm exec vitest run packages/plugin-grid/` | exit 0 — `Test Files
136 passed (136)`, `Tests 1259 passed (1259)` |
| `pnpm exec vitest run packages/plugin-view/ packages/plugin-list/` |
exit 0 — `Test Files 120 passed (120)`, `Tests 1342 passed (1342)` |
| spot run: the console, core and schema-catalog files that author an
`object-grid` with a bare `data` array | exit 0 — `Test Files 3 passed
(3)`, `Tests 691 passed (691)` |
| `pnpm --filter @object-ui/plugin-grid run type-check` | exit 0 — both
legs (`tsc --noEmit` and `tsc -p tsconfig.test.json`; the first EXCLUDES
`__tests__`, which is why the second is the one that reads the new pin)
|
| `pnpm --filter @object-ui/plugin-grid run lint` | exit 0 — 841
warnings, 0 errors (all pre-existing `no-explicit-any` / react-hooks
advisories) |
| `pnpm --workspace-concurrency=2 --filter "@object-ui/plugin-grid^..."
build` | exit 0 |
| `check-changeset-presence` · `check-changeset-no-major` ·
`check-changeset-claims` · `check-pending-changeset-literals` | exit 0 |
| `check-control-bytes` · `check-new-cross-file-line-citations` ·
`check-test-path-roots` | exit 0 |
| `check-element-data-source-declaration` ·
`check-component-surface-parity` · `check-registry-bare-name-collisions`
· `check-unreferenced-sources` · `check-lint-rule-coverage` | exit 0 |
| `check-vi-mock-specifiers` · `check-vi-mock-inherit` ·
`check-vi-mock-override-shape` · `check-comment-mask-corpus` | exit 0 |
| `check-sdui-registration-pins` | **NOT MEASURED** — exit 2,
prerequisite not met: it needs an `apps/console` bundle to weigh. Owned
by `performance-budget.yml`, which builds the console first. No
registration array moved in this diff. |
| repo-wide `pnpm lint` / full `pnpm test` | left to CI — the affected
package's own `lint` and the three suites above are the narrowed
substitute, declared here rather than skipped silently |

Byte scan beyond the gate: `grep -naP
'[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'` over both changed source
files returns nothing.

## Acceptance notes

⚠️ Out of scope, noted and NOT filed —
`packages/plugin-grid/src/ObjectGrid.tsx` is outside this
card's declared file surface, so it is untouched here. Its
`getDataConfig` docblock still states as a
MEASURED conclusion that an authored `data` array reaches the component
TWICE and that 「through
`SchemaRenderer` an authored `data: [ ...rows... ]` still draws, from
the props channel」. objectui#9571
made both halves false, and the pin that paragraph cites — row 3 of
`__tests__/gridBareArrayDataRefused-8348.test.tsx` — now asserts the
opposite in the same tree. It is
prose drift rather than one of the three filing classes, so no card is
raised from here; per
AGENTS.md it is the kind of thing the next change to that file repairs
opportunistically. Named
handler: none. Dedupe terms if a seat does decide to file it:
`getDataConfig` · `passedData` ·
`two carriers` · `props channel` · `objectui#9571 docblock drift`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_018HrVaotisyhgmot9o2MLRq

---
_Generated by [Claude
Code](https://claude.ai/code/session_018HrVaotisyhgmot9o2MLRq)_

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…ames one (objectui#9511) (objectstack-ai#10141)

Fixes objectstack-ai#9511

`Clause-②: yes`

Executes director batch **objectstack-ai#195 item 1, letter A** (comment `5749154869`,
maintainer 「同意」 2026-09-20T10:11Z), standing on batch objectstack-ai#136 item 5 letter
B. The ruling's operative clause, quoted:

> A record id is a **string** wherever metadata names one. The six
declarations (`ObjectFormSchema.recordId`,
`DetailViewSchema.resourceId`, `DetailSchema.resourceId` — TS
declaration and zod mirror each) narrow to `string`, and so do
`CommentEntry.recordId` and `MentionNotification.recordId` (the same
principle; a knowing decision, as the seat asked for).
`DataSource.findOne` then narrows to `string` and the five
TypeScript-only plugin-form faces fall out of `ObjectForm`'s own schema.

and its acceptance pin:

> pin: `{ type: 'detail', resourceId: 42 }` is refused with the
prescription, `'42'` parses, and all five `DataSource` id parameters
read `string`.

---

## 维护者速读

**改了什么。** 记录 id 从今天起在**每一扇门**上都是字符串。第五扇也是最后一扇门 `DataSource.findOne`
收窄了,连带它背后三个**作者直接手写**的元数据键也收窄了 —— 表单的 `recordId`、详情的
`resourceId`(两个拼法、三处声明),每个都在**两张已发布的面**上同时动:TypeScript 声明,和手写的 zod 校验器。

**为什么必须动 zod 那一半。** 因为 **TypeScript 声明在解析时根本不运行**。作者写进 JSON 的数字,只有 zod
校验器拦得住。只改声明、不改镜像,结果是已发布面上的 `declared ≠ enforced`,而且
`zod-mirror-parity.test.ts` **会一路绿着放它过去** ——
那个仪器只抓「镜像比声明更窄」,镜像更宽它不吭声。所以两张面一起动,这是本卡真正的技术核心。

**作者会看到什么。** 今天把记录 id 写成裸数字的元数据,升级后**校验不过**,而且报错会直接告诉你怎么改:加引号,`42` 写成
`'42'`。⛔ **平台不会替你转换**,这是故意的 ——
主键是数字的部署方在**自己的适配器边界**转一次,于是下游每个作者、每个调用方、每个适配器看到的都是同一种形状。这类部署方的线上字节其实早就是
`'42'` 了(`update` 在 objectui#9333、`delete`/`bulkUpdate`/`bulkDelete` 在
objectui#9712),本卡只是让最后那扇不一致的门跟上。

**代价在哪。** 另外四扇门当初在本仓**一个调用点都不用改**;成本全在 `findOne`
这一扇,因为它的读取方是作者面。这次连带动了五张表单面,外加两处编译器强制的残留(下面单独交代)。

**风险与回滚。** 风险集中在一件事:外部消费者如果手写了数字 id,升级即报错 —— 这正是裁决要的效果,报错带修法。回滚就是 revert
本 PR,没有数据迁移、没有生成物、没有 schema 基线要还原。

**你要做的。** 这是一次作者面收窄,`Clause-②` 已申报 `yes`,下面是完整的 accept-set 测量。⛔ 未获批准前本
PR 停在 draft,不翻 ready、不入队。

---

## Clause-② — the accept set moved, measured in both directions

Differential over **45 documents** across the three mirrors, parsed
twice: once on this branch's freshly built `dist` (`--force`, no cache,
from `813aaf75`) and once on a comparison worktree at the merge base
`0c2eb5eee0`. Same script, same corpus, same instrument on both sides.

| reading | count |
| --- | --: |
| GREEN to RED | **9** |
| **RED to GREEN** | **0** |
| verdict unchanged | 36 |
| refusals carrying the prescribed repair | **9 / 9** |

The 9 that moved are the only 9 that could: the three keys times three
numeric spellings (integer `42`, negative `-1`, float `4.5`). Every one
refuses with `invalid_type` **at that key's own path**, and every
message names both `'42'` and `objectui#9511`.

**Nothing that parsed red now parses green** — that is the `RED to
GREEN` row, and it is a measurement over a corpus deliberately stocked
with already-red documents, not an inference from the shape of the edit.

**Every zero carries a lit control on the same instrument and corpus:**

| control | role | reading |
| --- | --- | --- |
| `title: 42` / `objectName: 42` | **lit** — keys that were already
string-only | refused `invalid_type`, before and after |
| `type` set to a wrong literal | **lit** — the mirror still reads its
own discriminator | refused `invalid_value`, before and after |
| object / array / boolean / `null` at the same key | **red-both, 21
rows** | refused before, refused after — nothing was loosened while the
number arm was removed |
| key absent, `'42'`, `'rec_1'`, `''` | **green-both, 15 rows** | parsed
before, parses after — the mirror has not started refusing everything |
| `zzqNoSuchKey` | **absent control** | green both sides (base is
passthrough), so the corpus is not silently all-red |

⭐ Without the red-both and green-both halves the 9 refusals would prove
nothing: a mirror that had simply broken would pass the subject rows
too.

**All five `DataSource` id parameters read `string`** — `update`,
`delete`, `bulkUpdate`, `bulkDelete`, `findOne` — asserted two ways in
`data-source-id-surface-9511.test.ts`: compile-time `Expect` rows judged
by `tsc -p tsconfig.test.json`, and a runtime census over the
declaration text that reds even in a tree where `tsc` never runs.

## Reverse verification — both new pins are proven able to fail

Run through `ablation-replace`, which requires the anchor to hit and
verifies the mutation on disk by blob hash before the command runs, then
restores and proves the restore byte-identical.

| leg | mutation | on-disk evidence | result |
| --- | --- | --- | --- |
| 1 | `crud.zod.ts` `resourceId` back to the union | anchor 1 to 0, blob
`e70c30156759` to `90bb646a8847` |
`authorable-record-id-string-9511.test.ts` **5 failed / 28 passed** |
| 2 | `data.ts` `findOne` back to `string or number` | anchor 1 to 0,
blob `0f2a090279e1` to `3b5444834866` |
`data-source-id-surface-9511.test.ts` **1 failed / 11 passed** |

Both restored: blob equals HEAD, `git diff HEAD` empty. ⭐ Leg 1 is the
sharper reading — only the `DetailSchema` rows went red while the other
two mirrors stayed green, so the pin discriminates per mirror instead of
failing wholesale. Leg 1 also proves these pins resolve the **source**
and not a stale `dist`: no rebuild happened between mutation and red.

## The two paths outside the granted file surface — kept, and why

Both are compiler-forced fallout of the ruled narrowing, not scope
creep. The full build does not compile without them, and each is the
identical one-token edit as the five granted plugin-form faces.

**`packages/plugin-grid/src/components/BulkActionDialog.tsx`** —
`BulkActionDialogProps.dataSource` hand-restates `findOne`. Without the
edit:

```
src/ObjectGrid.tsx(5476,7): error TS2322: Types of property 'findOne' are incompatible.
  Type 'string | number' is not assignable to type 'string'.
```

⭐ This is the one shape in the tree where narrowing the protocol reaches
a consumer at all. The interface declares `findOne` as a **method**,
which TypeScript compares bivariantly — that is why the `DataSource`
docblock has always warned that narrowing here does not reach
implementors. This face declares it as a **property**, which is checked
contravariantly under `strictFunctionTypes`. That file's own comment had
already predicted the event, in terms: it says deriving those doors from
`DataSource` means "any future drift of that face reddens HERE instead
of passing silently". It did.

**`packages/plugin-view/src/ObjectView.tsx`** — `buildFormSchema`
asserted an untyped record bag's id as `string or number or undefined`
and assigns it into the now-narrowed `ObjectFormSchema.recordId`.
Without the edit: `src/ObjectView.tsx(1989,7): error TS2322`.
`selectedRecord` is a `Record` of unknowns, so this was **always** a
hand-written assertion; it now asserts the protocol instead of the wide
shape. ⛔ Deliberately **not** `String(...)` — a reader-side coercion is
the option the ruling refused by name, because eight such sites
contradict 「the conversion lives in one typed place」.

⚠️ **How they were found matters, because the first survey missed
them.** An earlier by-declaration survey of `findOne` call sites
concluded every other site was already string-clean. That survey was
incomplete by construction: the failing `plugin-form` task had stopped 5
of 29 build tasks from ever running. Re-run with `plugin-form`
compiling, the build reached all **43** tasks and named these two. ⇒ the
reading in this PR is **by compiler**, not by declaration, and 43 of 43
tasks now report.

## The ruling's `KnownDrift` note is an instruction over an EMPTY SET

The ruling's execution section asks for 「the `KnownDrift` /
mirror-parity ledger rows shrunk in the same change」. **There are none
to shrink.** Measured in
`packages/types/src/__tests__/zod-mirror-parity.test.ts`: `resourceId`
appears **0** times and `recordId` **1**, and that single hit is prose
about an `onNavigate` signature, not a ledger row. Independently
re-verified by the dispatching seat against `MirroredUndeclared` **50**
as the control, so the zero is a real absence and not a dead query.

⇒ `zod-mirror-parity.test.ts` is **untouched** — which is also why
excluding it from this PR's file surface cost nothing. Stated here so
the next reader does not go hunting for rows that never existed.

## Gates — hand-derived, since `dispatch-gates.mjs` refuses for objectui

That script derives families from the objectstack tree it runs in and
says so outright; this list comes from objectui's own root
`package.json` scripts and `.github/workflows/`. Every exit code was
captured to a file **before** any pipe.

| gate | exit |
| --- | --: |
| `turbo run build --filter=!@object-ui/site --force` (43 of 43 tasks) |
**0** |
| `turbo run type-check` (81 of 81 tasks) | **0** |
| `vitest run` over the four affected packages — 504 files, 7685 passed,
1 skipped | **0** |
| `turbo run lint` over the four affected packages (0 errors; 875
pre-existing warnings) | **0** |
| the two new/extended pin files alone — 45 tests | **0** |
| `check:control-bytes` · `check:new-line-citations` (0 new) | **0** ·
**0** |
| `check-changeset-fixed` · `check-changeset-no-major` ·
`check-changeset-presence` | **0** · **0** · **0** |
| `check:pending-changeset-literals` · `check:changeset-claims` | **0**
· **0** |
| `check:spec-symbols` · `check:component-surface-parity` (report-only)
| **0** · **0** |
| `check:doc-types` · `check:doc-snippets` (672 of 672 blocks judged) ·
`check:doc-examples` · `check:doc-fences` · `check:doc-example-ids` ·
`check:doc-example-readers` | all **0** |
| `check:prompt-keys` · `check:registry-bare-names` ·
`check:handler-key-reads` · `check:designer-field-key-parity` | all
**0** |
| `check:test-path-roots` · `check:vi-mock-specifiers` ·
`check:vi-mock-inherit` · `check:vi-mock-override-shape` | all **0** |
| `check:readme-exports` · `check:unreferenced-sources` ·
`check:self-import` · `check:sdui-registration-pins` ·
`check:element-data-source-declaration` | all **0** |
| `check:skills-paths` · `check:skill-examples` | **0** · **0** |
| `check-governed-queue-guard --test` over 6 changed paths | **0** — NOT
GOVERNED, none of the 5 governed surfaces matched |

**Honest notes on three of those readings, rather than letting them read
stronger than they are.**

- `check:skill-examples` exits 0 over **0 selected fences** — no marked
skill example carries these types, so that gate's corpus for this diff
is empty. It is a real zero, ⛔ not coverage.
- `check:component-surface-parity` and `check:new-line-citations` are
**report-only** by their own design; their 0 means "no findings", not
"blocking and green".
- The test-and-lint pair ran inside one lock invocation joined with `;`,
so the wrapper printed `batch-last-exit` and warned it does not cover
both parts. That warning is correct and the wrapper's number is ⛔ not
used here: each part's own exit code was written to its own file (`0`
and `0`) and those are what the table reports.
- `turbo run type-check` was measured on tree `0492a2b5`. HEAD differs
from that tree by **exactly one file** —
`.changeset/9511-record-id-is-a-string.md` — and no tsconfig project in
this repo includes `.changeset` (the one textual hit in
`tsconfig.scripts.json` is inside a comment). The reading therefore
transfers; said explicitly rather than presented as a run on HEAD.

## A note on this branch's history

The first commit on this branch, `0492a2b5`, is labelled INCOMPLETE AND
UNREVIEWED and was **not authored by this seat** — the dispatching seat
made it to stop the container reclaiming an idle worktree after this
seat hit the usage wall mid-task. Every hunk in it has since been
re-read line by line against the ruling and against the granted surface,
and is adopted deliberately in `813aaf75`. Nothing in it was built on
unreviewed. This repository squash-merges, so that WIP message does not
reach `main`; this body is the record.

## In-flight overlap, declared

Two open pull requests touch files this one touches. Both unions are
trivial and neither overlaps a line here:

- **objectui#9540** (`ObjectGallerySchema.filter`) touches
`packages/types/src/objectql.ts` and
`packages/types/src/zod/objectql.zod.ts` — different keys, different
members. Whichever lands first, the other rebuilds in the queue.
- **objectui#8941** (lucide bump) touches
`packages/plugin-grid/package.json`, `packages/plugin-form/package.json`
and `packages/types/src/objectql.ts` — manifests and an unrelated
member.

⚠️ Cross-card interaction accepted by the dispatching seat:
**objectui#8345** derives a strict authoring twin from these mirrors, so
its measured refusal figures move when this lands. The files are
disjoint (it was re-scoped onto `strict-authoring-face.ts`) and the
merge queue arbitrates.

## Acceptance notes

- `packages/plugin-form/src/MasterDetailForm.tsx` still declares
`recordId` as `string or number`. ⛔ Left alone deliberately: it is not
one of the five faces the ruling names, it does not hand that value to
`findOne` (it goes through `String(...)` at its own read point), and it
therefore does not break the build. It is the same *survivor* class as
the three declarations on **objectui#10078** and belongs with them in
one decision rather than being narrowed here on this seat's own
initiative. **noted, not filed** — successor: whoever answers
objectui#10078.
- `DataSourceMutationEvent.id`, `CommentSearchResult.recordId` and
`RecordSubscription.recordId` are on **objectui#10078** and are ⛔ not
touched here.
- No reader-side conversion was added anywhere in this diff. The count
of `String(...)` coercions introduced is **zero**, which is the
measurable form of the ruling's 「the conversion lives in one typed
place」.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QVJUngS9FKfuyQ9NFR2Nbn)_

---------

Co-authored-by: os-steve <os-steve@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
os-support-ai pushed a commit that referenced this pull request Sep 30, 2026
…otocol row declares

`ComponentPropsMap['object-tree']` in the installed `@objectstack/spec` now
declares `data` as the `ViewData` union and `staticData` as an array, so the
tree is judged against its own row like the other ladder blocks (decision
batch #83, 「8348 以协议为准」; ruling batch #136 item 3, Q1-C). The ruling's
「协议没有的能力删」 clause does not fire: the row declares `data`, so the tree
keeps the object arm and loses only the bare-array spelling.

- `record-source.ts`: the four tree spellings move from `undeclared` to
  `view-data` in the arm table, so `SchemaRenderer` stops spreading an
  authored `data` on a tree node as a prop.
- `ObjectTree.tsx`: the ladder call passes `view-data`, and the fetch effect
  no longer reads `schema.data` beside the host prop; that second reader
  bypassed the ladder, so the arm move alone removed nothing end to end.
- map, gantt, tree: one pin per block derives the arm from the installed row
  and compares it with the arm table for every registered key. The map and
  gantt call-site comments stop restating the interim reading.

Part of #8348

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 7, 2026
…tree against their spec rows; the tree stops honouring an undeclared bare-array data (objectui#8348) (objectstack-ai#11200)

Fixes objectstack-ai#8348
Clause-②: no

The last slice of objectui#8348: the three ladder blocks that had no
protocol row are now judged against the rows ruling batch objectstack-ai#136 item 3
(Q1-C) had the protocol gain, and `object-tree` stops honouring the one
`data` spelling its row does not declare.

## What the installed spec says (step zero, re-measured before any edit)

Resolved from `packages/plugin-tree/package.json` (a package that
declares the spec), entry `@objectstack/spec/ui`, installed version
**17.5.0**:

| row | present | `data` | `staticData` | bare array under `data` | `{
provider: 'value', items }` under `data` |
|:--|:--|:--|:--|:--|:--|
| `object-map` | yes | `ViewData` union (`object`, `api`, `value`,
`schema`) | array | refused, `invalid_type`, expected object | accepted
|
| `object-gantt` | yes | same | array | refused, same | accepted |
| `object-tree` | yes | same | array | refused, same | accepted |
| CONTROL A `object-calendar` | yes | array | n/a | accepted | refused,
`invalid_type`, expected array |
| CONTROL B `BOGUS_CONTROL_BLOCK` | **no** | | | | |

This is the reading the seat review on the card recorded from
objectstack source, now on the installed artifact. The ruling's
「协议没有的能力删」 clause does **not** fire: the tree's row declares `data`. So
the tree keeps the object arm and loses only the bare-array spelling,
and its `staticData` rung is kept, because the same row declares it.

## What changed

- **`@object-ui/core` `record-source.ts`.** In
`RECORD_SOURCE_DATA_ARM_BY_TYPE`, the four tree spellings move from
`undeclared` to `view-data`. Before, those rows only documented the
default; now they decide, so `SchemaRenderer`'s objectui#9571 strip
reaches tree nodes. The per-block docblocks now name the pins that
derive each arm from the installed row, and no longer restate an answer
tied to a version (AGENTS.md objectstack-ai#9).
- **`@object-ui/plugin-tree` `ObjectTree.tsx`.**
  - The ladder call passes `'view-data'`.
- **Leg C:** the fetch effect's `rest.data ?? schema.data` +
`Array.isArray` read becomes `rest.data`, the host prop only. The
authored key now has ONE reader, the ladder. The old reader bypassed the
ladder, so an arm move that left it in place would have removed nothing
end to end.
- **Pins, one per block, each derived from the INSTALLED row and never
restated:**
  - `ObjectMap.dataArmSpecRow-8348.test.tsx`
  - `plugin-gantt` `dataArmSpecRow-8348.test.ts`
  - `ObjectTree.dataArmSpecRow-8348.test.tsx`

Each one walks `ComponentRegistry.getAllTypes()` for the keys that
resolve to its renderer, reads the arm off
`ComponentPropsMap[type].shape.data` by parsing one value of each arm,
and requires `recordSourceDataArmForType` to agree for every key.
Controls in each: the calendar row reads `array`, and a bogus block
reads `no row`.
- **Behaviour pins for the tree**, all through the real `SchemaRenderer`
and the package's own registration except row 6:
  - declared `{ provider: 'value', items }` draws its rows;
- a bare array draws nothing (`No records`), with one `SchemaRenderer`
dev warning;
  - with an `objectName` beside it, the tree queries that object;
  - `staticData` still draws;
  - a host `data` prop still draws;
  - row 6: mounted directly, the authored array draws nothing.
- **Existing pins moved with the table:**
`SchemaRenderer.dataPropArm-9571` and
`SchemaRenderer.legacyPropsDataStrip-9758` list the tree spellings on
the object arm, and `record-source-config.behaviourNeutrality-7632`
passes the tree the `view-data` arm, with a control leg showing that the
tree's pre-8348 body took the array.
- **Map and gantt: comments only.** The `getDataConfig` docblock in
`ObjectMap.tsx`, the `rawDataConfig` comment in `ObjectGantt.tsx` and
the map shorthand pin's docblock stated the interim reading, "no
`ComponentPropsMap` row exists, judged through `@object-ui/types`". They
now point at the per-block pins. No logic moves on either block.
- **Changesets, one per block.** The tree's is `minor`: a breaking
behaviour change, stated per spelling. Map and gantt each get an empty
frontmatter, since no behaviour moves on either. The card's earlier
pending changeset is also corrected: its tree, map and gantt bullets had
described the missing rows in the present tense, which would be false in
the release that also carries this change. `check-changeset-overwrite`
reports that edit, as designed.

## The outcome for a stored tree, named

A tree authored `data: [ …rows… ]` stops drawing those rows. The ladder
falls through to `staticData`, then `objectName`. With neither, the tree
shows `No records`. With an `objectName`, it queries that object. In a
development build `SchemaRenderer` warns once, naming the key and the
spelling that works; in production the change is quiet. `object-map` and
`object-gantt` already give this outcome for the same spelling, through
the same ladder, arm and diagnostic. No third behaviour was invented.

**Authored instances found: none.** No authored `object-tree` / `tree`
node in this repo's examples, apps, docs or skills, or in objectstack
`origin/main`'s examples, carries `data`. The two hosts (`ListView`,
`ObjectView`) put no `data` on the tree schema; they hand rows down as
the host prop, which is untouched.

## Tests: the union at final head `bdea39fc6` (clean tree)

Every command ran through the shared verify lock.

- `pnpm exec vitest run packages/plugin-tree/ packages/core/src/utils/`
gave `Test Files 121 passed (121)`, `Tests 1969 passed (1969)`.
- `pnpm exec vitest run` over the following gave `Test Files 237 passed
| 1 skipped (238)`, `Tests 2615 passed | 114 skipped (2729)`. The skips
are the pre-existing `describe.runIf(DRIVEN)` timezone rows in
`plugin-gantt`.
  - `packages/plugin-map/`, `packages/plugin-gantt/`, `packages/react/`;
- console: `filterContextTokensSweep-10666`,
`public-block-binding-reach`, `registry-inputs-spec-parity`;
  - `ObjectView.hostOnlyViewTypes`, `ObjectView.refreshInPlace-10035`;
- `ListView.searchWithheldTreeChart-10326`,
`ListView.selfQueryingViewsToolbarState-10250`.
- `pnpm exec vitest run --maxWorkers=2 scripts/__tests__/` gave `Test
Files 177 passed | 2 skipped (179)`, `Tests 5371 passed | 2 skipped
(5373)`. It is owed because the diff adds and edits changeset markdown.
`node scripts/markdown-test-inputs.mjs --audit` exits 0.
- `pnpm --filter @object-ui/PKG type-check` for `core`, `react`,
`plugin-tree`, `plugin-map` and `plugin-gantt` exits 0 with no `error
TS` in any of them. The dependency closure was built first with turbo
(14 tasks). Each package's `tsconfig.test.json` program lists the new
pins (`--listFilesOnly`).

## Ablations

All legs ran at `bdea39fc6`, each through objectstack's
`scripts/ablation-replace.mjs` in wrap mode. Each mutation hit its
anchor exactly once, the blob moved, and the file was restored to its
HEAD blob. After the run, `git diff HEAD` was 0 bytes and `git status
--porcelain` was empty. The directions were predicted before running,
and every leg went red where predicted:

| leg | mutation | red | green |
|:--|:--|:--|:--|
| 1 arm move | table tree rows **and** call site back to `undeclared` |
8: tree rows 2, 3, 7; 9571 row 1 for all four tree spellings; 9571 row
10 | 35 |
| 2 leg C | fetch effect reads `rest.data ?? schema.data` again | 2:
tree rows 2, 6 | 41 |
| 1a | table only | 7: tree rows 2, 7; 9571 row 1 x4, row 10 | 36 |
| 1b | call site only | 1: tree row 3 | 42 |

Removing either half turns a pin red. Leg C is caught both through
`SchemaRenderer` (row 2) and on a direct mount (row 6).

## Gates

Each ran at `bdea39fc6` and exited 0:

- `check-changeset-presence`: 13 source files, 5 released packages, 3
changesets
- `check-control-bytes`
- `check:new-line-citations`: 0 new
- `check:spec-symbols`
- `check-changeset-claims`
- `check-changeset-overwrite`
- `check-pending-changeset-literals`
- `check:installed-pin-claims`
- `check-changeset-no-major`
- `check:phantom-deps`
- `check:vi-mock-specifiers`, `check:vi-mock-inherit`,
`check:vi-mock-override-shape`
- `check:test-path-roots`
- `check-governed-queue-guard --test` over the 17 changed paths: NOT
GOVERNED

**Declared narrowing, eslint.** The run covered the 13 changed
`.ts`/`.tsx` files only, and reported 0 errors and 163 warnings; none
are new rule classes, and the new files' warnings are `no-explicit-any`
on the zod-internals read and the `react-map-gl` mock. The narrowing
rests on three facts:

- eslint's own config ignores none of the 13 files
(`ESLint#isPathIgnored` answers false for each, and true for a control
path under `node_modules`);
- `--format json` returns 13 results;
- the config is not type-aware (empty `parserOptions`), so this diff
cannot move a verdict on an untouched file.

The repo-wide lint run belongs to CI.

## Acceptance notes

Reported here, not filed:

- `@object-ui/types`' `ObjectTreeSchema` (TypeScript and zod) still
declares `objectName` REQUIRED, and declares no `data` / `staticData`.
The installed row has `objectName` optional and declares both. This diff
does not move that face. The registration `treeInputs` has the same gap.
Carrier: objectui#11168, which owns the 17.5.0 blocks' inputs and member
pins. For the types mirror half, 承接者:无.
- The `navigation` comment in `ObjectTree.tsx` still says only
`object-grid` declares `navigation` and that this element has no row.
Both halves are stale on 17.5.0, as
`ObjectTree.schemaTyped-8655.test.ts` already records. Carrier:
objectui#8652.
- No ladder call site passes the `'undeclared'` arm any more. It
survives as `recordSourceDataArmForType`'s default for unlisted types,
where it is load-bearing. Its admission as a `resolveRecordSourceConfig`
argument is now zero-pull. 承接者:无.
- Surface increment beyond the claim's file list, declared: comment-only
edits in `ObjectMap.tsx` and `ObjectGantt.tsx` (the interim judgement's
own carriers), fixture triage in `ObjectTree.invalidationRefetch-10778`
(its first inline tree used the retired bare-array spelling; it now uses
`staticData`, the row's other inline rung) and in
`ObjectTree.ruleArrayFilter-10767`'s docblock, and the correction to the
earlier pending 8348 changeset.
- `@objectstack/spec`'s row judgement lives in the three per-block pins.
objectui#8348 has no further residual: objectui#9571 and objectui#9239
are both completed.

The session that wrote this is
`https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec)_

---------

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

This branch had an error being deployed

1 failed and 1 inactive deployments
Preview – objectui-site — baf41370 Deployed Jan 21, 2026 by vercel[bot]
Preview – objectui-docs — baf41370 Deployed Jan 21, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

apps dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants