Skip to content

Commit 8ecbe0f

Browse files
feat(spec): the view display page size defaults to 50 — PaginationConfigSchema.pageSize .default(25) → .default(50) (#20184)
Fixes #20050 Clause-②: no ## What The view display page size defaults to **50**. `PaginationConfigSchema.pageSize` in `packages/spec/src/ui/view.zod.ts` moves from `.default(25)` to `.default(50)`. That is the only declaration of the view display default. Maintainer ruling, verbatim (objectui#9853, batch #223 item 4): 「9853 默认页大小改为50」. The change goes into the protocol first: the renderer reads the spec default (objectui#9853 ruling C′ item 1), and no renderer hardcodes 50. ## Contract face: accept set unchanged, one default moved - **Default:** `ui/PaginationConfig:pageSize` moves from `25` to `50`. This is the only default the build's ratchet saw move (`📌 1 declared default change(s) accepted (#4666): - ui/PaginationConfig:pageSize: 25 → 50`). - **Accept set:** unchanged. The type is still `z.number().int().positive()`. The refusal pins `should reject negative pageSize`, `should reject zero pageSize` and `should reject non-integer pageSize` (`view.test.ts`) still pass without edits, and so does the component-arm cross-check (`component-object-grid-pagination-accept-set.pin.test.ts`). Measured on the built dist: `PaginationConfigSchema.safeParse({ pageSize: 0 })` is refused with `too_small` at `pageSize`. - **Describe text:** unchanged, byte for byte. It still reads: "Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set". The schema docblock gains one paragraph naming the ruling and stating that the renderer reads this default. - **Parse outputs, measured on the rebuilt `packages/spec/dist`:** | input | parsed `pagination` | | :--- | :--- | | `ListViewSchema` with `pagination: {}` | `{ pageSize: 50 }` (was `25`) | | `ListViewSchema` with no `pagination` | absent, before and after | | `ListViewSchema` with `pagination: { pageSize: 25 }` | `{ pageSize: 25 }` | - **Published JSON Schema:** `json-schema/ui/PaginationConfig.json` now has `pageSize.default: 50`. ## Sweep of every text stating the display default as 25, counted by declaration The declaration census covers every `pageSize` `.default(` under `packages/spec/src`. It finds 3 declarations: `ui/view.zod.ts` (25, this card), `kernel/metadata-plugin.zod.ts` (50) and `marketplace/marketplace.zod.ts` (20). The last two are out of scope per the card and untouched. Texts restating the view default: | text | what it said | this PR | | :--- | :--- | :--- | | `view.zod.ts` `PaginationConfigSchema.pageSize` | `.default(25)` | `.default(50)` | | `packages/spec/authorable-defaults/ui.json` (generated) | `ui/PaginationConfig:pageSize = 25` | regenerated by the build to `= 50` | | `content/docs/references/ui/view.mdx` (generated), 3 rows: `ListView.pagination`, `ObjectListView.pagination`, `## PaginationConfig` | `optional (default: 25)` | regenerated by `gen:docs` to `optional (default: 50)` | | `view.test.ts` pin `should default pageSize to 25` | `toBe(25)` | flipped to `should default pageSize to 50` / `toBe(50)` | | `view.test.ts` pin `should accept custom page size` | input `pageSize: 50` | input changed to `25`. With a default of 50 an input of 50 could no longer tell "the authored value survived" from "the default applied", so the pin now uses a non-default value | **Deliberately unchanged.** None of these states the current default: - `component-object-grid-pagination-accept-set.pin.test.ts` docblock table row `| view — PaginationConfigSchema | …default(25) | no |`. Its column header is `declaration before #19046`, so it is a historical record and still accurate. - Authored `pagination: { pageSize: 25 }` values: `plugin-approvals` `sys-approval-request.object.ts` (3 list views) and the CLI view scaffold template (`packages/cli/src/commands/generate.ts`). These are explicit author choices and still parse to 25. - Other `pageSize: 25` hits in `packages/spec/src/api/metadata.test.ts`, `kernel/metadata-plugin.test.ts`, `benchmark.bench.ts` and `sdui-parser` tests. These are different surfaces or authored inputs. - **Governed files:** none. No file under `skills/**` or `docs/adr/**` states the view page-size default (grep for page size / pagination with 25, zero hits). - **Hand-written docs / examples:** none. No hand-written page under `content/docs/**` (outside `references/`) or `examples/**` states a page-size default of 25. ## Surfaces this needed beyond the claim's list (measured, not optional) 1. **`packages/spec/scripts/lib/default-changes.ts`** gains the row `ui/PaginationConfig:pageSize` `from '25'` `to '50'`. Without it `pnpm --filter @objectstack/spec build` fails with `❌ 1 authorable key(s) changed the DEFAULT they apply when the author omits them: - ui/PaginationConfig:pageSize: 25 → 50`, and the gate prints this exact row to add. The row's `reason` states what moves and the one-line way to keep 25. 2. **Semantic migration entry `view-pagination-page-size-default-50`** (`src/migrations/entries/semantic/18.…ts`, plus `registry.ts` regenerated by `gen:migration-registry`). The ledger header prescribes one for a default move that reaches already-deployed silent documents. Every precedent where deployed behaviour moves has one: the autonumber `unique` default, the audience posture default and the approval escalation flip. The precedents where nothing deployed moves have none. `gen:spec-changes` and `gen:upgrade-guide` were re-run and produced zero diff, because step 18 is not projected yet. The same holds for the other 170 step-18 entries. ## Changeset level: `minor` This is a behaviour change for every author who omits the key, with no refusal and no type change. It is not a bug fix, so `patch` would understate it. It is not a narrowing and not a removal, so it is not breaking: `Clause-②: no`, no ADR-0087 marker owed (`check-adr-0087-registration`: "this PR adds no declared-breaking changeset"), and a `major` is refused by the repo in any case. This matches the level the previous published-default moves shipped at (the `enableOnInstall` default move and the default-flip conversion class both shipped `minor`). The changeset states the behaviour change for authors who omit `pagination.pageSize` and gives a FROM → TO table. ## Reverse verification (ablation), after the fix was committed `node scripts/ablation-replace.mjs` put back `.positive().default(25).describe(` in place of `.default(50)` at HEAD eaf5d39. The `view.zod.ts` blob `c474dcb477c7` is identical at 72e9a6a. The anchor hit x1 → x0, and the blob went `c474dcb477c7` → `c6933f3d2587`. Then it ran `vitest run src/ui/view.test.ts`. The direction observed was the expected one, red: `Tests 1 failed | 460 passed (461)` with `FAIL … PaginationConfigSchema > should default pageSize to 50` and `AssertionError: expected 25 to be 50`. The restore was proven two ways: the blob equals the HEAD blob (`c474dcb477c7…`) and `git diff HEAD` is empty. The script also carried an EXIT/INT/TERM trap with an absolute path. The test imports `./view.zod` from source, so no dist leg was needed. ## Tests and gates (at `72e9a6a0`, after merging `origin/main` e2c4e12) - `@objectstack/spec` build: exit 0 (`📌 … ui/PaginationConfig:pageSize: 25 → 50`). `check:generated`: 1 stale artifact (`content/docs/references/**`), fixed with `gen:docs`, then green. - `@objectstack/spec` test (`--project local`): `Test Files 540 passed (540)`, `Tests 15820 passed | 2 todo`. Test (`--project repo`): `31 passed`, `579 passed`. typecheck: exit 0. - Consumer suites (contract-face fixture triage): `@objectstack/platform-objects` `55 files / 911 tests passed`; `@objectstack/lint` `108 files / 4144 tests passed`. A repo-wide grep finds no test outside `packages/spec` that asserts a parsed view's `pagination.pageSize` (no `.snap`/JSON fixture carries one either). `plugin-approvals` / `cli` suites were not run locally; they are declared to CI (their fixtures author `pageSize: 25` explicitly). - Derived gates: `dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on the actual 8 changed paths (merge base e2c4e12) gives **112 commands**. Every one was run at 72e9a6a, and its exit code was written to disk before any pipe. **108 exit 0.** 4 are **NOT MEASURED**; each exited 3 with PREREQUISITE NOT MET because it reads BUILT output of packages this diff does not touch: - `check:skill-examples` needs `@objectstack/client-react` dist; - `check:lean-entry-closure` needs `@objectstack/objectql` dist; - `check:dual-build-cjs-loads` and `check:type-check-debt` need the whole workspace built. The targeted closure build could not get the shared verify lock (two 9-minute queue timeouts), so this is a declared narrowing, left to CI. This diff adds or changes no export, type or module (`check:api-surface`, `check:dts-closure` and `check:published-files` are green). The reconciliation `dispatch-gates.mjs --ran` reads: `112 derived famil(ies) accounted for — 108 run, 4 NOT-MEASURED (4 DERIVED from a recorded exit 3)`, 0 UNRUN. Three lint-dist gates first exited 3; after the lint closure was built they were re-run green. Also run: the 5 artifact-roster gates whose roster lives in a directory this diff touches (`check-changeset-fixed`, `check:meta-url-spelling`, `check:authz-resolver`, `check:error-code-casing`, `check:filter-alias-parity`), all exit 0. - Mergeability: a driver-less `merge-tree` of this head onto origin/main `836aad2a` (7 commits newer, one of them touching `registry.ts`) is clean. - `turbo ls --affected` is not used for any narrowing here. ## objectui (read-only, at `.objectui-sha` f8a9d0f) No objectui test pins `25` as the spec default. objectui brings the spec schema in as `stripImportedDefaults(SpecPaginationConfigSchema)` (`packages/types/src/zod/objectql.zod.ts`), and `spec-subschema-parity.test.ts` asserts identity against that stripped object, not a value. Every `pageSize: 25` in objectui tests is an authored input. objectui#9853 is where the renderer starts reading this default. objectui was not edited. ## Acceptance notes - The CLI view scaffold (`os generate view`) writes an explicit `pagination: { pageSize: 25 }`, so a newly scaffolded view shows 25 rows, not the platform default. It is an authored value and it validates. It is not a defect under the filing classes; noted only. Carrier: none. - `view.zod.ts` is region-split with seat 2's #20051. This diff touches only `PaginationConfigSchema` (around line 1100). It does not touch the flattened list-overlay region (`ListViewShapeSchema.extend(flattenedViewOverlayFields()).strip()` / overlay `options`). --- _Generated by [Claude Code](https://claude.ai/code/session_01Rjy9MeetSfq34PKn81CRiN)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e4471e6 commit 8ecbe0f

8 files changed

Lines changed: 146 additions & 9 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): a view that declares no page size now shows 50 per page — `PaginationConfigSchema.pageSize` defaults to 50 (was 25)
6+
7+
The platform display page size is 50 (maintainer ruling on objectui#9853,
8+
「9853 默认页大小改为50」). It is declared in one place, the view contract's
9+
`PaginationConfigSchema.pageSize`, and the renderer reads that spec default
10+
rather than keeping a number of its own — so the change lands in the protocol
11+
first.
12+
13+
**What changes for an author who omits the page size:**
14+
15+
- A view whose `pagination` block does not set `pageSize` now parses to
16+
`pageSize: 50` where it parsed to `25`: 50 rows per page on a paged view, and
17+
a fetch ceiling of 50 on a view with no pager (kanban, gallery, timeline).
18+
- A view with no `pagination` block at all parses with none, before and after;
19+
its page size comes from the renderer, which takes this spec default (the
20+
Console does so once objectui#9853 lands).
21+
22+
**What does not change:** the accept set. `pageSize` is still a positive
23+
integer; `0`, negatives and fractions are refused exactly as before, and every
24+
page size an author wrote parses to the number they wrote.
25+
26+
### Migration: FROM → TO
27+
28+
| FROM | TO |
29+
| :--- | :--- |
30+
| a view that declares no page size and relied on 25 rows per page | write it: `pagination: { pageSize: 25 }` |
31+
| a view that declares no page size and should follow the platform default | change nothing — it now shows 50 |
32+
| reading `PaginationConfigParsed.pageSize` after parsing a `pagination` block without `pageSize` | it yields `50` where it yielded `25`; the type is unchanged |
33+
| reading the published JSON Schema's `default` for `ui/PaginationConfig` `pageSize` | it is `50` |
34+
35+
The move is declared in `DEFAULT_CHANGES_BY_MAJOR`
36+
(`packages/spec/scripts/lib/default-changes.ts`, `ui/PaginationConfig:pageSize`
37+
25 → 50) and carried on the upgrade path as the semantic entry
38+
`view-pagination-page-size-default-50`.

‎content/docs/references/ui/view.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ View filter rule
927927

928928
| Property | Type | Required | Description |
929929
| :--- | :--- | :--- | :--- |
930-
| **pageSize** | `integer` | optional (default: `25`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
930+
| **pageSize** | `integer` | optional (default: `50`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
931931
| **pageSizeOptions** | `integer[]` | optional | Available page size options |
932932

933933
### Nested Shape: `ListView.kanban`
@@ -1326,7 +1326,7 @@ View filter rule
13261326

13271327
| Property | Type | Required | Description |
13281328
| :--- | :--- | :--- | :--- |
1329-
| **pageSize** | `integer` | optional (default: `25`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
1329+
| **pageSize** | `integer` | optional (default: `50`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
13301330
| **pageSizeOptions** | `integer[]` | optional | Available page size options |
13311331

13321332
### Nested Shape: `ObjectListView.kanban`
@@ -1595,7 +1595,7 @@ Quick-filter field configuration
15951595

15961596
| Property | Type | Required | Description |
15971597
| :--- | :--- | :--- | :--- |
1598-
| **pageSize** | `integer` | optional (default: `25`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
1598+
| **pageSize** | `integer` | optional (default: `50`) | Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered set is larger than it, show a visible truncation signal saying what is on screen is not the whole set |
15991599
| **pageSizeOptions** | `integer[]` | optional | Available page size options |
16001600

16011601

‎packages/spec/authorable-defaults/ui.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"ui/PageTabsProps:position = \"top\"",
8383
"ui/PageTabsProps:tabStyle = \"line\"",
8484
"ui/PageVariable:type = \"string\"",
85-
"ui/PaginationConfig:pageSize = 25",
85+
"ui/PaginationConfig:pageSize = 50",
8686
"ui/RecordActivityProps:enableMentions = true",
8787
"ui/RecordActivityProps:enableReactions = false",
8888
"ui/RecordActivityProps:enableThreading = false",

‎packages/spec/scripts/lib/default-changes.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,5 +533,26 @@ export const DEFAULT_CHANGES_BY_MAJOR: Readonly<Record<number, readonly Declared
533533
+ '`required` that lists defaulted keys is this repo\'s existing output-mode convention, not '
534534
+ 'a new one.',
535535
},
536+
{
537+
key: 'ui/PaginationConfig:pageSize',
538+
from: '25',
539+
to: '50',
540+
reason:
541+
'A RULED behaviour change, not a correction: the platform display page size is 50 '
542+
+ '(maintainer ruling on objectui#9853, verbatim 「9853 默认页大小改为50」), and the spec '
543+
+ 'declaration is where that number lives — the renderer is ruled to read the spec default '
544+
+ 'rather than keep a page size of its own (objectui#9853 ruling C′ item 1), so the change '
545+
+ 'lands here first. '
546+
+ 'What moves: a view whose `pagination` block omits `pageSize` now parses to `pageSize: 50` '
547+
+ 'where it parsed to `25` — 50 rows per page on a paged view, and a fetch ceiling of 50 on a '
548+
+ 'view with no pager (kanban, gallery, timeline). A view with NO `pagination` block parses '
549+
+ 'with none on either side, so the parse materialises nothing there; the number reaches it '
550+
+ 'only through a renderer that takes the spec default. The accept set does not move: '
551+
+ '`pageSize` is still a positive integer, and `0`, negatives and fractions are refused '
552+
+ 'exactly as before. A `pageSize` written into a document — by its author, or by a tool '
553+
+ 'that serialised an earlier parse — is an authored value and keeps its number. '
554+
+ 'To keep 25 rows per page, write it: `pagination: { pageSize: 25 }`. To take the platform '
555+
+ 'default, change nothing.',
556+
},
536557
],
537558
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import type { SemanticMigration } from '../../types.js';
4+
5+
// The display page size a view gets when it declares none moved from 25 to 50
6+
// (maintainer ruling on objectui#9853). A default move reaches every silent
7+
// document with no parse error and nothing in the author's diff, so the
8+
// upgrade path carries it as a TODO: only the deployment can say whether a
9+
// view that never declared a page size was relying on 25.
10+
export const entry: SemanticMigration = {
11+
id: 'view-pagination-page-size-default-50',
12+
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a code
13+
// span AND a table cell.
14+
surface: 'ui.PaginationConfig.pageSize — an OMITTED page size on a view',
15+
replacement: 'nothing, to take the platform display page size of 50. To keep the old 25 rows '
16+
+ 'per page on a view, write it: `pagination: { pageSize: 25 }`',
17+
reason:
18+
'A RULED behaviour change on a default, so there is nothing to rewrite and nothing to '
19+
+ 'refuse: the maintainer set the platform display page size to 50 (「9853 默认页大小改为50」, '
20+
+ 'objectui#9853), and the declared default of `PaginationConfigSchema.pageSize` moved '
21+
+ 'from 25 to 50. A `pagination` block that omits `pageSize` now parses to 50 — 50 rows '
22+
+ 'per page on a paged view, and a fetch ceiling of 50 on a view with no pager (kanban, '
23+
+ 'gallery, timeline). A view with no `pagination` block at all parses with none on either '
24+
+ 'side; its page size reaches it through the renderer, which is ruled to read the spec '
25+
+ 'default rather than keep its own number (objectui#9853 ruling C′ item 1). Not losslessly '
26+
+ 'convertible because the question is intent, not text: a mechanical pass that wrote '
27+
+ '`pageSize: 25` into every silent view would preserve the old number and defeat the '
28+
+ 'ruling, and one that wrote 50 would add nothing the default does not already do. Only '
29+
+ 'the deployment knows which silent views were relying on 25. The accept set is unchanged '
30+
+ '— a positive integer — and every authored `pageSize` parses exactly as before.',
31+
acceptanceCriteria:
32+
'An empty pagination configuration parses to a page size of 50, and a list view carrying '
33+
+ '`pagination: {}` parses to `pagination.pageSize` 50; an authored '
34+
+ '`pagination: { pageSize: 25 }` still parses to 25; `pageSize: 0`, a negative and a '
35+
+ 'fraction are still refused. A view that must keep 25 rows per page declares '
36+
+ '`pagination: { pageSize: 25 }` and shows 25 rows on its first page.',
37+
};

‎packages/spec/src/migrations/registry.ts‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14207,6 +14207,39 @@ const step18: MigrationStep = {
1420714207
+ 'equals, and operator: "in" with value: ["won"] — select the same rows, so the result '
1420814208
+ 'set cannot tell you which the metadata meant, and only the author knows.',
1420914209
},
14210+
// The display page size a view gets when it declares none moved from 25 to 50
14211+
// (maintainer ruling on objectui#9853). A default move reaches every silent
14212+
// document with no parse error and nothing in the author's diff, so the
14213+
// upgrade path carries it as a TODO: only the deployment can say whether a
14214+
// view that never declared a page size was relying on 25.
14215+
{
14216+
id: 'view-pagination-page-size-default-50',
14217+
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a code
14218+
// span AND a table cell.
14219+
surface: 'ui.PaginationConfig.pageSize — an OMITTED page size on a view',
14220+
replacement: 'nothing, to take the platform display page size of 50. To keep the old 25 rows '
14221+
+ 'per page on a view, write it: `pagination: { pageSize: 25 }`',
14222+
reason:
14223+
'A RULED behaviour change on a default, so there is nothing to rewrite and nothing to '
14224+
+ 'refuse: the maintainer set the platform display page size to 50 (「9853 默认页大小改为50」, '
14225+
+ 'objectui#9853), and the declared default of `PaginationConfigSchema.pageSize` moved '
14226+
+ 'from 25 to 50. A `pagination` block that omits `pageSize` now parses to 50 — 50 rows '
14227+
+ 'per page on a paged view, and a fetch ceiling of 50 on a view with no pager (kanban, '
14228+
+ 'gallery, timeline). A view with no `pagination` block at all parses with none on either '
14229+
+ 'side; its page size reaches it through the renderer, which is ruled to read the spec '
14230+
+ 'default rather than keep its own number (objectui#9853 ruling C′ item 1). Not losslessly '
14231+
+ 'convertible because the question is intent, not text: a mechanical pass that wrote '
14232+
+ '`pageSize: 25` into every silent view would preserve the old number and defeat the '
14233+
+ 'ruling, and one that wrote 50 would add nothing the default does not already do. Only '
14234+
+ 'the deployment knows which silent views were relying on 25. The accept set is unchanged '
14235+
+ '— a positive integer — and every authored `pageSize` parses exactly as before.',
14236+
acceptanceCriteria:
14237+
'An empty pagination configuration parses to a page size of 50, and a list view carrying '
14238+
+ '`pagination: {}` parses to `pagination.pageSize` 50; an authored '
14239+
+ '`pagination: { pageSize: 25 }` still parses to 25; `pageSize: 0`, a negative and a '
14240+
+ 'fraction are still refused. A view that must keep 25 rows per page declares '
14241+
+ '`pagination: { pageSize: 25 }` and shows 25 rows on its first page.',
14242+
},
1421014243
{
1421114244
id: 'wait-node-event-config-required',
1421214245
surface:

‎packages/spec/src/ui/view.test.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,20 +1434,23 @@ describe('SelectionConfigSchema', () => {
14341434
});
14351435

14361436
describe('PaginationConfigSchema', () => {
1437-
it('should default pageSize to 25', () => {
1437+
it('should default pageSize to 50', () => {
14381438
const pagination = {};
14391439

14401440
const result = PaginationConfigSchema.parse(pagination);
1441-
expect(result.pageSize).toBe(25);
1441+
expect(result.pageSize).toBe(50);
14421442
});
14431443

14441444
it('should accept custom page size', () => {
1445+
// 25 — the pre-#20050 default, which an author who wants it back now
1446+
// writes explicitly. A value OTHER than the default, so this pin still
1447+
// discriminates "the authored value survives" from "the default applied".
14451448
const pagination = {
1446-
pageSize: 50,
1449+
pageSize: 25,
14471450
};
14481451

14491452
const result = PaginationConfigSchema.parse(pagination);
1450-
expect(result.pageSize).toBe(50);
1453+
expect(result.pageSize).toBe(25);
14511454
});
14521455

14531456
it('should accept page size options', () => {

‎packages/spec/src/ui/view.zod.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,12 +1096,17 @@ export const SelectionConfigSchema = lazySchema(() => strictObject({
10961096

10971097
/**
10981098
* List View Pagination Configuration
1099+
*
1100+
* `pageSize` defaults to 50 — the platform's display page size, set by the
1101+
* maintainer's ruling on objectui#9853 (「9853 默认页大小改为50」). This
1102+
* declaration is the one place that number lives: a renderer reads the spec
1103+
* default, it never keeps a page size of its own.
10991104
*/
11001105
export const PaginationConfigSchema = lazySchema(() => strictObject({
11011106
surface: 'this pagination configuration',
11021107
history: VIEW_HISTORY,
11031108
}, {
1104-
pageSize: z.number().int().positive().default(25).describe(
1109+
pageSize: z.number().int().positive().default(50).describe(
11051110
'Number of records per page. On a view with no pager (kanban, gallery, timeline) it is the fetch '
11061111
+ 'ceiling, and the renderer owes two things: bound its fetch at this number, and, when the filtered '
11071112
+ 'set is larger than it, show a visible truncation signal saying what is on screen is not the whole set',

0 commit comments

Comments
 (0)