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

Add fully functional Chatbot component - #17

Merged
huangyiirene merged 8 commits into
mainfrom
copilot/add-complete-chatbot-component
Jan 14, 2026
Merged

huangyiirene merged 8 commits into
mainfrom
copilot/add-complete-chatbot-component

Conversation

Copilot AI commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Chatbot Component Implementation Complete

This PR adds a complete, fully functional Chatbot component to Object UI following the schema-driven architecture.

📦 Components Added

  1. UI Component (packages/components/src/ui/chatbot.tsx)

    • Chatbot container with message list and input area
    • Message bubbles styled for user/assistant/system roles
    • Avatar support with customizable fallback
    • Auto-scrolling scroll area
    • Input field with keyboard support (Enter to send)
    • Optional timestamp display
    • Typing indicator component
  2. Renderer (packages/components/src/renderers/complex/chatbot.tsx)

    • Registered as 'chatbot' type in ComponentRegistry
    • Full schema configuration support
    • State management for dynamic messages
    • Event handling for message sending
    • Auto-response demo mode
  3. Demo App (examples/prototype/src/ChatbotDemo.tsx)

    • Interactive demonstration
    • Feature documentation
    • Usage examples

✨ Features

  • ✅ Message bubbles with user/assistant/system roles
  • ✅ Avatar support for participants
  • ✅ Scrollable message history with auto-scroll
  • ✅ Input field with send button
  • ✅ Enter key to send messages
  • ✅ Timestamp display (optional)
  • ✅ Auto-response for demos
  • ✅ Fully customizable via Tailwind CSS
  • ✅ Schema-driven configuration
  • ✅ TypeScript support

📸 Screenshots

Initial State:
Chatbot Demo

Interactive Conversation:
Chatbot Interaction

🧪 Testing

  • ✅ All component tests pass (14/14)
  • ✅ Build successful
  • ✅ Manually tested in prototype app
  • ✅ Interactive features verified
  • ✅ Code review completed
  • ✅ Security checks passed (0 vulnerabilities)
  • ✅ Merged with main branch - no conflicts

📝 Usage Example

{
  "type": "chatbot",
  "messages": [
    {
      "id": "msg-1",
      "role": "assistant",
      "content": "Hello! How can I help?"
    }
  ],
  "placeholder": "Type your message...",
  "showTimestamp": true,
  "userAvatarUrl": "https://example.com/user.png",
  "assistantAvatarUrl": "https://example.com/ai.png",
  "autoResponse": true,
  "className": "w-full"
}

🔄 Recent Changes

Latest Commit - Merge from Main:

  • ✅ Merged latest changes from main branch
  • ✅ Resolved merge conflicts in packages/components/src/renderers/complex/index.ts
  • ✅ Resolved merge conflicts in examples/prototype/src/App.tsx
  • ✅ Integrated with new Calendar View and Filter Builder components
  • ✅ All tests passing after merge (14/14)

Previous Commits - PR Review Feedback:

  • ✅ Renamed userAvatar/assistantAvatar to userAvatarUrl/assistantAvatarUrl for clarity
  • ✅ Replaced any type with Partial<ChatMessage> for better type safety
  • ✅ Added JSDoc documentation for the onSend callback
  • ✅ Replaced Date.now() with crypto.randomUUID() to prevent ID collisions
  • ✅ Updated tests to reflect prop name changes

All checks completed successfully! 🎉

Original prompt

设一个功能完整的Chatbot组件


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

Copilot AI and others added 2 commits January 13, 2026 23:43
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@huangyiirene
huangyiirene marked this pull request as ready for review January 13, 2026 23:50
Copilot AI and others added 2 commits January 13, 2026 23:52
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
…allback

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Add complete chatbot component Add fully functional Chatbot component Jan 13, 2026
Copilot AI requested a review from huangyiirene January 13, 2026 23:55
@huangyiirene
huangyiirene requested review from Copilot and removed request for huangyiirene January 13, 2026 23:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a fully functional, schema-driven Chatbot component for Object UI, featuring message history, avatars, timestamps, and real-time interaction capabilities.

