Skip to content

perf(console): plugin-form and plugin-view helpers come from side-effect-free /core subpaths - #34176

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-1zve7w
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-1zve7w

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #33581

Clause-②: yes (widening) — two new published exports subpaths, @object-ui/plugin-form/core and @object-ui/plugin-view/core; nothing removed or renamed, the package roots export the same names as before
Metadata-protocol: none

维护者速读

  • 做了什么:控制台首屏不再下载表单包和视图包。两个包各新增一个不注册任何东西的 /core 子路径,壳层只从它取辅助函数;表单和视图组件在第一次画出时才加载。
  • 效果:首屏 eager 闭包 gzip 从 1,961,037 B 降到 1,909,225 B(−51,812 B,约 −2.6%);plugin-form(44 KB)、plugin-view(16 KB)两块离开首屏,换进来两个小块(6.4 KB + 1.8 KB)。
  • 用户可见的变化:一个会话里第一次打开记录表单、动作弹窗表单或流程表单步骤时,要等表单块下载完才显示;其余页面画出的内容不变。
  • 没做的:卡里第 2 项(plugin-detail 的 11 处直取)不在本 PR。原因是 plugin-detail 有带订阅的模块级缓存,单独打一个 /core 包会在发布包里造出第二个实例,种子写不到根入口那一份;要改发布包的构建形状,需要席位定。plugin-grid 因此仍在首屏。
  • 风险:公开面只加不减(两个新子路径)。九个测试套件原来顺着首屏图读到表单注册,需要改。另有两个 sideEffects 门禁测试对“无副作用的次入口”自相矛盾,做了窄口对齐,这超出了卡上写的文件范围。以上都逐个列在下面。
  • 需要你做的:无;按惯例走契约复审后落地。

What changes

Two side-effect-free subpaths. @object-ui/plugin-form and @object-ui/plugin-view register their renderers when their root entry is evaluated, and each root reaches every surface of its package. One pure helper imported from a root kept the whole package in the console's first load. Each package now publishes /core (ESM only, built by a second vite build --config vite.core.config.ts pass, the @object-ui/plugin-chatbot/core precedent), and it registers nothing:

  • plugin-form/core (src/core.ts): filterSystemFields, isAutoGeneratedFieldType, isWideFieldType, inferColumns, containerGridColsFor, resolveInlineMode, omitServerResolvedDefaults, optionListDefault, resolveSectionGroupReferences, useInitialFieldFocus, plus their parameter types.
  • plugin-view/core (src/core.ts): deriveRecordSurface, deriveRecordFlowSurface, overlayWidthFor, toFilterGroup, deriveFieldOptions, isImageLikeField, isGeoLikeField, pickPreferredField, the three *_PREFERRED lists, plus their types.

The roots still export every one of these names, unchanged. Both sideEffects arrays name the new entry form (./src/core.ts, ./dist/core.js), as check:side-effects-array requires of every entry; its derived walk finds no registering module behind either.

The shell takes its helpers from /core. Eleven importers moved: MetadataProvider, ActionParamDialog, ObjectFormDesigner, editFormLockedByState, SchemaForm, the console's FormPage, AppContent, objectViewRecordNavigation, userFilterUrlState, recordDrawerStack, CreateViewDialog.

