Repository navigation
Commit 53dda03
docs(spec): the record-page timeline total's published description reads it as an upper bound of the drawn entries (#29357)
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb5DkUodwi3PzSqr8HW8Hc8N)_
Fixes #29138
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:`RecordPageTimelineCountSchema` 的文档注释与 `total` 的
`.describe()`
改为说明总数统计的是请求所点名各来源的行数(按调用者可读),是「动态」面板实际绘制条目数的上界,并点名两种少画的情形;API 参考页与 JSON
schema 随之重新生成;`@object-ui/types` 中 `RecordPageResponse.timeline`
的镜像注释同步改为同一说法。
- **为什么改**:#28998(PR #29120)只改了请求侧注释;发布到 JSON schema 的 `total`
描述仍写成「面板持有的条目数」,第三方客户端会把差值当成缺陷。
- **风险与回滚**:仅描述文本与注释,不动任何键、类型、`.min()`、默认值、导出与运行时行为;回滚即 revert 本 PR。
-
**先看**:`packages/spec/src/api/record-page.zod.ts`(`RecordPageTimelineCountSchema`
注释与 `total`
描述)、`content/docs/references/api/record-page.mdx`(生成结果)、`ui/packages/types/src/data.ts`(`timeline`
注释)、`.changeset/29138-timeline-total-describe.md`。
- **两分钟验证**:`pnpm --filter @objectstack/spec build && pnpm --filter
@objectstack/spec check:generated`,预期 All 14 generated artifacts are up
to date。
- **需要你做的**:无,席位落地(总监契约复核由席位转交)。
## What changes
- `packages/spec/src/api/record-page.zod.ts`: the
`RecordPageTimelineCountSchema` docblock and its `total` `.describe()`
now say what the `RecordPageTimelineRequestSchema` docblock (landed in
d089dac) says: the total counts the rows of the sources the request
named, as that schema's table defines them and as the caller may read
them, so it is an upper bound of the entries the 动态 panel draws, not
their number. Both name the two cases where the panel draws fewer: its
`showCompleted` / `types` configuration, and a ledger row with no
displayable diff.
- The request-side `timeline` `.describe()` in `RecordPageRequestSchema`
("Return the size of the record's timeline stream over the sources named
(`RecordPageTimelineCountSchema`).") is **not touched**. It says "size",
the word the landed file header defines as the sources' row count, and
it points at `RecordPageTimelineCountSchema`, whose `total` now carries
the upper-bound sentence. The response-side `timeline` `.describe()`
uses the same word and the card keeps it fixed, so leaving the request
side alone keeps the two sides in the same words.
- `ui/packages/types/src/data.ts`: the `RecordPageResponse.timeline`
docblock in `@object-ui/types`, the UI's mirror of the response, says
the same: the total counts the sources' rows, so it is an upper bound of
the drawn entries, with the same two cases. Folded in by the seat's
claim amendment on the card (comment 6577666544). Comment only.
- No key, type, member, `.min()`, default or export moves. Only the two
docblock comments and one description string change.
- Generated: `content/docs/references/api/record-page.mdx` (the `total`
row in both nested shapes that show `RecordPageTimelineCount`). The JSON
schema under `packages/spec/json-schema/` is gitignored and regenerated
by the build; nothing else that `check:generated` covers moved.
- Changeset: `.changeset/29138-timeline-total-describe.md`,
`@objectstack/spec: patch` and `@object-ui/types: patch` (its
`dist/*.d.ts` ships the docblock).
## Tests
No new tests: the change is prose. The spec package's suite and
`check:generated` ran on the final head (readings below).
## Verification
<details><summary>check:generated and the JSON schema reverse
check</summary>
- `pnpm --filter @objectstack/spec build && pnpm --filter
@objectstack/spec check:generated` before regenerating: `✗ 1 of 14
artifact(s) stale: check:docs`. After `check:generated --fix`: `✓ All 14
generated artifacts are up to date`.
- Reverse check: `grep -rl "upper bound of the entries the timeline
panel draws" packages/spec/json-schema` lists
`api/RecordPageTimelineCount.json`, `api/RecordPageResponse.json` and
`objectstack.json`; the old sentence has zero hits in
`packages/spec/json-schema`, `content/docs` and `packages/spec/src`.
</details>
<details><summary>Tests, type-checks and the derived gate sweep on head
3d67012</summary>
- `pnpm --filter @objectstack/spec test` on 21c2817 (the last head that
moved `packages/spec`; 3d67012 only adds the `@object-ui/types` comment
and the changeset line): VERDICT command-exit 0, Test Files 791 passed
(791), Tests 23391 passed, 1 todo.
- `pnpm --filter @objectstack/spec typecheck` (21c2817): exit 0. `pnpm
--filter @object-ui/types run type-check` (3d67012): exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` on 3d67012: 100 derived commands (38
changed lines, 4 files), including `node
scripts/check-sdui-manifest.mjs` and `pnpm --dir ui exec vitest run
scripts/`. Ran all 100: 99 exit 0, and `pnpm check:dual-build-cjs-loads`
exits 3 (PREREQUISITE NOT MET: some workspace packages have no dist
without a full build), so it is NOT MEASURED locally and left to CI.
`--ran` reconciliation: 100 derived, 99 run, 1 NOT-MEASURED, 0 UNRUN.
- The body gates (`check-changeset-no-major --base origin/main`,
`check-closing-keyword-parity`, `check-adr-0087-registration --base
origin/main`, `check-partof-closing-keyword`) exit 0 on this body with
`Clause-②: no` / `Metadata-protocol: none`; none asked for a different
declaration.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jUNaEANxba2LHLfyuZ)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent dfbe34d commit 53dda03
4 files changed
Lines changed: 31 additions & 7 deletions
File tree
- .changeset
- content/docs/references/api
- packages/spec/src/api
- ui/packages/types/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
317 | 325 | | |
318 | 326 | | |
319 | | - | |
| 327 | + | |
320 | 328 | | |
321 | 329 | | |
322 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
| |||
0 commit comments