Repository navigation
Commit fa8f30b
docs(plugin-detail): a record:activity types list without comment beside the default composer is refused (#34678)
Fixes #34534
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:只改文档 `content/docs/frontend/plugins/plugin-detail.mdx`。「Feed
kinds with no producer」一段原说写 `types: ['approval']`「合法、能 typecheck、能
build」,改为平台现在的真实行为:评论框默认开着时,这种 `types`
会在编写期被拒(`component-props-invalid`,位置
`properties.showCommentInput`),并写明两种改法;另把任务条目段落里的 `types: ['task']`
示例改成不带具体写法的说法。
- **为什么改**:#34524 合并后,平台开始拒收「`types` 不含 `comment`
且评论框开着」的写法,文档却还说它合法;照文档写元数据的人或 AI 会在保存时被拒,还以为是平台的错。
- **风险与回滚**:纯文档,不发布任何包,不改代码、schema 或测试。回滚即 revert 本 PR。
- **先看**:`content/docs/frontend/plugins/plugin-detail.mdx` 第 372–387
行(重写的那段)与第 292–293 行(`types: ['task']` 示例)。
- **两分钟验证**:`git grep -n "approval"
content/docs/frontend/plugins/plugin-detail.mdx`,预期没有任何一行再说这种写法合法。
- **需要你做的**:无,席位落地。
## What changes
Docs only, one file: `content/docs/frontend/plugins/plugin-detail.mdx`.
PR #34524 (merged as `6302c2c939`) made the spec refuse a feed `types`
list that leaves out `'comment'` while `showCommentInput` is not `false`
(default `true`). This page still said the shape was legal. The rewrite
takes its wording from that PR's merged ADR-0087 semantic entry
`record-activity-types-without-comment-beside-composer-refused` and
changeset: refused at error as `component-props-invalid` at
`properties.showCommentInput` (`properties.feed.showCommentInput` on
`record:chatter` / `record:discussion`), on `os lint` / `os validate` /
`os build`, the page save door and the console's schema mirror; the fix
is to add `'comment'` to `types` or set `showCommentInput: false`. The
page's point about no-producer kinds and the per-kind `console.warn` is
kept. The rule is stated once, in that passage.
### Before and after (the card's Done-when)
1. "Feed kinds with no producer", lines 372-377 before, 372-387 after.
Before:
> The other eight — `email`, `call`, `note`, `file`, `record_create`,
`record_delete`, `approval`, `sharing` — have no producer on any
ObjectUI surface. Authoring `types: ['approval']` is legal, typechecks,
builds, and renders a **permanently empty** timeline. Since
objectui#5877 it also emits one `console.warn` per distinct kind, so the
emptiness is diagnosable instead of looking like "a working feature with
no data yet".
After:
> The other eight — `email`, `call`, `note`, `file`, `record_create`,
`record_delete`, `approval`, `sharing` — have no producer on any
ObjectUI surface. A `types` list of only such kinds renders a
**permanently empty** timeline. Since objectui#5877 it also emits one
`console.warn` per distinct kind, so the emptiness is diagnosable
instead of looking like "a working feature with no data yet".
>
> Beside the default composer such a list is refused before it ever
renders. `types: ['approval']` leaves out `'comment'` while
`showCommentInput` defaults to `true`, so `os lint`, `os validate`, `os
build`, the page save door and the console's schema mirror report it at
error as `component-props-invalid` at `properties.showCommentInput`
(`properties.feed.showCommentInput` on `record:chatter` /
`record:discussion`). Add `'comment'` to `types` when the block should
take comments, or set `showCommentInput: false` when it should stay
comment-free; `types: ['approval']` with `showCommentInput: false`
parses and renders the empty timeline above. A page already stored with
the shape still loads; its next save is refused.
2. Task-item paragraph, lines 292-293.
Before: "It stays a `task` item, so `types: ['task']` and `filterMode:
'tasks_only'` still list it."
After: "It stays a `task` item, so a `types` list that names `task` and
`filterMode: 'tasks_only'` still list it."
The literal `types: ['task']` beside the default composer is exactly the
shape PR #34524 refuses (its measured producer), so the example no
longer spells it.
## Acceptance notes
- Scanned the rest of the page for a `types` list authored without
`'comment'` beside the default composer. Line 85
(`RecordActivityTimeline` example) is `types: ['comment',
'field_change']` with `showCommentInput: true`: valid, unchanged. Line
329 (`types` row of "Which inputs do what") describes what the renderer
does with `types: []` or an all-unrecognised list (an empty timeline).
That stays true of the renderer, and the shape is still authorable
beside `showCommentInput: false`, so it is unchanged.
- `skip-changeset`: the diff is one hand-written page under
`content/docs/frontend/`; no published package's `files[]` ships
`content/` (every non-private `package.json` in the workspace scanned;
positive control: `@objectstack/spec`'s `files[]` read and listed).
- The console mirror claim rests on
`ui/packages/types/src/zod/public-blocks.zod.ts`, which takes each
block's props bag from `@objectstack/spec`'s `ComponentPropsMap` row by
reference, refinements included, and on PR #34524's own account of the
mirror.
## Verification
Head `c0187c478f`. `git grep -n "approval"
content/docs/frontend/plugins/plugin-detail.mdx` answers lines 373, 380
and 386; none calls the shape legal.
<details><summary>Derived gate round (dispatch-gates, 44 families,
c0187c4)</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `c0187c478f` derived 44 families for the
one changed path. All 44 run; all 44 exit 0. Five first refused with
PREREQUISITE NOT MET (exit 3: lint `check:doc-formula-expressions`,
`check:doc-security-posture`, `check:docs-transcript-drift` wanting a
built `@objectstack/lint`; spec `check:docs` wanting the generated
schema tree; spec `check:skill-examples` wanting built
`@objectstack/client-react` declarations). They were re-run after `pnpm
--filter '@objectstack/lint...' build` and `pnpm --filter
'@objectstack/client-react...' build` under the verify lock (both
VERDICT command-exit 0), and each then exited 0 (`check:skill-examples`:
347 prose examples type-check across 3 surfaces). `--ran` reconciliation
with an exit code on every line: 44 derived, 44 run, 0 NOT-MEASURED, 0
UNRUN. No package build touched a tracked file (`git status --porcelain`
empty).
Not run locally, owned by CI: the artifact-roster, wide-population and
pending-changeset families the derivation lists outside its 44, the Plan
Test Core shards job and the type-check lanes. No changeset is written,
so the pending-changeset families do not apply.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPJxG4vBVaLCBWLcWJ)_
<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmPJxG4vBVaLCBWLcWJ -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 11e0441 commit fa8f30b
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
378 | 389 | | |
379 | 390 | | |
380 | 391 | | |
| |||
0 commit comments