Repository navigation
Commit bbb49c9
docs(plugin-gantt): the object-gantt registration no longer teaches the retired view-level api source (#27421)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBXWXZBxsvNwj3i1LQo3mDae)_
Part of #27130
Clause-②: no
Metadata-protocol: none
**What stays open on #27130, and whose it is.** After this PR nothing on
the card is the spec lane's. The card stays open for the customer reply,
which is the triage seat's (ruling 6471507187, step 3). The engine floor
for plugin drivers (#27277) and the sharing-model refusal (#27332) are
in flight on their own cards; neither edits a file this PR edits
(measured: open PRs #27403 and #27391 touch no `plugin-gantt`,
`sdui.manifest.json` or `content/docs/ui/components/` path).
## 维护者速读
- 改了什么:只改说明文字。甘特图 `object-gantt` 注册的 `data` 和 `filter` 两个输入说明,不再把已退役的视图级
`api` 数据源写成可用的记录来源;SDUI 清单和组件参考文档随之重新生成。
- 为什么改:客户照着这段官方文字写了 `data: { provider: 'api', read }`,但 spec 早已按名拒收这个
provider,渲染器也没有对应分支,图表是空的、不发任何请求。
- 风险与回滚:零运行时风险,没有输入项、schema、渲染行为或导出变化;回滚即还原文字。
- 先看:`ui/packages/plugin-gantt/src/index.tsx`(`data`、`filter`
两行说明),`ui/packages/plugin-gantt/src/__tests__/apiSourceNotTaught-27130.test.ts`,`sdui.manifest.json`(两行
description)。
- 两分钟验证:`cd ui && pnpm exec vitest run
packages/plugin-gantt/src/__tests__/apiSourceNotTaught-27130.test.ts`,应见
3 个测试全绿。
- 需要你做的:无,席位落地。
## What changes
Text only. No registration input, schema, renderer behaviour or export
moves: the regenerated `sdui.manifest.json` differs from `origin/main`
in exactly the two `description` strings (plus its record file's date
and sha256), and `content/docs/ui/components/plugins.mdx` in the same
two table rows.
**Measured on `origin/main` `cf218eed`.** `resolveDataSource`
(`ui/packages/core/src/adapters/resolveDataSource.ts`) has an `object`
arm and a `value` arm only; any other provider returns the context
adapter. `ObjectGantt` takes rung 1 of
`resolveRecordSourceConfig(schema, 'view-data')` verbatim, so an `api`
block wins the ladder, then queries `schema.objectName` through the host
adapter (`resolveRecordSourceObjectName` reads `data.object` only for
the `object` provider). A one-off probe through the real
`SchemaRenderer` with the customer's shape, `data: { provider: 'api',
read: { url: '/api/gantt/tree' }, write: { url: '/api/gantt/task',
method: 'PATCH' } }` and no `objectName`:
- `ObjectGanttSchema.safeParse` fails at `data.provider`
(`invalid_union`) with the spec's retirement message,
"`view.data.provider: 'api'` was removed in @objectstack/spec 18 …";
- the host adapter's `find` is called once with resource `""`; `fetch`
is never called, so neither URL is requested;
- the chart draws no task.
With an `objectName` beside it, `objectName` is queried instead; that
row was already pinned ("a retired api block requests nothing and is
answered like an unknown provider",
`recordSourceInputs-10394.test.tsx`).
Before (`data`):
> A `{ provider, … }` data-source configuration, read FIRST on the
record-source ladder: a gantt carrying one never reaches `staticData`
and never queries `objectName`. `{ provider: 'value', items }` charts
those rows, `{ provider: 'object', object }` queries that object and `{
provider: 'api', read }` reads through that request. A bare array is not
this key’s shape and is not a record source: the gantt falls through to
`staticData`, then `objectName`, so inline rows belong under
`staticData`.
After:
> A `{ provider, … }` data-source configuration, read FIRST on the
record-source ladder: a gantt carrying one never reaches `staticData`.
The gantt reads two providers: `{ provider: 'value', items }` charts
those rows and never queries `objectName`, and `{ provider: 'object',
object }` queries that object in place of `objectName`. Rows a server
computes reach the gantt as an object whose plugin driver computes them,
never as a request URL in the view. A bare array is not this key’s shape
and is not a record source: the gantt falls through to `staticData`,
then `objectName`, so inline rows belong under `staticData`.
"never queries `objectName`" moved from every provider to the `value`
provider, where it holds: on any provider the gantt does not read,
`objectName` is what it queries (above).
Before (`filter`):
> … narrowing the tasks the gantt charts — from every record source it
reads: the object, an `api` request, or inline rows. …
After:
> … narrowing the tasks the gantt charts — from every record source it
reads: the object or inline rows. …
**Sweep.** `git grep` over `ui/packages/*/src`, `ui/apps/*/src` and
every `ui/packages/*/README.md` for `provider: 'api'` (any quoting),
"`api` request" and "reads through that request": the two lines above
were the only text teaching the view-level `api` source as a record
source. The remaining hits are the live page-element binding
`dataSource: { provider: 'api', read, path? }` (`productBlocks.tsx`,
`product-blocks.zod.ts`, `useNavMemberGates.ts`,
`NavigationRenderer.tsx`, `SchemaRenderer.tsx`,
`useElementApiDataSource.ts`, `ConsoleElementApiOpen.tsx`,
`i18n/src/locales/en.ts`, `react/README.md`, `preview-gallery.tsx`),
left untouched, or text that already says the view-level arm is retired
(`resolveDataSource.ts`, `ApiDataSource.ts`,
`core/src/adapters/README.md`, `useViewData.ts`,
`plugin-gantt/README.md`). No hit under `skills/**` or `docs/adr/**`.
**Regenerated, not hand-edited:** `node
scripts/gen-sdui-manifest-node.mjs` (in-tree registry:
`sdui.manifest.json`, `scripts/sdui-manifest.record.json`), then `node
scripts/gen-sdui-reference.mjs`
(`content/docs/ui/components/plugins.mdx`).
Changeset: `.changeset/27130-gantt-api-source-not-taught.md`,
`@object-ui/plugin-gantt` patch.
## Tests
- New
`ui/packages/plugin-gantt/src/__tests__/apiSourceNotTaught-27130.test.ts`
(3 tests): no `object-gantt` input description matches `provider: 'api'`
in any quoting or a code-font `api`; positive control that `data` still
names `{ provider: 'object', object }` and `{ provider: 'value', items
}`; a matcher control on the three replaced strings.
- Reverse verification, once: with `index.tsx` restored from
`origin/main`, the pin goes red naming `[ 'data', 'filter' ]` (`Tests 1
failed | 2 passed`); restored from `HEAD`, `git diff HEAD` is empty and
the HEAD blob and disk hashes match (`4d07512d`).
- `@object-ui/plugin-gantt` under the verify lock: `test` (Test Files
103 passed, 1 skipped; Tests 775 passed, 114 skipped) and `type-check`,
VERDICT command-exit 0.
## Acceptance notes
- `plugin-gantt/README.md` already says the right thing ("The view-level
`{ provider: 'api', read, write }` arm is retired in the spec … its
`read` / `write` URLs are never requested") and is unchanged.
- The `data` description does not cover the `{ provider: 'schema',
schemaId }` arm the spec union also accepts; the README states it (the
gantt queries `objectName` instead). Not widened here: the order asked
for the two providers the gantt reads.
## Verification
Derived gates on head `65fcb5de`: `node scripts/pm/dispatch-gates.mjs
--commands --repo objectstack-ai/objectstack` derives 76; all 76 exit 0.
`check:skill-examples` first exited 3 (prerequisite not met: no
`@objectstack/client-react` dist) and was re-run green after `pnpm
--filter @objectstack/client-react build`. `check:sdui-reference` and
the ui scripts suite (`pnpm --dir ui exec vitest run scripts/`) are
among the 76. `dispatch-gates --ran` reconciles: 76 derived, 76 run, 0
NOT-MEASURED, 0 UNRUN.
<details><summary>76 gate commands and exit codes</summary>
```text
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-docs-section-name.mjs --self-test :: exit 0
node scripts/check-docs-section-name.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-section-landing-index.mjs --self-test :: exit 0
node scripts/check-section-landing-index.mjs :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/lint run check:doc-security-posture :: exit 0
pnpm --filter @objectstack/spec run check:docs :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm --filter @objectstack/spec run check:empty-state :: exit 0
pnpm --filter @objectstack/spec run check:liveness :: exit 0
pnpm --filter @objectstack/spec run check:skill-examples :: exit 0
pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0
pnpm --filter @objectstack/spec run check:variant-docs :: exit 0
pnpm --filter @objectstack/spec run check:yaml-examples :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:doc-anchors :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:doc-frontmatter :: exit 0
pnpm check:docs-audit-scope :: exit 0
pnpm check:docs-redirects :: exit 0
pnpm check:docs-single-h1 :: exit 0
pnpm check:docs-spec-enumerations :: exit 0
pnpm check:docs-transcript-drift :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:published-readme-links :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:react-page-adapter-contract :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:sdui-reference :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:vendor-version-stamps :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
```
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzgPyKYGxK9udhSm8zP)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzgPyKYGxK9udhSm8zP
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3bfb357 commit bbb49c9
6 files changed
Lines changed: 77 additions & 7 deletions
File tree
- .changeset
- content/docs/ui/components
- scripts
- ui/packages/plugin-gantt/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | | - | |
| 1007 | + | |
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| |||
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | | - | |
| 1017 | + | |
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
0 commit comments