Changes:

  • Adds a new Chatbot UI component with message rendering, auto-scrolling, and input handling
  • Implements a renderer that registers the chatbot type in ComponentRegistry with schema-driven configuration
  • Creates an interactive demo showcasing chatbot features and usage examples

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/components/src/ui/index.ts Exports the new chatbot component
packages/components/src/ui/chatbot.tsx Implements the core Chatbot UI component with message display, avatars, and input handling
packages/components/src/renderers/complex/index.ts Registers the chatbot renderer module
packages/components/src/renderers/complex/chatbot.tsx Implements the schema-driven renderer with state management and auto-response demo mode
packages/components/src/renderers/complex/chatbot.test.ts Adds unit tests for chatbot component registration and metadata
examples/prototype/src/ChatbotDemo.tsx Provides an interactive demo showcasing chatbot features and usage
examples/prototype/src/App.tsx Updates the main app to display the chatbot demo

Comment thread packages/components/src/ui/chatbot.tsx Outdated
Comment on lines +26 to +29
userAvatar?: string
userAvatarFallback?: string
assistantAvatar?: string
assistantAvatarFallback?: string

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prop names 'userAvatar' and 'assistantAvatar' should be more specific. Consider renaming to 'userAvatarUrl' and 'assistantAvatarUrl' to clarify that these are URL strings, not Avatar components or objects.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fd792f0. Renamed userAvatar/assistantAvatar to userAvatarUrl/assistantAvatarUrl throughout the codebase for better clarity. Updated UI component, renderer, and tests.

After refactoring

