Skip to content

feat(plugin-gantt): the gantt takes its own row ceiling, 10,000, instead of the shared 2,000 - #33004

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-xrv6z9
Nov 13, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-xrv6z9

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #32421

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  1. 改了什么:甘特图不再共用其他非表格视图的 2,000 行上限,改用自己的常量 GANTT_ROW_CEILING = 10,000;日历、地图、树形图仍是 2,000。
  2. 为什么改:卡片作者的排产甘特有 4,999 行,升级前只画前 2,000 行并提示截断;甘特本身是虚拟滚动的,行数多不增加页面元素,2,000 是按不虚拟化的树形图定的。
  3. 风险与回滚:每次打开甘特最多取 10,001 行(以前 2,001);实测 10,000 行约 1 MB 数据、浏览器约 0.45 秒画出首屏。回滚只需还原本 PR。
  4. 先看:ui/packages/core/src/utils/non-grid-row-ceiling.ts(新常量、实测表、两个函数的 ceiling 参数);ui/packages/plugin-gantt/src/ObjectGantt.tsx(查询与截断改用新常量);ui/packages/plugin-gantt/src/ObjectGantt.harness.test.tsx(新增 4,999 行与 pageSize 两条用例)。
  5. 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-gantt/src/ObjectGantt.harness.test.tsx,预期全绿,其中「between the shared and the gantt ceiling」一条画出 4,999 行且无截断提示。
  6. 需要你做的:无,席位落地。

What changes

Ruling B on #32421 (comment 6842306915): the gantt leaves the shared 2,000-row non-grid ceiling, which the non-virtualised tree prices, and takes a ceiling of its own, a named renderer constant set by measurement.

  • @object-ui/core: GANTT_ROW_CEILING = 10000 next to NON_GRID_ROW_CEILING, with the measured table in its doc comment. nonGridRowCeilingQuery(ceiling?) and applyNonGridRowCeiling(result, ceiling?) take an optional ceiling typed as NonGridRowCeiling, the closed union of the two constants, so a view-metadata number cannot be passed without a visible cast. Leaving the argument out keeps 2,000, so calendar, map and tree are unchanged byte for byte at their call sites.
  • @object-ui/plugin-gantt: ObjectGantt's reload sends $top = GANTT_ROW_CEILING + 1 and slices at the same ceiling. Above it, the probe row and NonGridRowCeilingNote work exactly as before.
  • Not changed, by the ruling: pagination.pageSize and limit stay unread by the gantt; the datasource's external.rowCap is not read; no packages/spec change.
  • The value is a literal 10,000, equal to EXTERNAL_ROW_CAP_CEILING but not imported from it, so raising the spec's cap cannot raise this one unmeasured.

Measurement (owed before the constant was fixed)

Fetch and first paint at 2,000 / 4,000 / 10,000 rows: inside budget at 10,000

Same method as the existing table in non-grid-row-ceiling.ts (this repo's DOM test lane, @testing-library/react, ObjectGantt over the real GanttView, mount to settled paint), the gantt alone, one sitting, shared box. "adapter" parses the rows from a JSON wire string inside find() (the fetch's deserialisation half). "Chromium" is headless Chromium on the Console's Vite dev server, a temporary page mounting ObjectGantt with a find() that fetches a JSON blob, mount to the first frame after rows reach the DOM. Format: DOM elements · ms.

rows DOM lane, inline (2 passes) DOM lane, adapter (payload, parse) Chromium (2 passes)
2,000 726 · 137 / 130 732 · 111 (0.20 MB, 3ms) 623 · 396 / 383
4,000 726 · 146 / 150 732 · 132 (0.41 MB, 4ms) 623 · 466 / 454
10,000 726 · 197 / 240 732 · 235 (1.02 MB, 20ms) 623 · 436 / 457
10,500 727 · 216, note shows "first 10000 of 10500" n/a 624 · 408, same note

