Repository navigation
perf(app-shell): a dashboard opens from the app bundle and asks only its widgets' objects by name - #29472
Merged
Conversation
… bundle and its widgets' objects by name Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVVA94oekr4rqqQgUJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVVA94oekr4rqqQgUJ
…ad pin Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVVA94oekr4rqqQgUJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVVA94oekr4rqqQgUJ
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T16:08ZHead-sha:
|
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 #28784
Clause-②: no
Metadata-protocol: none
Claim: 6575848918
维护者速读
requiresObject点名的对象(按名读),不再读整张对象注册表和视图表。ui/packages/app-shell/src/console/appObjectScope.ts(仪表盘路由的对象范围,readDashboardWidgetObjects/readDashboardObjectScope)、ui/packages/app-shell/src/views/DashboardView.tsx(bundle 优先读仪表盘、按名剪枝小部件)、ui/packages/app-shell/src/console/AppContent.tsx(仪表盘路由不再等dashboard桶)。/apps/showcase_app/dashboard/showcase_ops_dashboard,开发者工具 Network 过滤meta/:看不到meta/dashboard、meta/view,也看不到不带?package=的meta/object;九个图表照常出数。What changes
On
main, every open of/apps/APP/dashboard/NAMEread three whole lists before its widgets could query:GET /api/v1/meta/dashboard, the whole object registryGET /api/v1/meta/object(composed withGET /api/v1/meta/view). The route gate (routeReadsfordashboard/:dashboardNameis['dashboard', 'object']) waited for both buckets, and the dashboard route was not on the object-scope list, so theobjectbucket meant the whole registry. The app bundle already held the dashboard.DashboardView: the dashboard/meta/dashboardlist, prefer-localuseBundledItem); the list, prefer-local, only on a missDashboardView: the widget capability gate (requiresObject, elseobject)readDashboardWidgetObjects: the widgets' names, by name, beside the app's package list, without views; a name the server answers absent (missing) hides the widgetAppContent: the route gatedashboardand the wholeobjectbucketsdashboardwhen bundle reads exist (as the page route does); the route reads the app's object scope (dashboard/:dashboardNamejoinsAPP_OBJECT_SCOPE_ROUTES) and waits only for the widgets' names, and for nothing when they name noneAppContent: the chrome's objectsrequiresObjectentries and the palette's objects while it is openreadObjectsByNamewas not needed: the package-plus-names scope already reads an out-of-package name by name. A hand-rolled metadata context (noreadObjectScope) keeps the whole list, and an adapter without the bundle keeps both buckets.Tests
console/__tests__/AppContent.dashboardRouteReads-28784.test.tsx, over the realMetadataProvider,AppContentandDashboardView, a client double that records each read and an app bundle the test controls: (a) a bundled dashboard opens with nodashboardlist, no wholeobjectlist and noviewlist; (b) the widgets' objects are asked by name and a widget whose object is absent is left out; (c) CONTROL: a dashboard outside the bundle is read from the list, prefer-local, still without the whole object list.console/__tests__/openPathObjectReaders-12811.test.ts: theDashboardViewrow is nowscope.DashboardView*.test.tsxpin moved.Acceptance notes
design/dashboard/:dashboardName(the designer) and thesearchroute still read the dashboard list; out of this card's scope.Verification
Dashboard requests, production Console, showcase (
objectstack dev --fresh), warm reload x3Base
96fb7b5d(the ui sources restored to it, same box, same server build): 32/api/requests (one run 33).GET /api/v1/meta/object746,514 B,GET /api/v1/meta/view24,009 B,GET /api/v1/meta/dashboard12,075 B, all after the bundle; firstPOST /api/v1/analytics/dataset/queryat 1709 / 1135 / 1006 ms.This branch
ae3d70fb: 30 requests. Nometa/dashboard, nometa/view, nometa/objectwithout?package=;GET /api/v1/meta/object?package=com.example.showcase157,802 B instead. First dataset query at 1654 / 1032 / 885 ms. The nine dataset queries and every other request are the same set.Ablations (each leg through
scripts/ablation-replace.mjs, restored withgit diff HEADempty)dashboardbucket → (a), (b) red.DashboardViewignores the bundle's hit → (a), (b) red.dashboard/:dashboardNameoffAPP_OBJECT_SCOPE_ROUTES→ (a), (b), (c) red.missing→ (b) red.Local runs
DashboardView,appObjectScope,readAppObjectScope,AppContent,openPathObjectReaders,appRouteMetadataReads: 108 files / 878 tests passed; the new pin 3/3.pnpm --filter @object-ui/app-shell run type-check: exit 0.eslint --no-inline-configon the changed files: 0 errors.check:new-line-citations: 0 new.pnpm --dir ui check:spec-symbols: exit 0.node scripts/pm/dispatch-gates.mjs --commands) atae3d70fb: 34 derived, 34 run, all exit 0, reconciled with--ran(0 NOT-MEASURED);check:type-check-debtandpnpm --dir ui exec vitest run scripts/(169 files passed, 2 skipped) under the verify lock;node scripts/check-sdui-manifest.mjsexit 0 among them. The full app-shell suite is CI's Test UI.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_01QsR2jVVA94oekr4rqqQgUJ