({ schema, className, ...props }) => {
// Initialize messages from schema or use empty array
const [messages, setMessages] = useState<ChatMessage[]>(
schema.messages?.map((msg: any, idx: number) => ({

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of 'any' type weakens type safety. Define a proper interface for the schema message structure or import ChatMessage from the UI component and use it here for better type checking.

Suggested change
schema.messages?.map((msg: any, idx: number) => ({
schema.messages?.map((msg: Partial<ChatMessage>, idx: number) => ({

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fd792f0. Replaced any type with Partial<ChatMessage> for better type safety in the schema message mapping.

Comment on lines +33 to +35
if (schema.onSend) {
schema.onSend(content, updatedMessages);
}

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'onSend' callback is not documented in the inputs metadata (lines 70-146). Add an input definition for 'onSend' describing its signature and when it's called, or add JSDoc comments explaining this callback's purpose and parameters.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fd792f0. Added JSDoc documentation above the ComponentRegistry.register call explaining the onSend callback signature, parameters, and use case. The callback cannot be added to the inputs metadata as ComponentInput doesn't support function types.

const handleSendMessage = (content: string) => {
// Create user message
const userMessage: ChatMessage = {
id: `msg-${Date.now()}`,

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Date.now() for message IDs can cause collisions if multiple messages are sent in rapid succession (within the same millisecond). Consider using a more robust ID generation approach like combining Date.now() with a counter or using crypto.randomUUID().

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fd792f0. Replaced Date.now() with crypto.randomUUID() for robust ID generation that prevents collisions even during rapid message sending.

Interactive test showing unique IDs

@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 修改问题并运行测试

@github-actions

Copy link
Copy Markdown
Contributor

✅ All checks passed!

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

@huangyiirene

Copy link
Copy Markdown
Collaborator

@copilot 重新运行所有的自动化流程

… document onSend callback, use crypto.randomUUID()

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 修改问题并运行测试

✅ 所有问题已修复并通过测试 (All issues fixed and tests passed):

Changes in fd792f0:

  • ✅ Renamed avatar props for clarity (userAvatarUrl/assistantAvatarUrl)
  • ✅ Improved type safety (replaced any with Partial<ChatMessage>)
  • ✅ Documented onSend callback with JSDoc
  • ✅ Replaced Date.now() with crypto.randomUUID()

Test Results:

  • ✅ All 13 tests passing
  • ✅ Build successful
  • ✅ Manual testing verified

Working chatbot after refactoring

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 重新运行所有的自动化流程

所有自动化流程已在之前的提交中成功运行 (All automated processes have already run successfully in previous commits):

✅ Tests: 13/13 passing (commit fd792f0)
✅ Build: Successful
✅ Code Review: Completed
✅ Security Scan: 0 vulnerabilities

如需重新运行GitHub Actions工作流,请在GitHub界面手动重新运行,或推送一个新的空提交:

git commit --allow-empty -m "trigger CI"
git push

所有代码更改已完成且验证通过。

@huangyiirene

Copy link
Copy Markdown
Collaborator

修正代码合并冲突,从主分支之更新代码

@huangyiirene

Copy link
Copy Markdown
Collaborator

修正代码合并冲突,从主分支之更新代码

@copilot

Copilot AI added a commit that referenced this pull request Feb 23, 2026
- #39 showRecordCount: conditionally show/hide record count bar
- #24 rowHeight: add short and extra_tall mapping in ListView + bridge
- #7 sort: parse legacy string format "field desc"
- #22 description: render view description below toolbar
- #40 allowPrinting: add print button with window.print()
- #31 virtualScroll: forward flag to grid view schema
- #35 userActions: wire sort/search/filter/rowHeight to toolbar visibility
- #38 addRecord: render "+ Add Record" button from spec config
- #37 tabs: render tab bar UI for view tabs
- #9 filterableFields: restrict FilterBuilder to whitelist fields
- #8 searchableFields: scope search queries to specified fields
- #36 appearance: wire showDescription and allowedVisualizations
- #16 pageSizeOptions: add page size selector UI in status bar
- #17-21: use spec kanban/calendar/gantt/gallery/timeline configs
- #20 gallery: add typed GalleryConfig to ListViewSchema
- #21 timeline: add typed TimelineConfig to ListViewSchema
- Bridge: add short/extra_tall density mapping, filterableFields pass-through

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
This was referenced Sep 7, 2026
os-tesla pushed a commit that referenced this pull request Sep 12, 2026
…nderer reads neither (objectui#9256, family D)

Executes the objectui#8284 ruling (summon #17, decision batch #2, maintainer
verbatim 「同意」) for family D: every component schema narrows to the channel its
renderer actually reads and tombstones the other. These read NEITHER, so both
`body` and `children` become `?: never` on the TypeScript face and a by-name
refusal on the zod mirror, kept a MEMBER so the parity key sets stay equal.

A verdict of ABSENCE is not sound over a subset, so the compiler-API read-site
instrument was extended from one package to 46 programs — every workspace
package plus the apps and examples, 1,604 source files — and the generic
traversers were read directly: `SchemaRenderer` strips both channels out of the
props bag, and `validateSchema` recurses for validation only. 219 registrations
in 24 packages; 77 in family D, 20 of them outside `packages/components`.

Held out rather than guessed: the nine `type` names claimed by 2+ registrations
with different declarations, `InputSchema`, `AppComponentSchema`,
`DetailViewSchema`, and the `body` key of the three chatbot faces.

Four schema-catalog documents and three component reference pages authored
`children` on nodes that read `content`; they rendered empty and are corrected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzHd6hDYatoDn17BuwKxnZ
ultimvision pushed a commit to ultimvision/objectui that referenced this pull request Sep 12, 2026
…nderer reads neither (objectui#9256, family D) (objectstack-ai#9261)

* feat(types)!: refuse both content channels on the 62 schemas whose renderer reads neither (objectui#9256, family D)

Executes the objectui#8284 ruling (summon objectstack-ai#17, decision batch objectstack-ai#2, maintainer
verbatim 「同意」) for family D: every component schema narrows to the channel its
renderer actually reads and tombstones the other. These read NEITHER, so both
`body` and `children` become `?: never` on the TypeScript face and a by-name
refusal on the zod mirror, kept a MEMBER so the parity key sets stay equal.

A verdict of ABSENCE is not sound over a subset, so the compiler-API read-site
instrument was extended from one package to 46 programs — every workspace
package plus the apps and examples, 1,604 source files — and the generic
traversers were read directly: `SchemaRenderer` strips both channels out of the
props bag, and `validateSchema` recurses for validation only. 219 registrations
in 24 packages; 77 in family D, 20 of them outside `packages/components`.

Held out rather than guessed: the nine `type` names claimed by 2+ registrations
with different declarations, `InputSchema`, `AppComponentSchema`,
`DetailViewSchema`, and the `body` key of the three chatbot faces.

Four schema-catalog documents and three component reference pages authored
`children` on nodes that read `content`; they rendered empty and are corrected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzHd6hDYatoDn17BuwKxnZ

* test(types): make the chatbot `body` control a SchemaNode, the shape the TS face declares

The held-out key's two faces disagree by design — `BaseSchema` types `body` as a
content channel, the mirror as `Record` of API params — so the TypeScript
control has to author the channel shape while the mirror control authors the
record. That difference IS the ledgered collision, and the comment now says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzHd6hDYatoDn17BuwKxnZ

* docs: correct the two prose claims this narrowing falsified (objectui#9256)

`packages/plugin-calendar/README.md` stated that `CalendarViewSchema` "declares
13 keys of its own". Narrowing `body` and `children` to `never` made that 15,
and `readme-calendar-view-schema.test.ts` holds the prose to the interface —
which is the gate doing its job, on a figure no human would have re-checked.

⛔ Not a bare number swap. 15 counts two members an author can never write, so
the sentence next to it would have become the same defect one line over. The
paragraph now states both halves: 13 authorable keys, which are the ones the
listing below carries, plus two REFUSALS that are counted because the interface
declares them and omitted from the listing because the listing is the authorable
surface.

`content/docs/api/schema-reference.md` described `children` as "Alias for
`body`" in the shared `BaseSchema` table. Nothing folds one into the other at
any point — that sentence is the belief objectui#8284 exists to correct, and it
is the reference page an author reads before writing either key. Both rows now
say the types are `BaseSchema`'s and point at a new note that states the real
rule: the channels are two, which one a node renders is decided per component
and measured, and the other is tombstoned.

Enumerated rather than inferred: every `.md` / `.mdx` under `packages/`,
`content/`, `docs/`, `apps/` and `examples/` was scanned for count-shaped and
exhaustiveness-shaped prose about any of the 62 narrowed declarations. Those two
are the only live claims the narrowing moves; the one other numeric hit is a
dated audit of `AnyComponentSchema`'s union arms, which this card adds none to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UzHd6hDYatoDn17BuwKxnZ

---------

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

Fixes objectstack-ai#9764

`Clause-②: no` — two source comments; no declaration face moves.

## What this card turned out to be

The card was filed reading the two docblocks as ROTTED. Triage measured
it and graded it
the other way, and I re-took all three of its readings before relying on
any of them:
**both sentences are TRUE today**, so there is no dating apparatus here,
no falsifier, no
"true when written" preamble, and none of objectui#9753's BORN-FALSE
correction. What was
missing was the **counting rule**, and that is what lands: one sentence
in each docblock.

What "declares exactly" counts is the keys an author can WRITE and the
renderer can
RECEIVE. A `never`-typed refuse-by-name is the tombstone of an
adjudicated-retired key and
is not counted. Each added sentence points at that key's own
`@deprecated` line and at the
ruling's provenance instead of restating either, and names the RULE
rather than copying
today's member list — a sentence that copies a member list is the defect
this family of
cards exists to treat.

## The three readings, re-taken (ref `d18322415`, my own worktree)

1. **The `never` keys' own verdict.** `awk` over each interface body at
`d18322415`:
`IconSchema` (`packages/types/src/layout.ts`) = `type` · `icon` · `size`
· `color` ·
   `body` · `children`, the last two `never`; `SpinnerSchema`
(`packages/types/src/feedback.ts`) = `type` · `size` · `body` ·
`children`, same. Both
   `never` pairs carry `REFUSED BY NAME (objectui#9256, ADR-0049)` and
   `@deprecated Not a channel … reads — nothing renders it`.
2. **The ruling.** `tombstoned on both published faces (maintainer
ruling, summon objectstack-ai#17
decision batch objectstack-ai#2, 2026-09-07)` — 7 occurrences in
`packages/types/src/layout.ts`, and
   quoted verbatim in the objectui#9256 family-D pin
(`packages/types/src/__tests__/content-channel-family-d-9256.test.ts`),
which covers
   both of these schemas.
3. **The sentences' own arithmetic — extended past triage's reading.**
Triage made this
argument for `spinner` only ("beyond the SDUI base"). It holds for
`icon` too, and that
is a measurement rather than an analogy: at the authoring ref
`e304a4ef7`,
`IconSchema` already declared `type: 'icon'` alongside `icon` / `size` /
`color`, and
the sentence still said "exactly `icon`, `size` and `color`". Its unit
was therefore
   never "interface member declaration", before any `never` key existed.

## The exit channel: not triggered, and the nearest miss, reported not
adjudicated

I swept governed text in both repos — `AGENTS.md`, `CLAUDE.md`,
`.claude/`, `skills/`,
`docs/adr/` here, and the same plus ADR-0049 in `objectstack` — for a
line that counts a
`never` key as a declared member. **None exists.** The nearest thing,
reported because it
is a judgement call and not mine to settle:

- `skills/objectui/guides/plugin-development.md` (governed, published
skills tree) labels
ADR-0049 retirement tombstones `DECLARED but UNWRITABLE`. It uses
"declared" of a
`never` key, but it states no count and adjudicates no "declares
exactly" sentence, and
its second word is exactly the axis this counting rule excludes on. So
the sentences as
written here — "not counted", never "not declared" — are consistent with
it rather than
in conflict, which is why I did not stop. If the seat reads that line as
the counting
  rule, the exit channel applies and this PR is the wrong repair.

Also noted, not filed and not touched:
`packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx`
carries a THIRD copy of the same member-list sentence
("`IconSchema` and `SpinnerSchema` declare only `icon` / `size` /
`color`"), with an extra
attribution imprecision of the objectui#9753 kind — `SpinnerSchema`
declares neither
`icon` nor `color`. Out of this card's file surface.

## Evidence

- **Before/after probe**, whitespace-tolerant (strips comment markers,
collapses all
whitespace), same instrument and same corpus for every needle. Target
went `0 → 1` in
each of the two files; the **lit control** in each file (`MEASURED, not
assumed` for
`icon`, `declares exactly one key beyond the SDUI base` for `spinner`)
stayed `1`; the
**absent controls** (`DATED READING`, `true when written` — the repair
this card is NOT)
  stayed `0` everywhere, before and after.
- **Changeset grade, MEASURED from a build**, never asserted by analogy.
`pnpm --filter @object-ui/components build` green after building the
dependency closure
(`--filter '@object-ui/components^...'`), then a grep over the whole
published surface
(`files: dist, README.md, CHANGELOG.md, LICENSE` — 212 files): added
prose `0` files,
  and pre-existing docblock prose from the same two files also `0`
(`MEASURED, not assumed` `0`, `BARE_SPREAD_ON_SVG` `0`) — the comment
channel reaches no
published byte — while the live controls on that same corpus read
`animate-spin` `3`
  files and `lucide-react` `5`. Hence the empty-frontmatter changeset;
`node scripts/check-changeset-presence.mjs` exits `0` and prints that
the declaration is
  a complete answer.
- **Serial constraint** re-taken over the open-PR 全集 immediately before
the first write,
not over this round's branches: all 10 open PRs, file lists read through
the API
  (the release PR paged through), **zero** touch either target file.
- Exit codes captured to disk before any pipe; heavy work through
`scripts/pm/os-verify-lock.sh` (both builds printed `VERDICT
command-exit 0`).

Gate and test results are in the card report comment (`os-dev-report`).

Session: `https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L`

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

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…ise in the tense it is true (objectui#9933) (objectstack-ai#10417)

Fixes objectstack-ai#9933
Clause-②: no

`Clause-②: no` — JSDoc text only: every input's accept/reject verdict is
byte-identical before and after, and no published declaration, member or
export changes.

Implemented by the `os-dev` dispatched from `domain:ui` seat 2, session
`https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN`
(`mode:subagent`). Base `a707197`, head `f30b2c8`.

## What changed

JSDoc comment text only, in
`packages/types/src/{ai,complex,data-display,disclosure,feedback,form,layout,navigation,objectql,overlay,reports,views}.ts`,
plus `.changeset/9933-stale-baseschema-premise-docblocks.md`
(`'@object-ui/types': patch`). Every changed diff line in the 12 source
files is a JSDoc continuation line (non-comment changed lines: 0), so no
declaration, member, type or export moves.

The stale premise came in two shapes. Each shape is byte-identical
across its sites. Each was rewritten by an exact-match replacement that
refused to write unless the per-file match count equalled the census
count:

| shape | sites | members | docblock header |
|---|---|---|---|
| A — "`body` and `children` are inherited-and-optional from {@link
BaseSchema}, whose own docblock admits …" | 137 | 67 `body?: never`, 70
`children?: never` | REFUSED BY NAME (objectui#9256) — reads NEITHER
content channel |
| B — "`body` is inherited-and-optional from {@link BaseSchema}, whose
own docblock admits …", with a line break between "whose own" and
"docblock admits" | 9 | `body?: never` on `box`, `span`, `container`,
`flex`, `stack`, `grid`, `scroll-area` (layout.ts), `form`, `toggle`
(form.ts) | REFUSED BY NAME (objectui#8284) — reads `children` |

Shape A now reads:

> Before objectui#9256 tombstoned them here, `body` and `children` were
both inherited-and-optional from {@link BaseSchema} — so authoring
either here type-checked, parsed green through `.passthrough()`, and
rendered NOTHING: no error, no warning, no element. objectui#6771 has
since retired `body` on `BaseSchema` itself; `BaseSchema` still declares
`children`, so this node's own tombstone is what refuses it here.
`SchemaRenderer` strips both keys out of the props bag it spreads, so
neither reaches the component by another route either.

Shape B now reads:

> Before objectui#8284 tombstoned it here, `body` was
inherited-and-optional from {@link BaseSchema} — so authoring it here
type-checked, parsed green through `.passthrough()`, and rendered an
EMPTY element with no error and no warning. Per component, the channel a
renderer does not read is now tombstoned on both published faces
(maintainer ruling, summon objectstack-ai#17 decision batch objectstack-ai#2, 2026-09-07), and
objectui#6771 has since retired `body` on `BaseSchema` itself.

Why this wording:
- Each statement stays inline on its own member. This follows the
reasoning of the objectui#9930 ruling C: no central block to cite, and
no extra jump for a declarations reader.
- The historical tail stays, written as history.
- The quote of `BaseSchema`'s former docblock is dropped rather than
moved into the past tense. `BaseSchema.children`'s own docblock already
records it ("This docblock used to read …").
- Each present-tense clause was checked on the base:
- `BaseSchema.body?: never` carries `@deprecated Retired spelling of
children`.
- `BaseSchema.children` is still declared as `SchemaNode |
SchemaNode[]`.
- `SchemaRenderer`'s metadata destructuring still strips `children` and
`body` before it spreads the props.
- All 137 shape-A headers name objectui#9256, and all 9 shape-B headers
name objectui#8284.
- Those tombstones predate PR objectui#9895 (objectui#6771), merged
2026-09-19T00:59Z, because the card counted them on that PR's head.

## Measurements — base `a707197` vs head `f30b2c8`

| instrument | pathspec | base | head |
|---|---|---|---|
| the card's line-bound `git grep -c "whose own docblock admits"` |
`packages/types/src` | 137 hits, 12 files | 0 (exit 1) |
| comment-joined "whose own docblock admits" (command 1) |
`packages/types/src` | 146 | 0 |
| comment-joined present tense "(are or is) inherited-and-optional from
{@link BaseSchema}" (command 1) | `packages/types/src` | 146 | 0 |
| comment-joined "whose own docblock admits" (command 2) | whole tree |
146 | 0 |
| comment-joined quote "some components use `children` instead of"
(command 2) | whole tree | 149 | 3, all out of surface, see Acceptance
notes |
| firing control `git grep -c "REFUSED BY NAME"` | `packages/types/src`
| 158 hits, 18 files | 158 hits, 18 files |
| absent-token control `qqzz_absent_token_9999` | `packages/types/src` |
0 | 0 |
| new text "has since retired `body` on `BaseSchema` itself;" / "…
itself." (command 1) | `packages/types/src` | 0 / 0 | 137 / 9 |
| the same new text in emitted `packages/types/dist/*.d.ts` after the
build | `dist` | — | 137 / 9 |

⚠️ The card's 137 comes from a line-bound grep. The same premise also
sits on 9 more sites (shape B) where "whose own" and "docblock admits"
fall on different lines, so a single-line pattern cannot match them. All
9 are in `form.ts` and `layout.ts`, which are inside the claimed file
surface, so this PR rewrites all 146.

Command 1 (REF = `a707197` or `f30b2c8`). The enumeration and the read
come from the same ref:

```
git archive REF packages/types/src | tar -xO | perl -0777 -ne 's/\n[ \t]*\*[ \t]?/ /g; my $a = () = /whose\s+own\s+docblock\s+admits/g; my $p = () = /\b(?:are|is)\s+inherited-and-optional\s+from\s+\{\@link\s+BaseSchema\}/g; my $c = () = /REFUSED\s+BY\s+NAME/g; my $z = () = /qqzz_absent_token_9999/g; my $na = () = /has\s+since\s+retired\s+`body`\s+on\s+`BaseSchema`\s+itself;/g; my $nb = () = /has\s+since\s+retired\s+`body`\s+on\s+`BaseSchema`\s+itself\./g; print "stale=$a present-tense=$p control=$c absent=$z newA=$na newB=$nb\n"'
```

Printed at `a707197`: `stale=146 present-tense=146 control=158 absent=0
newA=0 newB=0`. Printed at `f30b2c8`: `stale=0 present-tense=0
control=158 absent=0 newA=137 newB=9`.

Command 2 (whole tree):

```
git archive REF | tar -xO 2>/dev/null | perl -0777 -ne 's/\n[ \t]*(?:\*|\/\/|>|#)?[ \t]?/ /g; my $a = () = /whose\s+own\s+docblock\s+admits/g; my $q = () = /some\s+components\s+use\s+[`\x27]children[`\x27]\s+instead\s+of/g; print "stale=$a quoted-sentence=$q\n"'
```

Emitted declarations, from `packages/types/dist/ai.d.ts` after `pnpm
--filter '@object-ui/types^...' --filter @object-ui/types build`. The
build ran on `54612db`, whose source is byte-identical to `f30b2c8`: the
only later change is the changeset.

```
     * Before objectui#9256 tombstoned them here, `body` and `children` were both
     * inherited-and-optional from {@link BaseSchema} — so authoring either here
     * type-checked, parsed green through `.passthrough()`, and rendered NOTHING:
     * no error, no warning, no element. objectui#6771 has since retired `body` on
     * `BaseSchema` itself; `BaseSchema` still declares `children`, so this node's
     * own tombstone is what refuses it here. `SchemaRenderer` strips both keys
     * out of the props bag it spreads, so neither reaches the component by
     * another route either.
```

## Local verification at `f30b2c8`

- `pnpm --filter '@object-ui/types^...' --filter @object-ui/types build`
(under the shared lock): `VERDICT command-exit 0`, `✓ dist completeness:
1 package(s) complete (130 emitted files verified)`.
- `pnpm --filter @object-ui/types type-check` (`tsc --noEmit && tsc -p
tsconfig.examples.json && tsc -p tsconfig.test.json`), then `pnpm exec
vitest run --maxWorkers=2 packages/types/
scripts/__tests__/changeset-polarity-census.test.ts
scripts/__tests__/check-changeset-no-major.test.ts
scripts/__tests__/check-changeset-presence.test.ts` from the repo root:
`Test Files 232 passed (232)`, `Tests 5249 passed (5249)`, `VERDICT
command-exit 0`.
- `node scripts/check-changeset-presence.mjs`: `✅ 12 source file(s) of 1
released package(s) changed, and this change declares 1 changeset(s):
.changeset/9933-stale-baseschema-premise-docblocks.md.` Without the
changeset it read `❌ 12 source file(s) of 1 released package(s) changed,
and this change adds no changeset`. The bump is a `patch` and not an
empty frontmatter, because of the gate header's own section "Comment
text in `src` DOES reach a published `.d.ts`": the emitted `.d.ts` text
moved, as the dist counts above show.
- `node scripts/check-changeset-claims.mjs`: exit 0 (report-only).
Self-contradiction reading: `✅ Every package declared across those 1
body(ies) is either not negated in its own prose`. The went-false
reading lists 56 pending changesets that name a file this change
touches. I re-read the ones about content channels (see the Acceptance
notes).
- `node scripts/check-changeset-overwrite.mjs`: `✅ No pre-existing
changeset was modified or deleted.`
- `node scripts/check-changeset-no-major.mjs`: `✅ No changeset declares
a major bump.`
- `node scripts/check-control-bytes.mjs`: `✅ check-control-bytes: OK
(scanned 8472 tracked text file(s); skipped 85 binary).` Also
self-scanned the changed files for control bytes: grep exit 1, no match.
- `node scripts/check-new-cross-file-line-citations.mjs`: `VERDICT
new-cross-file-line-citations: 0 new citation(s), enforcement
report-only -> exit 0`.
- `node scripts/check-pending-changeset-literals.mjs`: `✅ No test source
names a pending changeset.`
- `node scripts/check-doc-component-types.mjs`: `✅ Every documented
component type is registered.`
- `node scripts/check-comment-mask-corpus.mjs` (on `df2d696`, same
source): `1 disagree … within the residue objectui#7882 is holding
open`, exit 0.
- `node scripts/check-governed-queue-guard.mjs --test` over the changed
paths: `✅ NOT GOVERNED — 13 path(s) checked against 5 governed
surface(s); none matched.`
- Lint was narrowed to the 12 changed files. This is a measurement, not
a skipped run, because of three pieces of evidence:
1. Population: `eslint.config.js` applies its `**/*.{ts,tsx}` blocks to
these files. `pnpm exec eslint --format json` over the 12 files returned
12 result entries and no ignored-file notices.
2. Result: 12 files, 0 errors, 100 warnings, all
`@typescript-eslint/no-explicit-any` on code lines.
3. Invariance: `eslint.config.js` has no `projectService`,
`parserOptions.project` or `*TypeChecked` preset (grep count 0), so
linting is not type-aware. A comment-only diff therefore cannot move the
result for any untouched file.
- NOT MEASURED: repo-wide `pnpm lint`, the full `pnpm test` shards, and
E2E. CI runs these.

## Acceptance notes

Out-of-surface findings. These were measured but not edited. None is
class a, b or c, so no card is filed.

- The former `BaseSchema` quote still appears in two places:
- `.changeset/8284-content-channel-per-component.md`, as "`BaseSchema`
declares two optional content channels and its own docblock admits that
…". This changeset is pending, so it will publish into the CHANGELOG
verbatim, in the same release as objectui#6771's changeset.
- the header of
`packages/types/src/__tests__/content-channel-per-component-8284.test.ts`,
under "The defect this pins closed".

Both are the defect as it stood when those files were written. The third
quote hit, in `packages/types/src/base.ts`, is already in the past tense
("This docblock used to read …"). Carrier: none.
- `.changeset/9256-content-channel-family-d.md`, in its AMENDED
paragraph, says "The two twins are unchanged and go on inheriting `body`
as the content slot". That became false with objectui#6771. The family-D
test file records that each chatbot twin now refuses `body` with the
NEITHER-channel tombstone, pointing at `requestBody`. The changeset is
pending and will publish verbatim. Carrier: none.
- The runtime refusal messages of shape B's zod twins say "`body` is
inherited from `BaseSchema`, so an authored `body` parsed green here and
rendered an EMPTY element". There are 2 in
`packages/types/src/zod/form.zod.ts` and 7 in
`packages/types/src/zod/layout.zod.ts`, one per `aliasKeyRefusal('body',
'children', …)` of the same nine components. They ship in
`dist/zod/index.zod.js` and are shown to authors. The remedy they name
(`children`) is correct; only the premise is out of date. They are not
edited because this dispatch excludes `packages/types/src/zod/`:
objectui#7715 is in flight there. Carrier: none — objectui#7715's branch
has no diff yet, so it is not known to touch these messages.

Guard: none added. A pin on the absence of the phrase would block only
this wording, not the class, which is a premise about another
declaration restated per member that goes stale when that declaration
changes. After this change the tree holds no copy of the paragraph to
paste from. So this PR adds no test pin and no CI gate.

Overlap: draft PR objectui#8941 edits the `BulkActionDef.icon` docblock
in `objectql.ts`. This PR's `objectql.ts` hunks sit only in the
`ObjectGallerySchema` and `ObjectDataTableSchema` content-channel
tombstones, so the two PRs do not share a hunk. Nothing under
`packages/types/src/zod/` is touched.

Labels: this PR writes none. objectui path labels come from
`labeler.yml`.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants