Repository navigation
perf(app-shell): a packaged app's record route reads the objects pointing at the record through its package scope, not the registry - #29846
Merged
Conversation
…ting at the record through its package scope, not the registry A record route whose object has no declared record page, in a packaged app, now reads the app's package scope with the names the bundle gives it (the objects that point at the record's object), as the package-less route already does. A pointing object from another package is read by name and answered from the bundle. The harness's packaged CONTROL that pinned the registry read is flipped. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jStt5LFpRDtMbVaQyh
…istry beside the route Live, the drawer over a packaged record route reads the registry alone (the package scope is cut from it), the same requests as before; the harness's extra package-list assertion pinned its own call order. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jStt5LFpRDtMbVaQyh
Contributor
Author
|
domain:ui#2 · zhuangjianguo · session_01QsR2jRFuJz9QBZqPVHYVhJ 维护者速读
席位意见: 实现与本席 06:20Z 裁定的设计一致,没有新增读取路径:已打包应用的对象路由本来就用「软件包列表 + 按名补读」,这里只是让相关列表也走这条路。四个验收条件都有实测:集合与顺序、旧 CONTROL 翻转、放回门后变红、线上字节和侧栏无闪烁。 席位核对 — ACCEPT ·
|
This was referenced Nov 3, 2026
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 Steedos · project thread
Fixes #29681
Clause-②: no
Metadata-protocol: none
Claim: 6596739699. Design approved by the seat before code (step 1: the provider's existing
{ packageId, names }scope, not a names-only read beside it).维护者速读
crm_app)里打开一条记录、而该对象没有声明记录页时,不再下载整张对象注册表;改为读应用所在包的对象列表,再按名读取查找目标和其他包里指向该对象的对象(这些对象已在应用 bundle 里,不发请求)。ui/packages/app-shell/src/console/appObjectScope.ts记录分支里!page的处理(去掉了有包应用直接读整表的那一行);测试文件末尾新增的 objectstack#29681 那组用例。meta/object:应看到meta/object?package=com.example.crm和几条按名读取,没有不带参数的meta/object;页签仍是 Activities、Contacts、Leads、Opportunities。What changes
A record route whose object has no declared record page draws a synthesized page, which derives its related lists from every object that points at the record's object. Since #29697 an app with no package reads those objects by name from the app bundle (
BundledReads.objectsReferencing). A packaged app still answeredscope: nullthere and read the whole object registry. It now reads the same names through its package scope, the shape its object routes already read: the package list (/meta/object?package=), then by name each name the list does not hold. A pointing object from another package is one of those names, answered from the bundle with no request.inRelatedOrderkeeps the bundle's (object-list) order.ui/packages/app-shell/src/console/appObjectScope.ts: the record arm's!pagebranch no longer returnsscope: nullfor a packaged app; it handspackageIdtoreadObjectRouteNames. The module header says so.MetadataProvider.tsxorbundledReads.tschange:objectsReferencingwas never package-gated, and the provider's{ packageId, names }scope already reads a name outside the package by name.Unchanged: an object outside the app's navigation, no bundle, draft preview, a declared record page, a record form overlay, the record drawer (reads the registry, live: same 24 requests), the package-less route, and the
/meta/pagelist.Why
Measured on a production Console (app-crm,
crm_app, Initechcrm_account, no declared record page), the registry was 561,247 B of the record open's 1,584,710 B.Tests
In the shared harness
console/__tests__/AppContent.packagelessRecordRelated-29552.test.tsx, over the realMetadataProviderandAppContent, a new top-level describe (7 cases). The fixture addsops_visit, an object outside the app's package that points at the account, listed between the package's own objects:/meta/object: exactlyobject?package=app.crmandobject/sys_user(the cross-package object comes from the bundle);ops_visit.accountin its registry place (pinned literally);crm_casetocrm_contact) draws that list;Flipped: the old CONTROL "a packaged app's record route is unchanged: the registry, and nothing by name" is removed; the new describe replaces it. The package-less pins are byte-unchanged in their assertions. The harness now reads its object set and page list from
server.objects/server.pages(reset to the old values inbeforeEach), so the packaged describe can addops_visitwithout touching them.Ablations through
scripts/ablation-replace.mjs, each restored withgit diff HEADempty and the blob equal to HEAD:if (packageId) return { candidate, scope: null, … }): 2 red at daaec33, the packaged no-unscoped-read pin and the cross-packagecrm_casepin (the order pin stays green: the registry draws that order too). At ad4df19 it was 3 red: the drawer pin then also asserted a package-list call that only the harness makes, narrowed in daaec33 (see Acceptance notes);inRelatedOrder: 2 red, the packaged order pin withops_visitand the package-lessrequiresObjectorder pin.Sweep at ad4df19: the 135 app-shell test files naming
AppContent,appObjectScopeorbundledReads, plus every provider test, 1,118 tests passed.@object-ui/app-shelltype-check (both programs) exit 0 at ad4df19 and again at the merged head f440eb5; ESLint 0 errors on the changed files. Harness 17/17 at daaec33. Final head 8d42b23 merges main again (42ff86f); none of the incoming commits touches the changed files orMetadataProvider.tsx/bundledReads.ts.Acceptance notes
?package=request shared). Sampled every 25 ms from navigation start, the sidebar went from 0 to all 7 entries in one step, at 1,109 ms before and 1,046 ms after; no entry flashed or went missing.sys_organization12,259 B andsys_business_unit8,874 B (the account's lookup targets, without views, as the packaged list route reads them), andsys_comment_reaction4,291 B (RecordDetailView'suseObjectPresencefor reactions).ops_visitwas saved withPUT /meta/object/ops_visit(outsidecom.example.crm, a lookup tocrm_account). The server put it in thecrm_appbundle and the registry lists it as inbound ofcrm_account, so it is answered from the bundle. Before and after, the tabs are Overview, Activity, Activities, Contacts, Leads, Opportunities, and the overflow menu holds Visits.GET /api/v1/packages(676,423 B) is read on this route before and after; not this card's read.Verification
Production Console (
pnpm build,pnpm console:build), app-crmobjectstack dev --seed-admin --fresh,measure2.cjs(about:blank then a fresh goto, cache disabled, CDP initiators). The before leg is a Console built from main'sappObjectScope.ts(be6b15c).Per read, packaged crm_app Initech crm_account record (no declared page)
/meta/object(registry)/meta/view(whole)/meta/object?package=com.example.crmobject/sys_userobject/sys_organization,object/sys_business_unitobject/sys_comment_reaction/meta/page?recordId=)?package=Page text before and after is identical except the record's relative created time. Data, screenshots (
tabs.png,tabs-overflow-open.png,record-full.pngper leg) and scripts (measure2.cjs,tabs.cjs,probe.cjs,xpkg.cjs) are in the project'sissue-29681/measure/.Human Minimum
packages/specholds no runtime logic. (Not touched.)main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code