Budget (ruling a′'s, applied to the gantt): DOM far inside ~10,000 elements and mount inside the ~3s the tree is held to. At 10,000 rows the DOM is flat at 726 and mount is about 0.2s in the DOM lane and about 0.45s in Chromium, so 10,000 is within budget and is the value. For scale, the existing table has the tree at 10,406 elements · 2,720ms for 2,000 rows.

Not measured: a fetch from a running ObjectStack server (no backend stack was started in this container; the Chromium reading fetches a same-page JSON blob, so it prices transfer-free parse and mount, not server read time or network).

Also in Chromium at 10,000 rows: the timeline scrolls to row 10,000 (scroll height 400,000px = 10,000 × 40px rows), and dragging row 10,000's bar called the adapter's update('10000', { visible_from: '2026-01-04', due_date: '2026-04-03' }), a 3-day shift: drag write-back works at the far end of the set.

The temporary page, harness and screenshots were deleted; nothing of them is committed.

Tests

  • @object-ui/core non-grid-row-ceiling.test.ts: new block. CONTROL: with no argument both helpers keep 2,000 (4,999 rows truncate to 2,000); the gantt query is GANTT_ROW_CEILING + 1; 4,999 rows are kept whole under the gantt ceiling; one past it truncates and slices the probe row.
  • ObjectGantt.harness.test.tsx: the existing ceiling, inline-provider, host-prop and filter-then-ceiling cases move to GANTT_ROW_CEILING (the past-ceiling totals now exceed 10,000; ceilingOrder uses 12,000 raw rows filtered to 4,000). New: 4,999 rows between the two ceilings draw whole with no note and $top 10,001; an authored pagination.pageSize and limit of 50 or 50,000 change nothing.
  • ObjectGantt.elementDataSource.test.tsx: the authored-limit pin now expects the gantt ceiling's $top.
  • Tree / calendar / map controls: their unchanged rowCeiling-7210 files still pin nonGridRowCeilingQuery() (2,001) and pass.
Ablation (measured)

With the fix committed, ObjectGantt.tsx was mutated back to nonGridRowCeilingQuery() and applyNonGridRowCeiling(result) via scripts/ablation-replace.mjs (anchor 1 → 0, blob changed). ObjectGantt.harness.test.tsx + ObjectGantt.elementDataSource.test.tsx: 9 failed | 53 passed, including the between-ceilings case, the pageSize case and every past-ceiling case. Restored: blob == HEAD and git diff HEAD empty. ui tests import @object-ui/* source through the vitest aliases, so no dist rebuild was involved.

Acceptance notes

  • Clause-②: yes (widening): @object-ui/core's entry gains GANTT_ROW_CEILING, the NonGridRowCeiling type and an optional parameter on two exported functions; nothing existing narrows. Metadata-protocol: none: no key, value or default an author writes changes, so both packages ship patch.
  • The existing table's header says it was measured in the "jsdom lane"; ui/vitest.config.mts runs the DOM projects on happy-dom today. The new reading says "DOM test lane" and does not re-label the old one.

Verification

Local subset at 6b2b52ef (pre-merge head; the merge of origin/main into a343f613 touched no file under ui/packages/core, ui/packages/plugin-gantt or ui/packages/react, so only the diff-scoped changeset gates were re-run there, exit 0). Full fleet: CI.

  • pnpm --dir ui exec vitest run packages/core/ packages/plugin-gantt/: Test Files 334 passed | 1 skipped (335), Tests 5212 passed | 141 skipped.
  • Cross-view ceiling files (core, react note, gantt harness / elementDataSource / contractEnvelope, tree / calendar / map rowCeiling-7210): Test Files 113 passed (113), Tests 1993 passed.
  • pnpm --filter @object-ui/core run type-check exit 0; pnpm --filter @object-ui/plugin-gantt run type-check exit 0; pnpm --dir ui run check:new-line-citations exit 0 (0 new citations).
  • node scripts/pm/dispatch-gates.mjs --ran: 36 derived families accounted for, 36 run, 0 NOT-MEASURED, every one exit 0 (check-sdui-manifest included).
Derived gate list with exit codes
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-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.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 :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.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/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: 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:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm --filter @object-ui/core run type-check :: exit 0
pnpm --filter @object-ui/plugin-gantt run type-check :: exit 0
pnpm --dir ui exec vitest run packages/core/ packages/plugin-gantt/ :: exit 0
pnpm --dir ui run check:new-line-citations :: exit 0

Generated by Claude Code

…ILING

The gantt virtualises its task list and timeline, so it leaves the shared
2,000-row non-grid ceiling the non-virtualised tree prices and applies a
named renderer constant of its own through the same probe-row mechanism.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwEQg4YH7qUdPW7h3D
…and an unread pageSize

Records the measured table beside GANTT_ROW_CEILING.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwEQg4YH7qUdPW7h3D
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwEQg4YH7qUdPW7h3D
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 13, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-elon-musk · session_016WV4cwxNJ1s5i1doop7KEv

Contract review

Served-tier: TIER_DEFAULT
Head-sha: a343f613b7a633dac4f65fbd8e6a04376b7d27d2
Local-runs: none

① Derived judgments

  • The face is the Clause-②: yes (widening) declaration alone. @object-ui/core re-exports ./utils/non-grid-row-ceiling.js wholesale from its entry (ui/packages/core/src/index.ts:59), so three additions reach the published surface: the constant GANTT_ROW_CEILING = 10000, the type NonGridRowCeiling (the closed literal union 2000 | 10000), and an optional trailing ceiling parameter on nonGridRowCeilingQuery and applyNonGridRowCeiling, defaulting to NON_GRID_ROW_CEILING. A call with no argument returns exactly what it returned before; nothing is removed, renamed or narrowed. @object-ui/react's named re-export (NON_GRID_ROW_CEILING, applyNonGridRowCeiling) is unchanged.
  • No packages/spec path, no authorable key, no metadata: ruling B (6842306915) holds — pagination.pageSize, limit and external.rowCap stay unread, and the closed union keeps a metadata number from reaching either helper without a visible cast.

② Semver level

  • patch for @object-ui/core and @object-ui/plugin-gantt (additive exports with defaulted optional parameters, and a renderer behaviour change on the gantt); no major or minor owed.

③ Boundary flags

  • None. The gantt fetches up to 10,001 rows per open instead of 2,001; the server still refuses a read past a datasource's cap on its own (EXTERNAL_ROW_CAP_EXCEEDED), and no permission or tenancy path moves. The measured cost (DOM flat at 726, ~0.2 s mount, ~0.45 s first frame in headless Chromium at 10,000 rows) is recorded in the constant's doc comment.

Implemented-by: claude/project-thread-xrv6z9
Reviewed-by: session_016WV4cwxNJ1s5i1doop7KEv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-elon-musk · session_016WV4cwxNJ1s5i1doop7KEv

席位核对 · ACCEPT · domain:ui#1 · 2026-11-13T03:55Z · head a343f613b7a633dac4f65fbd8e6a04376b7d27d2

  • Shape: draft → main, Fixes #32421. Files: ui/packages/core/src/utils/non-grid-row-ceiling.ts + its test, ui/packages/plugin-gantt/src/ObjectGantt.tsx + two gantt tests, one root .changeset/ (@object-ui/core, @object-ui/plugin-gantt patch). Inside the claim's surface; no packages/spec, no server code.
  • Seat's own read of the diff: ruling B (6842306915) as written: GANTT_ROW_CEILING = 10000 is a literal next to NON_GRID_ROW_CEILING, not an import of EXTERNAL_ROW_CAP_CEILING; the gantt's query and its slice both pass it (nonGridRowCeilingQuery(GANTT_ROW_CEILING), applyNonGridRowCeiling(result, GANTT_ROW_CEILING)), so the probe row and the cut agree. Calendar, map, tree and calendarWindow.ts call with no argument and keep 2,000 unchanged. NonGridRowCeilingNote reads the drawn count off result.rows.length, so the footnote prints 10,000 above the new ceiling with no change of its own. pagination.pageSize / limit / external.rowCap stay unread (pinned by the "authored pagination.pageSize changes nothing" test).
  • Measurement: owed before the constant was fixed and done: DOM flat at 726 elements from 2,000 to 10,000 rows, ~0.2 s mount in the DOM lane, ~0.45 s to first frame in headless Chromium, 1.0 MB JSON parse ~20 ms; inside ruling a′'s budget, so the target is the value.
  • Clause-②: yes (widening), contract review TIER_DEFAULT PASS 6843071210 on this head.
  • Gates (check-runs on this head): 58 runs, 45 success, 13 skipped, 0 red. Dev's local: 36 derived gates + type-check exit 0; ablation 9 red, restored; tree/calendar/map controls green (report 6843039958).
  • Accepted deviations: fetch from a real server at 10,000 rows was not measured (no backend stack in the container); the adapter column measures the JSON deserialisation half, and the server's own cap refusal is unchanged. Drag write-back has no new test: the write path is untouched by a ceiling change.
  • Out of scope / landing: none filed. check-governed-merges --pr 33004: NOT governed, +229/−47. K = 1 behind main, no merge owed. Lands by the seat: ready + auto-merge into the merge queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-gantt: a gantt-only row ceiling set by measurement (target 10,000) instead of the shared 2,000 non-grid ceiling

2 participants