Repository navigation
perf(console): a list page draws its rows once before they paint, and the shell re-renders less during first load - #37883
Conversation
… the shell re-renders less during first load The grid's loading face now draws inside the root element the loaded table uses, so the list page scope is known when the rows first render; the inline-action fold watches its host from a ref instead of state; record verdicts are republished only when they differ. Between a list's rows' first render and their first paint there is no longer any sync re-render. The app's locale list moves to its own context (useAppContentLanguages), so its late arrival no longer re-renders every translation reader. The expanded sidebar mounts no tooltip per entry, and an entry compares a new capability checker by its answers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5
…n line says Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5
…ere the grid draws it The expanded sidebar's tooltip cut swapped each row's wrapper when the sidebar folded or docked, so the row's button remounted and keyboard focus was lost on that toggle; it is taken back out. Two list tests read the record-count bar, which a grid does not draw: they caught it in the frames before the grid's resident footer said so, frames the grid no longer spends. They now read the count in the grid's footer. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5
useObjectTranslation() and useI18nContext() no longer return appContentLanguages; the changeset now says so with a BREAKING section and an ADR-0087 disposition. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #37575 (body and all six comments, the os-dev-report 7216111755 among them), PR #37883 (body, the 20-file list, the net diff against ① Derived judgments
② Semver levelClause-②: yes (narrowing) — matches the diff. ③ Boundary flags
④ Design judgmentThe narrowing is of the right kind. The capability the spec side declares is "a reader can learn which table languages the app's content covers, or that this is not known". That capability is delivered whole at the same package entry, with the same value and the same Attempts to break it, each read in the head's tree:
S1 (should-fix) — the BREAKING note and the changeset's package list name one of the two published entries the narrowing reaches. N1 (nit) — the ADR-0087 marker holds Implemented-by: VERDICT: PASS |
…ooks @object-ui/react re-exports useObjectTranslation and useI18nContext, so their narrowing reaches that entry too; its readers now find the replacement hook there, and the changeset names the package. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta review of record 7216271239 (PASS on ① Derived judgments
② Semver levelClause-②: yes (narrowing) — matches the diff; the added export rides under the narrowing arm, which is the stronger of the two. ③ Boundary flags
④ Design judgmentS1: closed. A consumer on either entry now finds the replacement at the entry it already imports from, and the package that carries the narrowing to it is in the changeset, so its CHANGELOG carries the BREAKING section. The section says where the field is removed (both entries), what replaces it (one hook, exported by both) and why. The PR body's narrowing paragraph says the same. Tried against the delta: the re-export is a plain named re-export from No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 9d15f48 · card #37575 · area s2-ux · 2026-11-27T11:27ZL1 checklist
Tier: S. Landing: ready and auto-merge in this stroke. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — tier correction · head 9d15f48 · card #37575 · 2026-11-27T11:56ZThe ACCEPT 7217103613 named Tier S. That was wrong: a Every other line of 7217103613 stands: the narrowing-face record 7216271239 and its delta 7217069137 (PASS, Tier: H. Landing: hand-off to the maintainer follows this record. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 9d15f48 · card #37575 · area s2-ux · 2026-11-27T11:57ZL1 checklist
Tier: H. Landing: hand-off to the maintainer follows this record. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-27T11:58Z · head 9d15f48 · approver 维护者速读
|
…per-type revisions and three hooks (objectstack-ai#38354) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoH7fdpfGHPn8211FpQ1L6sb)_ Part of objectstack-ai#37903 This is PR 1 of 3 on the card (claim 7235141537, route A): the base readers subscribe through. It migrates no reader family; PR 2 (the shell) and PR 3 (the list and record pages, with the objectstack-ai#37444 readings) do, each after its own claim amendment. `useMetadata()` keeps its behaviour in every PR of this card. Clause-②: yes (widening) Metadata-protocol: none **Widening (public API of `@object-ui/react`):** new exports `MetadataStore` (type), `MetadataStoreCtx`, `useMetadataSelector`, `useMetadataTypeItems`, `useMetadataTypeStatus`. Nothing is removed or renamed, and no existing hook returns anything different. The changeset ships `patch` for both packages because `Metadata-protocol` is `none` (AGENTS.md Post-Task Checklist 3: "a non-protocol change, widening or breaking, ships `patch`"). ## 维护者速读 - 控制台里读元数据的组件,以后可以只在自己读的那一类元数据变化时才重新渲染,不再每次有任何元数据到达就全部重绘。这一片只铺底座,用户看到的页面和速度暂时不变。 - 属于「控制台首屏 2.5 秒内打开」专题(objectstack-ai#38082)。后面两片把外壳、列表页和记录页的读者改过来,那时首屏才会变快。 - 出错的话,最可能是某个读 `useMetadataItem` / `useBundledItem` 的组件没有随数据到达而刷新;整个提交可以直接撤回。 - 无 ## What changes `MetadataProvider` (`ui/packages/app-shell/src/providers/MetadataProvider.tsx`) rebuilt its context value on every bump of one store-wide `version` counter, so every `useMetadata()` reader re-rendered on every bump. Re-measured on this branch's base (main a7e60c7): loading the `object` list re-renders four memoised readers once each, though they read `apps`, `dashboards`, `pages`, or only hold `getItem`. 1. **The store.** The provider creates one `MetadataStore` per instance and publishes it on `MetadataStoreCtx`. Its state lives outside React's memo caches (ui/AGENTS.md objectstack-ai#10). Every `bump` now names what changed: a type's list landing, failing or being invalidated names that type; an object-scope answer names `#scope`; the app bundle names `#bundle`; a preview or organization switch, a new adapter, or a bump that names nothing (the safe default) changes the whole store. The aggregate `loading` / `error` flags are recorded as `#status`. After each provider commit a layout effect counts a revision per changed key and wakes the readers subscribed to it, so a reader always selects from the value that commit rendered. The old `version` still bumps, and `MetadataCtx` still gets a new value per bump. 2. **The hooks** (`@object-ui/react`, `AppShellContext.tsx`). `useMetadataSelector(select, isEqual?)` runs on `useSyncExternalStore`, is woken by every store commit and re-renders only when its selection changes. `useMetadataTypeItems(type)` and `useMetadataTypeStatus(type)` subscribe only to their type (`object` status also to `view`, which it waits on). Without a store (no provider, or a hand-written `MetadataCtx` value as most tests use), they read that value with React 19's `use()` and re-render with it, so a reader under a store never subscribes to `MetadataCtx`. 3. **Three hooks read through it.** `useMetadataItem` reads `getItem` by selector; `useMetadataType` reads its type's items and the two flags by selector; `useBundledItem` reads a stable copy of the bundle reads (`BundledReadsStoreCtx`) and is woken by `#bundle` and whole-store changes. `useBundledReads()` and `bundledFirst` are unchanged. ## Why The card's lever (objectstack-ai#37903, from PR objectstack-ai#37883's profile): six store bumps before a list page's first paint each re-render every metadata reader. A reader can only stop doing that once it has something narrower to subscribe to; this PR is that something. ## Tests - `app-shell/src/providers/__tests__/MetadataProvider.selectorStore-37903.test.tsx` (10 pins, a real provider over a served adapter): a per-type reader is not re-rendered by another type landing and is by its own list changing; a status reader likewise; a `useMetadataSelector` reader re-renders on its selection only; a reader of `getItem` renders once across three type loads; an `isEqual` keeps a new-array selection still; `useMetadataType`, `useMetadataItem` and `useBundledItem` are not re-rendered by unrelated types and are by their own answer (the bundle landing for `useBundledItem`); revisions count per type; LIVE CONTROL: a `useMetadata()` reader still re-renders on every change. - `app-shell/src/providers/__tests__/metadataRenderCount.harness.tsx`: the render-count harness PR 2 and PR 3 pin their reader families with (memoised counted readers, a served adapter, an app-bundle double). - `react/src/context/__tests__/useMetadataSelector-37903.test.tsx` (5 pins, a hand-written store): each hook subscribes with the types it reads; selection and per-type wake-ups; a hand-rolled `MetadataCtx` value without a store is read and followed; the no-provider fallback. **Ablation**, on this head's source, each run against the 10 provider pins: - A: the hooks also read `MetadataCtx` / `BundledReadsCtx` with `useContext` (subscribing to the per-bump value, as `main`'s readers do): 8 of 10 fail (every "not re-rendered" pin; the revision pin and LIVE CONTROL stay green). - B: `bump` records no type names (the store never learns what changed): 6 of 10 fail (every "re-renders with its own type" pin and the revision pin). ## Verification Read first, by risk: 1. `MetadataProvider.tsx`, `createProviderStore` and the layout effect after the context value: the flush must run after the commit that rendered the change, and be keyed on state, not on the memoised value. 2. The `bump(...)` call sites: each names exactly what it changed, or nothing. A site that names too little leaves a per-type reader stale; the default with no names is the whole store. 3. `AppShellContext.tsx`, `useStoreSelection`: the conditional `use(MetadataCtx)` only when no store is published. Two-minute check: `pnpm --dir ui exec vitest run packages/app-shell/src/providers/__tests__/MetadataProvider.selectorStore-37903.test.tsx packages/react/src/context/__tests__/useMetadataSelector-37903.test.tsx`. All 15 should pass. ## Acceptance notes - The claim placed the hooks in a new `ui/packages/react/src/hooks/useMetadataSelector.ts` and an export line in `ui/packages/react/src/index.ts`. They live in `AppShellContext.tsx` beside `MetadataCtx` instead: `useMetadataItem` (in that file) reads through `useMetadataSelector`, and the hook's no-store fallback reads `MetadataCtx` and its frozen fallback, so a separate file would import that file and be imported by it. `context/index.ts` already re-exports the whole file, so `index.ts` needed no line. The file surface shrank; nothing outside it was touched. - The claim named `@object-ui/react` minor; AGENTS.md Post-Task Checklist 3 sets the level by `Metadata-protocol` alone, so both packages ship `patch`. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibyRPrFte1TGnaiugba <!-- signed: repo:objectstack#3 · os-tesla · session_01L9qibyRPrFte1TGnaiugba --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…g, 56 changesets added) and state what npm publishes (objectstack-ai#38645) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9St4eUWHFcCKuRUrCZPperJ)_ Fixes objectstack-ai#38189 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:v19 发布页的 breaking 清单补上 11 月 26 日之后合进来的 56 条改动(其中 30 条还在 main 上、下一次预发布才带上,页上逐条标明),计数和页头的发布状态也改成现在 npm 上的真实情况。 - 为什么做:升级到 19 的人把这页当完整清单用;原清单只数到 19.0.0-next.0 的输入,之后 next.1、next.2 和 main 上的 breaking 改动大多没列。 - 出错会怎样:只改一个文档页,不影响任何代码或发布;某条写错了,读者会被误导,但直接撤回这个改动即可恢复原页。 - 要你做的:无。 ## What changes `content/docs/releases/v19/index.mdx` only. - **Header.** The publication sentence now states what npm answers: `latest` is 18.6.0, `next` is `19.0.0-next.2`; the line's versions on npm are `19.0.0-next.0` (2026-11-26) and `19.0.0-next.2` (2026-11-28). `19.0.0-next.1` was versioned on `main` (30a8047) and is not on npm, so its changes first ship in `next.2`. - **How this list was built.** Re-measured at `6eb23c87` (origin/main at start, 2026-11-29) with the method the page states: `classifyReleaseBullet` over every changeset on `main` — the 1,185 in `.changeset/pre/` (consumed by the next.0, next.1 and next.2 version passes) and the 219 still pending. 159 breaking from 155 PRs: 98 to act on, 61 registered. - **56 new lines' worth of changesets**, each sorted by the classifier into 需手动处理 (27) or 自动迁移 (29), placed under the page's existing topic headings, with three new ones: 需手动处理 → Knowledge; 自动迁移 → Knowledge sources, Sharing and permissions. The 30 still pending carry "— on `main`". - **自动迁移 intro** and **Coming from 18.x step 3**: the registered split restated in changesets (31 on the protocol-19 step, 30 on the protocol-18 step, of 61). - **Callout**: no longer says no prerelease was published. ## Tests The classifier run (script in the dev's scratchpad; it imports `classifyReleaseBullet` from `scripts/release-github-releases.mjs` and feeds each changeset body as a CHANGELOG bullet, `- ` on the first line and two-space indent on the rest), at `b03fd5f5`'s parent tree `6eb23c87` (the diff touches no changeset): <details><summary>Raw counts</summary> ``` ALL 1404 {"manual":98,"migrated":61,"other":830,"added":403,"semantic":12} OLD (in a46efa8 set) 950 {"migrated":31,"manual":71,"other":563,"added":278,"semantic":7} NEW (after a46efa8) 454 {"manual":27,"other":267,"added":125,"migrated":30,"semantic":5} NEW next.0 45 {"other":27,"added":13,"migrated":1,"semantic":2,"manual":2} NEW next.1 138 {"manual":9,"other":80,"migrated":12,"added":36,"semantic":1} NEW next.2 52 {"added":11,"other":38,"manual":3} NEW pending 219 {"added":65,"other":122,"migrated":17,"manual":13,"semantic":2} missing-from-tree of a46 set: none ``` The same function over the 950 files as they stood at `a46efa8c` (`git show a46efa8:.changeset/FILE`): `{"migrated":31,"manual":71,"other":563,"added":278,"semantic":7}`, and 0 of the 950 changed section between `a46efa8c` and `6eb23c87` — the page's first count reproduces exactly. </details> <details><summary>The 57 breaking changesets added after a46efa8 (pass · section · PR · file)</summary> ``` next.0 manual 37477 37004-retire-knowledge-ragflow.md next.0 manual 37491 36964-flow-option-label-filters.md next.0 migrated 37437 35827-data-table-staged-edit-retired.md (already on the page) next.1 manual 37605 31908-p4c-sealed-expiry.md next.1 manual 37640 37604-platform-record-followups.md next.1 manual 37668 37104-knowledge-settings-readers.md next.1 manual 37720 37682-i18n-retire-build-chat-keys.md next.1 manual 37720 37682-retire-build-chat-frontend.md next.1 manual 37818 37608-disabled-holder-publish-rollback-refused.md next.1 manual 37883 37575-first-render-grid-shell-passes.md next.1 manual 37900 36689-mcp-stdio-disabled-package-every-caller.md next.1 manual 37902 37678-knowledge-turso-settings-group.md next.1 migrated 37366 37086-define-metadata-form-rename.md next.1 migrated 37366 37086-form-metadata-type.md next.1 migrated 37371 36055-view-all-stops-voting-on-fields.md next.1 migrated 37513 35143-data-model-publish-checks.md next.1 migrated 37584 37499-disabled-holder-unbound-row-bare-write-refused.md next.1 migrated 37600 36595-related-list-key-under-arrangement.md next.1 migrated 37676 37304-knowledge-source-governed-type.md next.1 migrated 37783 37712-agent-model-provider-retired.md next.1 migrated 37807 35143-seeds-actions-checks.md next.1 migrated 37840 36377-flow-bare-ordering-record-date-arithmetic.md next.1 migrated 37870 37613-book-audience-one-gate.md next.1 migrated 37910 37717-lookup-depends-on-param-computed-field.md next.2 manual 37948 37851-disabled-holder-own-row-publish-rollback-refused.md next.2 manual 38028 managed-email-password-held-off.md next.2 manual 38042 36679-secret-rewrap-confirmation-exit.md pending manual 37896 runtime-object-less-action-no-record.md pending manual 37963 37467-knowledge-title-arm-retired.md pending manual 37982 37907-knowledge-turso-test-connection.md pending manual 38038 38019-knowledge-source-review-follow-ups.md pending manual 38085 37622-related-list-keys-agree-under-arrangement.md pending manual 38180 auth-switches-read-declaration.md pending manual 38209 35879-served-schema-platform-stamped-keys.md pending manual 38268 sec2-wf9p-f12.md pending manual 38269 37752-app-list-edit-with-ai-removed.md pending manual 38310 38041-knowledge-source-closure-system-object.md pending manual 38431 36987-auth-updateuser-returns-void.md pending manual 38452 38377-retire-split-algorithm-version.md pending manual 38580 36057-scenarios-delete-agent-confirmation-names.md pending migrated 37924 37856-ask-ai-action-type-retired.md pending migrated 37929 36495-action-locations-acted-on.md pending migrated 37971 37307-knowledge-source-references.md pending migrated 38001 automation-variable-keys-reserved-segments.md pending migrated 38013 37983-knowledge-source-save-needs-the-service.md pending migrated 38060 37961-knowledge-source-unmounted-adapter-refused-at-save.md pending migrated 38096 34562-record-structural-lint.md pending migrated 38107 35143-views-dashboards-checks.md pending migrated 38145 37214-chart-series-measure-format-refused.md pending migrated 38168 36544-form-view-modal-size-retired.md pending migrated 38216 33912-share-unknown-recipient-ledger.md pending migrated 38216 33912-share-unknown-recipient.md pending migrated 38273 33806-pending-confirmation-service-one-seam.md pending migrated 38299 35924-publish-reparses-object-draft.md pending migrated 38398 37753-build-progress-frame-retired.md pending migrated 38470 38369-knowledge-held-without-embedder-or-store.md pending migrated 38545 38150-adopt-orphans-door-retired.md ``` PR = the `(#N)` of the commit that added the changeset (`git log --diff-filter=A`). The pass is the version commit that moved the file into `.changeset/pre/`: next.0 33a31dc, next.1 30a8047, next.2 9d111a7 (`packages/spec/package.json` reads `19.0.0-next.0/1/2` at each). </details> <details><summary>Page cross-checks</summary> - Every one of the 155 PRs behind a breaking changeset is linked on the page (0 missing), and the page links no PR outside that set. - Each of the 30 pending changesets sits on a line carrying "— on `main`", and no published one does. - `!`-titled first-parent commits since 18.6.0 (958ee03) to `6eb23c87`: 135 (87 to `a46efa8c`, as the page said); all 135 are in the list. - Registered markers resolved to their entry files (`packages/spec/src/migrations/entries/*/N.*`, `packages/spec/src/conversions/entries/N/`, and metadata-core's forward conversion for `permission-view-all-fields-beside-record-bypass`): the 30 registered changesets added after `a46efa8c` name 39 ids, all on step 19; the 31 before it name 33 ids, 32 on step 18 and `protocol-18-range-refused` on step 19. </details> ## Acceptance notes - **Pending changesets are in the list.** The card's done-when covers every changeset between `a46efa8c` and the measurement sha; 30 of those are still in `.changeset/` and ship in the next cut, so their lines are marked "on `main`" and the intro says so. - **`19.0.0-next.1` is not on npm.** `npm view PKG versions` for `@objectstack/spec`, `core`, `cli`, `runtime` and `@object-ui/i18n` lists `19.0.0-next.0` and `19.0.0-next.2` only. The header states that fact and no more. - **The registered split is now counted in changesets, not entries.** The old page said 41 registered entries, 39 on protocol 18. Counting the ids in the registered markers gives 33 at `a46efa8c` (32 on step 18), so the 41/39 could not be reproduced from any stated method. The rewritten intro and step 3 count changesets (31 on step 19, 30 on step 18, of 61), which match the bullets one to one. - **Followed the classifier where a title has no `!`:** objectstack-ai#37605, objectstack-ai#37883, objectstack-ai#37963, objectstack-ai#38209 and objectstack-ai#38269 are breaking by their banner or their `(narrowing)` arm; objectstack-ai#38209's Clause-② reads "no (narrowing …)", which the classifier counts as breaking although the body says nothing a client sends is refused. Listed as classified; no changeset changed. - **objectstack-ai#37513** merged before the next.0 cut but its changeset was consumed by next.1 (its body says the next.0 CHANGELOG missed it). - **One line, several changesets**: objectstack-ai#37720, objectstack-ai#37366 and objectstack-ai#38216 each carry two changesets; objectstack-ai#37818 with objectstack-ai#37948, objectstack-ai#38038 with objectstack-ai#38310 and objectstack-ai#38013 with objectstack-ai#38060 share a line. The existing 102 lines were not rewritten. - **Counts on a release page**: each is anchored to a named measurement sha, the snapshot the card asks for; it is not a count kept in sync with the tree. - **objectstack-ai#37437** (closed card objectstack-ai#37922's bullet) is not added twice. - **Check Changeset** will be red: this docs-only PR publishes nothing from any package, the `skip-changeset` case, and the dispatch opens it without labels, so that label is the seat's to apply. ## Verification Read first, by risk: the method paragraph and header (`index.mdx` lines 6-47), the 自动迁移 intro, then the new 需手动处理 → Knowledge block. Two-minute check: `git show 6eb23c8:.changeset/pre/37851-disabled-holder-own-row-publish-rollback-refused.md | head -12` shows the `fix(metadata-protocol)!` summary and the BREAKING banner behind the objectstack-ai#37948 line; `npm view @objectstack/spec dist-tags` prints `{ latest: '18.6.0', next: '19.0.0-next.2' }`. <details><summary>Local gate readings at b03fd5f</summary> ``` dispatch-gates --commands at b03fd5f: 52 commands (1 path changed) first pass: 47 exit 0; 5 exit 3/1 = PREREQUISITE NOT MET (lint, spec, client-react unbuilt), re-run after building the closures under os-verify-lock (VERDICT command-exit 0 both): pnpm --filter '@objectstack/lint...' build ; pnpm --filter '@objectstack/client-react...' build final: 52 of 52 :: exit 0 ✓ dispatch-gates --ran: 52 derived famil(ies) accounted for — 52 run, 0 NOT-MEASURED (a DERIVED zero — all 52 recorded an exit code and none of them is 3). check-release-page-status: OK — 3 GA major(s) in scope (v16, v17, v18) ``` </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE --> Co-authored-by: Claude <noreply@anthropic.com>
Part of #37575
Part of #37444
This is slice 2 of the first-render card. It does not bring the list and record pages under 2.5 s, so the card stays open. The section "What is left" below says what still costs the time.
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill or doc page names
appContentLanguages(git grep ofskills/,content/anddocs/; only two changesets do)Narrowing (public API of
@object-ui/i18nand@object-ui/react):useObjectTranslation()anduseI18nContext()no longer returnappContentLanguages, which #36040 added to them and which has shipped.@object-ui/reactre-exports both hooks, so the narrowing reaches that entry too. Read the list with the newuseAppContentLanguages()instead; both entries export it. The changeset carries the BREAKING section and an ADR-0087 disposition. It shipspatchbecause the change is not to the metadata protocol.维护者速读
What changes
Between a list's rows' first render and their first paint the grid drew the whole table three more times, and the shell re-rendered large parts of the page for answers few components read. Each cut below removes one such pass; none changes what is drawn.
Grid (
@object-ui/plugin-grid)ObjectGrid's loading face now draws inside the same root element the loaded table uses (same type, place and ref). React keeps the element across the swap, sogridRoot, and the list page scope answer read off it, is known when the rows first render. Before, the rows drew once with row-end controls and the_actionscolumn, the root's ref then answered "list page", and the table drew again without them (plus a right-shadow flip).useInlineRowActionFoldwatches its host from a stable callback ref instead of holding the element in state, so mounting the host no longer re-rendersObjectGrid(an 838-component pass).useRecordCrudVerdictspublishes a verdict map only when it differs from the published one. It used to publish a new emptyMapon every read before anything was asked, which re-rendered the grid for nothing.Shell
@object-ui/i18n: the app's own locale list (appContentLanguages) moves to its own context, read with the newuseAppContentLanguages(). The list lands late in boot; in the main context it re-rendered everyuseObjectTranslationreader (about 1,900 components on a list page).useObjectTranslation()anduseI18nContext()no longer carry the field; its two readers (LocaleSwitcher, the profile page's language card) use the new hook.@object-ui/reactre-exports the new hook beside the two it re-exports already (contract review S1). This removal narrows the published API: it is declaredClause-②: yes (narrowing)above and in the changeset, with a BREAKING section that names the replacement hook and the reason (about 1,900 first-load components no longer re-render when the list lands).@object-ui/layout: the row memo from perf(console): the sidebar no longer redraws every entry each time the console re-renders during first load #37722 also compares the capability checker by what it answers for a leaf row (requiresObject,requiresService), as it already did for the three target resolvers.Tests
Each pin fails on
mainand passes here; I checked this by running each one against themainversion of the source:plugin-grid/src/__tests__/listGridFirstRender-37575.test.tsx: a list page grid never puts a row-end control in the DOM, not even for one commit (a MutationObserver reads added and removed nodes); attaching the fold's host renders nothing; re-reading verdicts with nothing answered keeps the same lookup.i18n/src/__tests__/provider-appContentLanguages-37575.test.tsx: a memoised translation reader is not re-rendered when the list lands; a reader of the list is.layout/src/__tests__/NavigationRenderer.rowMemo-37575.test.tsx: a new capability checker with the same answers redraws no leaf row, and one that hides a row removes it.Two list tests changed.
plugin-listListView.harness(objectui#6917 block) andapp-shellObjectView.titleViewSwitcher-27594read the record-count bar, which a grid does not draw: the grid draws the count in its resident footer row (data-table-summary-lead, objectstack#35702), and ListView hides the bar once the grid says so. The tests caught the bar in the frames before that, frames the grid no longer spends. They now read the grid's footer count. The expected numbers are unchanged, and both pass onmaintoo.Taken back out (head 6049056): a first version mounted each sidebar row's Radix tooltip only in the icon rail, which saved about 750 mounts. Folding or docking the sidebar then swapped the row's wrapper, so its button remounted and keyboard focus was lost (
UnifiedSidebar.railOverlay-27593,UnifiedSidebar.hiddenCollapse-35062caught it). The primitive undercomponents/src/uiis not edited here, so that cut needs its own design.Acceptance notes
Readings: Lighthouse 13.6.0 desktop, HTTP/2 TLS front, 10 runs per page, the #37444 method; base and PR built and measured in the same session, back to back
Production console build served by
objectstack start(NODE_ENV=production) behind the local h2 front, signed in, cold cache, 4-core container.main1028438 (median of 10)Sorted runs: main home 2130…2289, list 2583…2964, record 2494…2883; PR home 2143…2371, list 2516…2835, record 2417…2676.
The machine read about 90 ms slower than the readings at session start (main list 2662 then, 2755 now), which is why both columns come from the same hour.
React commit census, list page, on the build that still had the tooltip cut: components re-rendered before the rows mount went from about 10,300 to about 6,000. Without that cut the mounts stay as on
main. Between the rows' DOM insertion and the first paint after it there is no commit any more (Performance observer + commit hook timestamps).What is left: why the list and record pages are still over 2.5 s
vendor-react. The main thread is busy from about 600 ms to the paint.tidentity), object labels as the metadata store fills (MetadataProvider's globalversioncounter re-renders every metadata reader on each bump, 6 bumps on a list page), the app menu. Cutting those needs a selector-style metadata store, not a memo. That is an L-size change inapp-shell, the next lever for this card.DropdownMenu, whose Popper anchor re-renders its trigger once (a ~460 component pass). Mounting the menu on first pointer or focus would remove it.ManageViewsDialog's view-id array), the table's right shadow (measured in a layout effect), the object schema arriving, and the columns reseed.Verification
Read first, by risk:
ui/packages/plugin-grid/src/ObjectGrid.tsx, the loading branch: the root element must stay the same type, place and ref as the final return, or the fix silently stops working (the MutationObserver pin catches that).ui/packages/layout/src/NavigationRenderer.tsx,sameRowAnswers: the capability checker is compared by answers for leaf rows.ui/packages/i18n/src/provider.tsx: the new context anduseAppContentLanguages().Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/listGridFirstRender-37575.test.tsx packages/i18n/src/__tests__/provider-appContentLanguages-37575.test.tsx packages/layout/src/__tests__/NavigationRenderer.rowMemo-37575.test.tsx. All the tests should pass.Local runs: the
plugin-gridpackage (317 files, 2,794 tests),layout,i18n, the console'spages/systemtests and theLocaleSwitchertests all pass. Type checks pass fori18n,layout,plugin-grid,app-shelland the console.eslinton the changed files reports 0 errors. All 39dispatch-gates --commandspass. One of them,vitest run scripts/, was killed for memory in the batch run, and I re-ran it on its own with 2 workers: 172 files passed.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTd1y1ncyDVcgVtep5