Forms drawn outside a route load on first draw. views/lazyFormSurfaces.tsx wraps ModalForm and ObjectForm in lazy() + Suspense. AppContent (the global record form), useActionModal (the action form) and ScreenView (a flow's object-form screen) draw through it.

The console registers the two packages' tags as lazy stubs. register-plugins.ts drops its eager import '@object-ui/plugin-form' / '@object-ui/plugin-view' and registers object-form, embeddable-form, object-master-detail-form, view:form, record:line_items, object-view, view:simple, view-switcher, filter-ui, sort-ui with registerLazy, each with the namespace, skipFallback and category its real registration declares. check:sdui-registration-pins confirms every promised registration is still in the built console.

Bundling. apps/console/vite.config.ts adds plugin-form-core and plugin-view-core groups at priority 71 with includeDependenciesRecursively: false, so the core modules do not land in (and drag in) the priority-70 package chunks. ui/vitest.config.mts aliases both /core subpaths to source, ahead of the bare package aliases.

Why

Card #33581 item 1. Measured with #33677's method: a production build of the console, dist/eager-closure.json, gzip of the closure and of the five watched chunks (node zlib.gzipSync, the report's own level).

main 86350e12 this head
eager closure (100 chunks) 1,961,037 B 1,909,225 B (−51,812)
plugin-grid 160,176 eager 160,190 eager
plugin-form 44,205 eager 39,961 lazy
plugin-view 16,051 eager 19,776 lazy
plugins-views lazy 40,255 lazy
RecordDetailView lazy 23,139 lazy
plugin-form-core (new) — 6,438 eager
plugin-view-core (new) — 1,793 eager

check:eager-closure passes on this head.

Tests

  • New pin app-shell/src/__tests__/pluginCoreSubpaths-33581.test.ts (3 tests). It reads the export names from the /core subpaths themselves, scans every non-test source under app-shell/src and apps/console/src (floors: >500 files, ≥10 /core importers), and fails when (a) any of them imports a /core name from a package entry, or (b) any of ten always-eager modules imports either entry by value, a bare import included.
  • Ablation (scripts/ablation-replace.mjs, restore proved by blob == HEAD and an empty git diff HEAD):
    • MetadataProvider.tsx: resolveInlineMode from '@object-ui/plugin-form' → (a) and (b) both red, naming the file and the name.
    • register-plugins.ts: import '@object-ui/plugin-detail' → import '@object-ui/plugin-view' → (b) red: bare import from '@object-ui/plugin-view'.
  • Forced test edits (each read a form or view registration through the old eager graph):
    • apps/console/src/__tests__/masterDetailFormTypeManifest.test.ts, masterDetailFormI18nLabelManifest.test.ts, objectFormI18nLabelManifest.test.ts, registry-inputs-spec-parity.test.ts: import '@object-ui/plugin-form' beside ../register-plugins, because a lazy stub carries no inputs and these read the manifest from inputs (the plugin-list precedent from PR 1).
    • apps/console/src/__tests__/record-block-record-reach.test.tsx: the same import; it renders record:line_items synchronously.
    • apps/console/src/__tests__/public-contract.test.ts: the same import; the reverse direction reads record:line_items's inputs. EXPECTED_LAZY is unchanged.
    • app-shell/src/views/RecordDetailView.childWriteRefreshesParent-12244.test.tsx: import '@object-ui/plugin-grid'. The related list renders through the registered object-grid; this page reached it only through plugin-view's entry (ObjectView imports plugin-grid). The console registers it in register-plugins.ts.
    • app-shell/src/views/__tests__/FlowRunner.suspense.test.tsx: the mocked ObjectForm was itself a lazy(); ScreenView now takes ObjectForm as the resolved value of its own lazy(), and React refuses a lazy that resolves to a lazy. The mock is now a component that renders an inner lazy body (still suspending on formLoaded), and the mocked package is loaded once before FlowRunner so its cold load does not eat waitFor's budget.
    • app-shell/src/views/metadata-admin/previews/ScreenPreview.test.tsx: the two object-form tests await screen.findByTestId('object-form') instead of a synchronous getByTestId.
    • ui/scripts/__tests__/side-effects-declaration-consistency.test.ts: its phantom direction ("every declared source entry has a load-time side effect") contradicted check-side-effects-array.mjs and its own coverage direction, which both require every entry form in the array. A side-effect-free secondary entry (src/core.ts) could satisfy one only by failing the other. The phantom direction now skips secondary entry forms (exports subpaths other than the barrel) and still judges every barrel; a new anti-vacuity line pins that the exemption reaches the two src/core.ts and no src/index.*. Red before the edit (first gate run), green after.
    • ui/scripts/__tests__/check-side-effects-array.test.ts: the population pin "every package walks from exactly one root" now names the multi-entry population exactly: plugin-form and plugin-view, each ['src/core.ts', 'src/index.tsx']. The gate walks both roots and finds the same single registrar as before.

Acceptance notes

  • Item 2 (plugin-detail's eleven reach-ins) is not in this PR, so it reads Part of. queueClaim.ts, recordFieldAccess.tsx and useRecordEditable.ts keep module-level caches with subscribeDataChanges subscriptions and sit in plugin-detail's sideEffects array. The shell seeds those caches (seedQueueClaimDecision, seedRecordFieldAccess, seedRecordVerdict). A /core built as a separate dist/core.js bundle, as here and in plugin-chatbot, would carry a second copy of each cache in the published package, so a seed written through core would never reach the hooks the root entry reads. Routing them needs a different published build shape (ES multi-entry with shared chunks, plus sideEffects globs), which is a package-shape choice for the seat. Item 2 would also need lazy stubs for plugin-grid's and plugin-detail's tags and a lazy DevRowActions (imported statically by App.tsx); only then does plugin-grid (160 KB) leave the first load. The detail-core closure measured at about 20 modules and contains no plugin-grid module.
  • ModalForm is not in plugin-form/core. The card listed it with the helpers, but its closure is most of the form package, so /core would stop being small. The shell loads it from the entry through lazy() instead (lazyFormSurfaces.tsx).
  • Changeset is patch, not minor. Metadata-protocol: none maps to patch under AGENTS.md's Post-Task Checklist step 3, and check-changeset-no-major refuses minor with none.
  • plugin-form's /core duplicates three warning-dedupe sets (reported, warnedHeadinglessCollapse, reportedCurrencyColumnScales) in the published package. The worst case is a dev warning printed once more. No state the UI reads is duplicated. In the console, Vite resolves both to one source module, so nothing is duplicated there.
  • The FlowRunner suspension pin is now also covered by ScreenView's own boundary. LazyObjectForm carries its own Suspense, so a form screen body's suspension stops inside the dialog even without FlowRunner's. The pin still proves the route-level fallback never shows.
  • File surface breach: ui/scripts/__tests__/** (two forced edits above). The card's surface did not name the sideEffects gates' tests, and the two checks could not both pass on any /core subpath of an array package. The alternative was sideEffects: true for both packages (the plugin-chatbot shape), which gives up tree-shaking for every consumer of the two packages; I chose the narrow reconciliation. The seat can ask for the other.
  • Surface outside the card's literal list, inside its "importers" clause: apps/console/vite.config.ts (chunk groups), ui/vitest.config.mts (aliases). Untouched per the claim's serial limits: plugin-view ObjectView.tsx, plugin-grid ObjectGrid and src/index.tsx.

Verification

  • Type-check: plugin-form, plugin-view, app-shell, console (type-check, including tsconfig.test.json) all exit 0.
  • Affected suites: 462 files on the first pass; the 9 that went red are the forced edits above, and they pass after the edits.
  • pnpm --dir ui check:eager-closure, check:side-effects-array, check:sdui-registration-pins, check:new-line-citations exit 0. eslint on the changed files: 0 errors.
  • dispatch-gates.mjs --commands (59 commands) run and reconciled with --ran: 59 derived famil(ies) accounted for — 58 run, 1 NOT-MEASURED. The NOT-MEASURED one is check:dual-build-cjs-loads (exit 3, prerequisite: unbuilt server packages; left to CI).
  • First-run reds, fixed and rerun on this head: pnpm --dir ui exec vitest run scripts/ (the two sideEffects tests above; rerun 171 files passed), check:dts-closure (the console's plugin.d.ts was absent because the measurement build ran vite build only; after build:plugin, 228/228 present).

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop

…ect-free /core subpaths

The console shell imports the pure helpers from @object-ui/plugin-form/core
and @object-ui/plugin-view/core, draws ModalForm and the flow screen's
ObjectForm behind lazy(), and registers the two packages' tags as lazy
stubs, so neither entry is part of the first load.

Claude-Session: https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop
Co-authored-by: Claude <noreply@anthropic.com>
…e read them through the old eager graph

The console registers the form tags as lazy stubs now, and the shell draws
its forms through lazy(); suites that read a form block's inputs or rendered
a form synchronously load the package themselves or wait for it.

Claude-Session: https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop
Co-authored-by: Claude <noreply@anthropic.com>
…rm and view in the console

Claude-Session: https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop
Co-authored-by: Claude <noreply@anthropic.com>
… array

An entry form is always named, so a bundler keeps the subpath's module; the
derived enumeration finds no registering module behind it.

Claude-Session: https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop
Co-authored-by: Claude <noreply@anthropic.com>
…t judged for a load-time effect

check-side-effects-array and this file's coverage direction both require every
entry form in the array; a side-effect-free exports subpath is named for that
reason, not as a claim that it registers. The barrel is still judged.

Claude-Session: https://claude.ai/code/session_01ADHkmT5bCDp1MDcReXVCop
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l dependencies Pull requests that update a dependency file 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 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

Contract review

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

Face: declaration. Clause-②: yes (widening) is on the changeset and the PR body; there is no published schema and no governed path (check-governed-merges --pr 34176: 0 of 36 paths). Inputs read: card #33581 and its PR 1 landed comment; the Claim 6902236911; os-dev-report 6903231447; the PR #34176 body; the net diff against main at the merge base (36 files); and the check-runs on this head (2026-11-15T23:55Z: 48 success, 11 skipped, 0 failed). This head is a merge-only sync of e29406d9; the PR's own files are unchanged across it.

① Derived judgments

  • The widening. Two new published exports subpaths, @object-ui/plugin-form/core and @object-ui/plugin-view/core, each { types, import }. They are ESM only, as the existing @object-ui/plugin-chatbot/core is. Each is built by its own vite.core.config.ts, chained in the package's build script. Nothing is removed or renamed. Every name the subpaths export is still exported from its package root, unchanged, so no consumer has to move. Right.
  • Side-effect-free closure. src/core.ts in each package re-exports only pure helpers and one hook (useInitialFieldFocus) from leaf modules. Neither reaches ./index, a component, or a registrar. The new pin pluginCoreSubpaths-33581.test.ts holds this and is red under both ablation legs. sideEffects names the two core entries as entry forms (both checks require every entry form in the array). The consistency test exempts exactly those secondary entries from its "declared but no effect" direction. A second assertion pins that exemption to the two /core files and never a barrel. That resolves a contradiction between the two checks without loosening either for a barrel. Right.
  • Consumers. Eleven app-shell and console importers move to the subpaths. ModalForm and ObjectForm load through lazy() (lazyFormSurfaces.tsx). register-plugins.ts drops the two eager imports and registers lazy stubs. The vitest aliases name each /core ahead of its root. Measured effect: the eager closure goes from 1,961,037 to 1,909,225 B gz (−51,812 B), and the plugin-form and plugin-view chunks leave the first load.
  • Metadata-protocol: none. Nothing a metadata author can write changes. Right.

② Semver level

patch on @object-ui/plugin-form, @object-ui/plugin-view, @object-ui/app-shell and @object-ui/console. Under AGENTS.md's changeset rule the level follows the protocol kind alone, and a non-protocol widening ships patch. Check Changeset concluded success on this head. Correct. The order file's "minor" was the seat's error; the dev's patch is the rule.

③ Boundary flags

  • File-surface breach: ui/scripts/__tests__/check-side-effects-array.test.ts and side-effects-declaration-consistency.test.ts. It is declared, needed (the new secondary entries are the first genuine multi-entry population), and pinned as above. It is accepted.
  • dual-build-cjs-loads: NOT MEASURED locally (exit 3, server packages unbuilt); judged by CI, green on this head.
  • Open question: card item 2 (the eleven plugin-detail reach-ins) needs a build-shape decision for plugin-detail. A separate core bundle would give its caches a second instance. The dev recommends ES multi-entry with shared chunks. This is not decided in this PR. It stays on the card (Part of #33581), parked while p3 dispatch is paused.
  • security_findings: none.

Implemented-by: claude/project-thread-1zve7w
Reviewed-by: session_01ADHkmT2NE3iyG1o6TDg3sf

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

席位核对

Verdict: ACCEPT · head dcac1b30 · 2026-11-15T23:56Z

  1. Shape. Draft → main. The first content line is Part of #33581 (PR 2; item 1 is done, item 2 stays on the card). 36 files, +550/−34, on the claimed surface plus the declared ui/scripts/__tests__ breach. One changeset: @object-ui/plugin-form, @object-ui/plugin-view, @object-ui/app-shell and @object-ui/console, all patch.
  2. Contract. Clause-②: yes (widening): the /core subpaths. A same-head TIER_DEFAULT record is PASS: comment 6903515462. Metadata-protocol: none.
  3. Measure. The eager closure goes from 1,961,037 to 1,909,225 B gz (−51,812 B), and the plugin-form and plugin-view chunks leave the first load.
  4. Gates on dcac1b30 (a merge-only sync of e29406d9, owed at K = 32). 59 check runs: 48 success, 11 skipped, none failed. Lint & Repo Gates, TypeScript Type Check, Type Check UI, Test UI, Build & E2E UI, Check Changeset and Check PR Size are all success. The dev ran 58/59 derived gates and all exited 0; the remaining one, dual-build-cjs-loads, was left to CI.
  5. K. K = 7; < 15, no further sync owed.
  6. Governed. check-governed-merges --pr 34176: NOT governed.
  7. Deviations. All three are accepted, as the record lists: the sideEffects test exemption (pinned to the two /core files, never a barrel); patch rather than the order's minor (AGENTS.md's rule); and ModalForm loading lazily from the entry rather than from /core.
  8. Landing. This stroke: pr_ready + automerge_enable, under the maintainer's landing approval in the seat thread (2026-11-15T16:10Z, 「批准席位 本班复核通过的 PR 执行 --land」). This card was started before the 22:50Z p3 pause and is landed under 「已开工的做完落地」. On MERGED the card stays open for item 2, which is parked until p3 reopens.

247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ackages (objectstack-ai#36336)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X1qGnTYLQs3EtmtCmjrcfCe)_
Fixes objectstack-ai#33581
Clause-②: yes (widening) — one new published `exports` subpath,
`@object-ui/plugin-detail/core`; nothing removed or renamed, the package
root exports the same names as before
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:控制台第一次打开任何页面时少下载约 165 KB(压缩后,约为首屏下载量的
8%);首页、仪表盘、列表页、记录页、记录浮层画面和操作都不变。
- 为什么做:控制台首屏提速——过去每个页面都要先下载表格和详情组件,再去读数据。
- 出错会怎样:若某处漏改,表格或详情块第一次出现时会多等一次加载,画面内容不变;本改动可以直接撤回。
- 要你做什么:无。

## What changes

On every route the console used to download the `plugin-grid` chunk (all
of `@object-ui/plugin-grid` plus 77 `@object-ui/plugin-detail` modules,
183 KB gzip) before its first data read. That chunk now leaves the eager
closure; the list and record routes fetch it with their own route
chunks, and any other surface fetches it the first time it draws a grid
or a detail block.

- **`@object-ui/plugin-detail/core`** (new subpath, ESM only, like the
other `/core` subpaths): the pure helpers the console shell needs on
every page, registering nothing. Names: `isRefusedFeedRead`,
`relatedListEntryNames`, `RELATED_ARRANGEMENT_RECORD_VERSION`,
`relatedArrangementFromRecord`, `relatedArrangementToRecord`,
`deriveFieldGroupDetailSections`, `deriveHighlightFields`,
`resolveDetailSections`, `isWideFieldType`, `prefetchRelatedCounts`,
`relatedCountTargetsIn`, `COMPACT_RELATED_ROWS`,
`normalizeRelatedListSort`, `seedQueueClaimDecision`,
`seedRecordFieldAccess`, `seedRecordVerdict`, type `RelatedArrangement`.
The root still exports all of them. `normalizeSortSpec` moved verbatim
from `RelatedList.tsx` to `relatedListSort.ts` so the subpath does not
reach the component.
- **Published ESM build of plugin-detail**: a second pass
(`vite.es.config.ts`) emits `index` and `core` in one pass with
`preserveModules`, so the record-page caches the `/core` seeds write are
the same module instances the root's hooks read. File names match the
package's existing `sideEffects` spellings (`./dist/queueClaim.js` and
friends). The UMD build is unchanged.
- **Console shell** (`@object-ui/app-shell`): eight modules take the
helpers from `/core`. The record pointer card's key fields and the
approval decision's child tables draw `HeaderHighlight` / `RelatedList`
through `lazy()` wrappers (`lazyDetailSurfaces.tsx`); the pointer card
starts the chunk load beside its record read (no timeout raised). A
wrapper mounted after the chunk loaded draws without suspending.
- **Console** (`register-plugins.ts`): the bare `import
'@object-ui/plugin-grid'` / `import '@object-ui/plugin-detail'` become
`registerLazy` stubs for every tag the two packages register, with the
namespaces their registrations declare: `object-grid`, `view:grid`,
`detail-view`, `detail-section`, `view:detail`, and the eleven `record:`
blocks (`details`, `related_list`, `highlights`, `activity`, `chatter`,
`discussion`, `path`, `quick_actions`, `history`, `reference_rail`,
`alert`). `App.tsx` loads the dev-only row-actions page lazily.
`vite.config.ts` gets a `plugin-detail-core` chunk group so the
subpath's closure does not fall into the `plugin-grid` group.

The card's other two slices were already in place on main: `plugin-form`
and `plugin-view` were lazy behind their `/core` subpaths (objectstack-ai#34176), and
`RecordDetailView` / `ObjectView` sat behind the lazy route boundary
(objectstack-ai#33677). Step 1 below shows it.

### Step 1: main `29556850`, what held each package eager

Eager closure 2,042,500 B gzip, 105 of 2551 chunks. Largest eager
chunks: `vendor-objectstack` 673,811 · `ui-components` 351,125 ·
**`plugin-grid` 183,395** · `index` 135,521 · `framework` 88,559 ·
`vendor-react` 81,619 · `i18n-locale-en` 66,610 · `vendor-radix` 59,724
· `src` 43,005 · `infrastructure` 37,749.

| Package | Eager on main? | Edges holding it |
|---|---|---|
| plugin-grid (chunk = 74 grid + 77 detail modules) | yes, 183,395 B |
`register-plugins.ts` bare imports of grid and detail; `App.tsx` to
`dev/DevRowActions.tsx` (ObjectGrid); app-shell named imports from the
plugin-detail root in `sharedUserFeeds`, `deriveRelatedLists`,
`workspacePreference`, `recordDetailSections`, `recordDrawerStack`,
`recordPagePayload`, `SubmittedRecord` (RelatedList),
`RecordPreviewCard` (HeaderHighlight) |
| plugin-form | no (only `plugin-form-core`, 6,652 B) | none; lazy since
objectstack-ai#34176 |
| plugin-view | no (only `plugin-view-core`, 1,789 B) | none; lazy since
objectstack-ai#34176 |
| RecordDetailView | no | none; behind the lazy route boundary since
objectstack-ai#33677 |

### Before / after

| Build | Eager gzip bytes | Eager chunks | grid / form / detail /
RecordDetailView eager |
|---|---|---|---|
| main `337f435c` | 2,043,450 | 105 | `plugin-grid` 183,666 |
| this branch `feb24f53` (same base) | 1,874,495 (**−168,955**) | 105 |
none; `plugin-detail-core` 15,702 joins |
| this branch head `58e12ffd` (main `99fbaa6d` merged) | 1,875,181 | 105
| none (`plugin-detail-core` 15,702, `plugin-form-core` 6,654,
`plugin-view-core` 1,789) |

The head row includes main's own drift between the two merges (for
example `ui-components` +662 B). `check:eager-closure` on head: exit 0,
1831.2 KB, headroom 600.4 KB.

Lazy chunks, gzip (python gzip -6, main `337f435c` vs head `feb24f53`):
`plugin-grid` 183,368 / 188,399 · `plugins-views` 62,376 / 55,420 ·
`plugin-form` 47,198 / 47,212 · `plugin-view` 19,846 / 19,846 ·
`RecordDetailView` 29,554 / 30,003. The grid chunk grows by the detail
renderers that left `plugins-views`.

## Tests

Local, scoped (CI runs the full suites):
- Before the last main merge, head `feb24f53`: 406 test files (app-shell
tests of every touched module, all console `__tests__`, plugin-detail,
the `ui/scripts` side-effects and declared-lazy-views tests): 405
passed, 1 failed (`RecordPreviewCard.test.tsx`, the highlight strip
under the new lazy wrapper). Fixed in `feb24f53`; that file plus the
pins rerun: 13 files / 149 tests passed.
- `type-check` for `@object-ui/plugin-detail`, `@object-ui/app-shell`,
`@object-ui/console`: exit 0 (on `feb24f53` and again on `58e12ffd`).
eslint on the changed files: exit 0. `vitest` over `scripts/`: 5127
tests passed.
- Head `58e12ffd` (after merging main `99fbaa6d`): full turbo build exit
0, eager-closure budget exit 0, type-checks exit 0. The scoped test
rerun on this head (493 files) was still running when this body was
written (handover cut-off): **NOT MEASURED on `58e12ffd`**, CI is the
reading.

Pins:
`ui/packages/app-shell/src/__tests__/pluginCoreSubpaths-33581.test.ts`
now also holds `plugin-detail/core` (names, no registrations) and the
eager modules (App, register-plugins, the eight shell modules,
`lazyDetailSurfaces`) to subpath-or-type-only imports of plugin-detail
and plugin-grid.

Ablations (one-shot, on committed head `feb24f53`, each restored with
`git checkout HEAD --`, blob hash compared, `git diff HEAD` empty):
1. `recordPagePayload.ts` back to the plugin-detail root import: all
three pin tests red (offender listed, importer floor 8 of 9).
2. bare `import "@object-ui/plugin-grid"` added to
`register-plugins.ts`: the bare-import pin red ("bare import from
'@object-ui/plugin-grid'"). The first attempt at this ablation was a
no-op (the replacement contained the anchor; the replace tool refused
it); redone with a different quote spelling.

## Acceptance notes

- Real browser (Chromium, showcase app, signed in as admin; the same
server served the `337f435c` console build and then this branch's), five
routes: home, a dashboard, an object list, a record page, a record
overlay. All five drew on both builds with the same text, no page errors
beyond a 404 the home page shows on both, no failed requests.
- main fetched `plugin-grid` 40–75 ms after navigation on every route,
before the first data read (667–1144 ms).
- this branch: home and dashboard never fetch `plugin-grid`; the list
fetches it at 1032 ms beside `ObjectView` (1050); the record page at 882
ms beside `RecordDetailView` (900); the overlay at 1027 ms.
- JS requests per route (main / head): home 105 / 105, dashboard 143 /
140, list 227 / 201, record 171 / 156, overlay 229 / 203.
- No carve-out naming `plugin-grid` is added to the eager-closure budget
check, and none is owed. New gates are "no" by default unless the
maintainer names one, and this class is already held by two things: the
source pin `pluginCoreSubpaths-33581` (ablation 2 turns it red) and the
total `check:eager-closure` budget.
- `plugin-detail-core` (15,702 B gzip at this head) also holds
`ConcurrentUpdateDialog`, because `isConcurrentUpdateError` is in the
same module. That share of the chunk is not measured on its own.

## Verification

Read first:
1. `ui/apps/console/src/register-plugins.ts` — a tag the two packages
register but the stubs miss would draw an unresolved component on first
use.
2. `ui/packages/plugin-detail/vite.es.config.ts` + `package.json` — the
published ESM layout changes to one file per module; the seed caches
depend on it.
3. `ui/packages/app-shell/src/views/lazyDetailSurfaces.tsx` — first-draw
loading of the two shell detail components.

Two-minute check: `pnpm --filter @object-ui/console build`, then `node
-e 'const
j=require("./ui/apps/console/dist/eager-closure.json");console.log(j.eagerGzipBytes,
j.files.filter(f=>/^(plugin-|RecordDetailView|plugins-)/.test(f.name)).map(f=>f.name))'`
from the repo root. Expected: about 1,875,000, and only
`plugin-chatbot-core`, `plugin-detail-core`, `plugin-form-core`,
`plugin-view-core`, with no `plugin-grid`.

Gates: `node scripts/pm/dispatch-gates.mjs --commands` derived 60
families on `f3214b28`; all 60 ran locally and `--ran` reconciled 60 of
60, 0 NOT MEASURED, exit 0. First runs of four families read wrong and
were rerun after a full build: dts-closure exit 1 (console `.d.ts` not
built yet), dual-build-cjs-loads exit 3 (prerequisite unbuilt),
query-options-erasure 124 (my own 300 s timeout), type-check-debt (I
stopped its lock-held rebuild); all four reran to exit 0. UI extras:
`check:side-effects-array` 0, `check:sdui-registration-pins` 0,
`check:eager-closure` 0, `vite-declared-lazy-views` passed inside the
builds (13 of 13 lazy). The gate set was not rerun on `58e12ffd` (a
clean main merge); the PR check-runs are the reading there.

Written by `repo:objectstack#4 · os-project-manager ·
session_01FEkQ5kt9AD1TPLy7Y9oa9D`
(https://claude.ai/code/session_01FEkQ5kt9AD1TPLy7Y9oa9D).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5kt9AD1TPLy7Y9oa9D -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/l 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.

2 participants