Repository navigation
test(plugin-gantt): fold four more ObjectGantt pins onto the shared harness - #30745
Merged
Merged
Conversation
…arness The colorFieldLadder-7243, invalidationRefetch-10035, propertiesBag-10859 and retiredApiProvider-12325 pins render the real ObjectGantt over the same three mocks as the harness's first seven blocks. Each becomes a top-level describe named after its former file, its GanttView stand-in installed through the standIns slot in a beforeEach, everything else moved verbatim. The sonner mock becomes the union of the blocks' mocks (error and success). ObjectGantt.elementDataSource stays its own file: the console's registry-inputs-spec-parity ledger names its path. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXNVxCQk1CCy55gFjQ
…ess block Twelve test files in eight workspace packages named one of the eleven ObjectGantt pin files now folded into plugin-gantt's ObjectGantt.harness.test.tsx. Each now names the block (the former file's stem) and the harness file. Comment and description text only; the five source files that name a folded file are left as they are. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXNVxCQk1CCy55gFjQ
Contributor
Author
|
domain:ui#1 · os-sales · session_01L6bhgWn6zhNa4LL7VB1rtL 维护者速读
席位核对 — ACCEPT · head 6a0388d
|
This was referenced Nov 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sales · project thread
Part of #29469
Clause-②: no
Metadata-protocol: none
维护者速读
ObjectGantt.harness.test.tsx,每个原文件变成一个顶层describe,断言一字未改;另把 12 个测试文件注释里还写着已合并文件名的地方,改成指向共享文件里对应的块。ObjectGantt.harness.test.tsx开头 75 行(sonnermock 改成并集、槽位类型改成(props: never));再看ObjectGantt.invalidationRefetch-10035块的beforeEach(带 hook 的替身改成具名组件)。ui/下跑pnpm exec vitest run packages/plugin-gantt/src/ObjectGantt.harness.test.tsx,应见 1 个文件、52 个测试全过。What changes
Slice 1b, the second and last
ObjectGantt*PR of the shared-setup rollout (ruling 6583487846 on #29469; seat amendment 2, 6672694520: at most two PRs per family). Four more pins render the realObjectGanttover the same three mocks as the seven blocks #30725 folded (sonner's toast, a./GanttViewstand-in,@object-ui/plugin-detailwithRecordDetailDrawerandderiveRecordPageHrefstubbed out), so they joinui/packages/plugin-gantt/src/ObjectGantt.harness.test.tsxthe same way:ObjectGantt.colorFieldLadder-7243,ObjectGantt.invalidationRefetch-10035,ObjectGantt.propertiesBag-10859andObjectGantt.retiredApiProvider-12325are each a top-leveldescribenamed after the former file, docblock above it, stand-in installed in abeforeEachthrough thestandInsslot, everything else moved verbatim and re-indented by two spaces.sonnermock is now the union of the blocks' mocks,{ error, success }:invalidationRefetch-10035mockedsuccesstoo. No block asserts on a toast, andObjectGantt.tsxcalls onlytoast.error.(props: never) => unknownand called withprops as never, so a stand-in keeps its own props annotation (propertiesBag-10859types itstasks).invalidationRefetch-10035stand-in callsReact.useState, so itsbeforeEachdeclares it asconst GanttView = …and assigns that to the slot; an arrow assigned straight tostandIns.ganttViewfailsreact-hooks/rules-of-hooks. The body is unchanged, and it still runs inside the mockedGanttView.import './index'ispropertiesBag-10859's, which said why the import is at module scope.ObjectGantt.test.tsxnames theretiredApiProvider-12325block instead of the deleted file.Comments that named a folded file (amendment 2). Twelve test files in eight workspace packages named one of the eleven files #30725 and this PR fold. Each now names the block and the harness file (comment text only):
plugin-ganttObjectGantt.hostRowClick-27057,plugin-listListView.ganttPagingChrome-7210,ListView.ganttToolbarFilter-10037,ListView.selfQueryingViewsToolbarState-10250,ListView.test.tsx,ObjectGallery.hostOwnsRows-7390,plugin-viewObjectView.fetchAllowList-10982,reactuseSettledSchema.equalPayload-10106,app-shellObjectView.refreshInPlace-10035,corerecord-color,typesobject-gantt-properties-bag-10859-b6, and onepinsdescription string inui/apps/console/src/__tests__/registry-inputs-spec-parity.test.ts(theobject-gantt.ganttrow). That ledger checks a pin'sfile(exists, is collected, names the block and the key), never itspinstext. The five source files that name a folded file (ObjectGantt.tsx,index.tsx,ObjectTimeline.tsx,ListView.tsx,ObjectView.tsx) are unchanged, as amendment 2 says; each stem stillgit greps to itsdescribe.Test files only: no source file, no changeset (
skip-changeset). No package entry imports a test file: the plugins and the console bundle from their entries withvite build, the builtcore,typesandreactdisthold no module that importsvitest, andapp-shellis private.Tests
Former file → describe (no title or assertion dropped)
TypeScript AST walk of each former file at
f18fd963(the #30725 head, where they still exist) against thedescribeof the same name in the harness at this PR's head.itbeforeitafterexpect(beforeexpect(afterObjectGantt.colorFieldLadder-7243.test.tsxObjectGantt.invalidationRefetch-10035.test.tsxObjectGantt.propertiesBag-10859.test.tsxObjectGantt.retiredApiProvider-12325.test.tsxThe harness now holds 11 top-level
describeblocks and 52 tests (35 from #30725, 17 from here), all passing.CPU before and after (local A/B, one machine)
CI after: NOT MEASURED, for the reason #30725 gives: the per-file timings reporter (#29517) uploads on
main's full-battery runs only. Its first after-reading is the first full-batterymainrun after this merges.Local A/B on one 4-vCPU container, under
os-verify-lock(shared-box seconds), same command both legs, two runs each, fromui/:pnpm exec vitest run <every ObjectGantt*.test.ts(x) in plugin-gantt> --maxWorkers=2, with a throwaway reporter reading each module'sdiagnostic(). Fixed = environment + prepare + setup + import. The "before" leg restores the four files and the #30725 harness fromf18fd963into this branch's tree, so both legs run the same 45 other files.The four files cost 12.4 / 12.3 s on their own; folded, they add about 0.8 s to the harness. The family went from 154.6 s to 142.3 s of CPU (−8.0 %), wall −8 %. The A/B ran on
e673f7c6, the pre-merge commit of this fold; itsplugin-gantttree is byte-identical to this branch's7cbfc512, and the head adds one comment-only commit (6a0388d8).Acceptance notes
./GanttViewonly, 3,722 lines; moving them into a harness changes about twice that, over 7,000 lines, which no single PR under the 3,000-line bar can carry. Amendment 2 has a family's second PR fold the next cluster that fits, and these four are the pins left on the harness's own mock set.ObjectGantt.elementDataSourcestays its own file. It shares the harness's three mocks, butui/apps/console/src/__tests__/registry-inputs-spec-parity.test.tsnames its path as theobject-gantt.dataSourcepin, and that ledger fails when the file is gone. The ledger is outside the claim's file surface.ObjectGantt*pins (amendment 2: listed in the family's last PR). 39 files inui/packages/plugin-gantt/src/, by the setup they share;ObjectGantt.test.tsxis the component's main suite, not a per-issue pin, and is not counted. Lines at this PR's head../GanttViewstand-in only (realsonner, real@object-ui/plugin-detail)contractEnvelope-6839(328),currencyDep(296),currencyMode-10422(136),dateLocale(132),discardedConfigMemo(124),invalidBlockRefusal-13459(102),numberLocale(333),numberResolvedWidth-11254(195),percentResolvedWidth-11254(158),persistfilters(113),quickfilter.i18n.fallback(84),quickfilter.i18n(149),quickfilter(377),readback(152),referenceArms-6837(316),staleReloadFinally-7231(359),unconfiguredRefusal-7070(187),writeGrant-12082(181)./GanttViewstand-in and asonnermock (error+success;writeerrormockserroronly), real@object-ui/plugin-detailerrorClears-10578(339),refreshInPlace-7237(288),silentOvertake-10633(367),writeerror(112)vi.mockat all (realGanttView)configPin(218),exportFileName.i18n(222),pluginDriverTree(136),taskColumnLabel-27386(96)./GanttViewand./ResourceWorkloadstand-ins (viewmode's workload stand-in also writesviewMode)blockPrecedence(281),dependencyAlias(140),viewmode(112)@object-ui/plugin-detailwithRecordDetailPanelreplaced (a different stand-in in each), plussonnerindrawerfetchandhostRowClick-27057drawerfetch(171),drawerlock(91),hostRowClick-27057(155)@object-ui/reactuseNavigationOverlayspy andsonner;navigationModeResolution-7334stubs the record drawer,navigationPageSink-7334replacesRecordDetailPanelnavigationModeResolution-7334(225),navigationPageSink-7334(253)@object-ui/componentsNavigationOverlaywrapped, plussonner(overlayShellModes-9299also mocks@object-ui/plugin-detailand@object-ui/react)navWidthDefault(235),overlayShellModes-9299(292)react(useMemo,useCallback)discardedReloadIdentity-10036(348)@object-ui/permissions(usePermissions) mockedexpandFls-7230(225)ui/apps/console'sregistry-inputs-spec-parity.test.tsledger names this path (outside the claim), so it stays a fileelementDataSource(243)Verification
At head
6a0388d8, afterpnpm install --frozen-lockfileand building the closure (turbo run buildfor@objectstack/spec,formula,lint,client,metadata-protocol, then--filter='@object-ui/plugin-gantt^...'fromui/), underos-verify-lock, VERDICT command-exit 0:pnpm exec vitest run packages/plugin-gantt/ --maxWorkers=2fromui/: 96 files passed, 1 skipped; 788 tests passed, 114 skipped. Four fewer files than atmain, the same 788 / 114 tests; the skipped file and tests are skipped onmaintoo.pnpm run type-checkinui/packages/plugin-gantt(tsc --noEmit && tsc -p tsconfig.test.json): exit 0, 0error TS.pnpm run lintinui/packages/plugin-gantt: exit 0, 0 errors.eslintfromui/on the 14 added or modified files: exit 0, 0 errors, 173 warnings. The harness's 63 warnings are the 43 the test(plugin-gantt): fold seven ObjectGantt fetch and row pins onto one shared harness #30725 harness had plus the 20 the four former files gave atf18fd963; the other 13 files changed comment or description text only.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, change set 18 paths against merge base447226b2): 26 derived, 26 run underos-verify-lock(VERDICT command-exit 0), each exit 0 captured before any pipe;pnpm --dir ui exec vitest run scripts/gave 170 files passed and 2 skipped, 4970 tests passed.--ranreconciliation: 26 derived, 26 run, 0 NOT-MEASURED, 0 UNRUN.git diff --shortstat origin/main HEADis 18 files, +734 / -788, 1,522 changed lines. No open pull request touches any of the 18 files (file lists of all open PRs read after test(plugin-gantt): fold seven ObjectGantt fetch and row pins onto one shared harness #30725 merged).Human Minimum
packages/specholds no runtime logic. (packages/specnot touched.)pnpm lintpasses. (ui/is linted by its own config; the package lints are above.)main, one pull request.skip-changeset.)packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgXNVxCQk1CCy55gFjQ