Skip to content

Commit fa8f30b

Browse files
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

File tree

‎content/docs/frontend/plugins/plugin-detail.mdx‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ on the record writes the record it logged first (an event, a `sys_email` row)
289289
and points at it from the activity row through `source_object` / `source_id`
290290
(ADR-0052). A `task` item that carries that pointer shows whatever
291291
`showCompleted` says, and it is the same item the timeline gives a **View
292-
source** link. It stays a `task` item, so `types: ['task']` and
293-
`filterMode: 'tasks_only'` still list it. A `completed` row with neither the
292+
source** link. It stays a `task` item, so a `types` list that names `task`
293+
and `filterMode: 'tasks_only'` still list it. A `completed` row with neither the
294294
marker nor a pointer is hidden by default. That includes a finished task, every
295295
row a runtime from before the marker serves, a row an app inserts itself
296296
without a pointer, and a milestone row served to a reader who may not read a
@@ -371,10 +371,21 @@ edited (`is_edited` on the row).
371371

372372
The other eight — `email`, `call`, `note`, `file`, `record_create`,
373373
`record_delete`, `approval`, `sharing` — have no producer on any ObjectUI
374-
surface. Authoring `types: ['approval']` is legal, typechecks, builds, and
375-
renders a **permanently empty** timeline. Since objectui#5877 it also emits one
376-
`console.warn` per distinct kind, so the emptiness is diagnosable instead of
377-
looking like "a working feature with no data yet".
374+
surface. A `types` list of only such kinds renders a **permanently empty**
375+
timeline. Since objectui#5877 it also emits one `console.warn` per distinct
376+
kind, so the emptiness is diagnosable instead of looking like "a working
377+
feature with no data yet".
378+
379+
Beside the default composer such a list is refused before it ever renders.
380+
`types: ['approval']` leaves out `'comment'` while `showCommentInput` defaults
381+
to `true`, so `os lint`, `os validate`, `os build`, the page save door and the
382+
console's schema mirror report it at error as `component-props-invalid` at
383+
`properties.showCommentInput` (`properties.feed.showCommentInput` on
384+
`record:chatter` / `record:discussion`). Add `'comment'` to `types` when the
385+
block should take comments, or set `showCommentInput: false` when it should
386+
stay comment-free; `types: ['approval']` with `showCommentInput: false` parses
387+
and renders the empty timeline above. A page already stored with the shape
388+
still loads; its next save is refused.
378389

379390
The diagnostic separates two reasons a kind has no producer, because reporting a
380391
decision as a defect is how a warning channel gets ignored:

0 commit comments

Comments
 (0)