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 维护者速读
|
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