Repository navigation
fix(app-shell): count an object document's served listViews as served views (objectui#11336) - #11620
Merged
Merged
Conversation
… views (objectui#11336) `@objectstack/spec` 17.6.0 (objectstack#21072) translates the listViews an object document embeds on the server, keeping a published edit over the packaged catalog. `isServedView` now also answers true for a tab id that is a key of the served `/meta/object` document's own `listViews` (read pre-merge, canonical key only), so the switcher tab and the breadcrumb draw that label as given instead of running the client bundle over it a second time. The hook's docblock bullet that said the server does not translate those is corrected. Claude-Session: https://claude.ai/code/session_015W8GBu6sBiqus2L2xjMsAL Co-authored-by: Claude <noreply@anthropic.com>
…he crumb (objectui#11336) The tab and the crumb draw the label the `/meta/object` read served for a view the object document embeds (zh-CN served string; a published edit over the packaged string); a view with no catalogue entry keeps its authored label; a view only the client derived (a stack container's expansion) is still named by the bundle. The #11295 suites' worlds now serve the object document as well, and their stale "the server does not translate listViews" prose is corrected. A unit file pins the predicate's edges and the hook's identity. Claude-Session: https://claude.ai/code/session_015W8GBu6sBiqus2L2xjMsAL Co-authored-by: Claude <noreply@anthropic.com>
…s (objectui#11336) Claude-Session: https://claude.ai/code/session_015W8GBu6sBiqus2L2xjMsAL Co-authored-by: Claude <noreply@anthropic.com>
…f casting to any Claude-Session: https://claude.ai/code/session_015W8GBu6sBiqus2L2xjMsAL Co-authored-by: Claude <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
This was referenced Oct 4, 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.
Fixes #11336
Clause-②: no
What changed
@objectstack/spec17.6.0 (objectstack-ai/objectstack#21072,c27404f0a9) translates thelistViewsan object document embeds on the server, fromobjects.OBJECT._views.KEYand with a published edit kept over the packaged catalog. The console still ran its own catalog over those labels a second time. This PR counts such a view as served, so the switcher tab and the breadcrumb draw its label as given.packages/app-shell/src/hooks/useServedViewItems.tsisServedView(served, objectName, viewId)answers true for a/meta/viewdocument namedviewId, as before. It now also answers true whenviewIdis a key of the servedobjectNamedocument's ownlistViews.useMetadata().getItemsByType('object'). The mergedlistViewsthe label sites hold mixes the document's own entries with view documents and a container's expansion, and only the document's own entries were translated bytranslateObject.listViewskey is read, and the entry must be a record. The server translates no other spelling, so a view a stored document embeds under the legacylist_viewskeeps the bundle. The probe below measures this.useServedViewItems()returns both reads as one record. It is held in a module-levelWeakMapkeyed on the two cache arrays, so its identity depends on the payloads, never on a React memo (AGENTS.md [WIP] Enhance every detail of the designer #10).translateObjectdoes not translate those" is corrected.packages/app-shell/src/views/ObjectView.tsx(viewTabLabel,viewOriginLabel) andpackages/app-shell/src/layout/AppHeader.tsx(the crumb) now pass the object name to the predicate. Their comments now name both reads./meta/objectdocument as well, and their stale prose is corrected..changeset/11336-served-embedded-listviews.md:@object-ui/app-shellpatch.No export, prop, type member or i18n key is added to any package entry.
useServedViewItemsandisServedVieware not reachable from@object-ui/app-shell's entry:exportsmaps only.and./styles.css, and both names are absent fromsrc/index.tsandsrc/hooks/index.ts. The controluseRecentItemshas 2 hits insrc/index.ts.Premise check (measured on
origin/main, not taken from the card)The label sites read the served object.
ObjectViewandAppHeaderreceiveobjectsfromuseMetadata().objects(AppContent). That getter ismergeViewsIntoObjects(readType('object'), readType('view')).getItemsByType('object')returns the cache's own/meta/objectitems, mutated only bynormalizeSchemaReferenceKeys, which touches field reference keys. The merge copies the served document's ownlistViewsentries under their record keys, and those keys win collisions. So an embedded tab's id is the key the served document carries.The server translates them. A probe ran against the installed
@objectstack/spec17.6.0 (system.translateObject, localezh-CN, a catalog withobjects.sys_account._views.mine.label):listViews.mine我的链接other, no catalog entryOtherminecarrying an org edit (Links I own), withpackagedBaseLinks I own(the catalog loses)list_views.mineMy Links(untranslated)Not translated by any server: a stack container's expansion.
translateViewdoes not walk a container's nestedlistViews, so that kind still goes through the bundle.Evidence (head
0a2c2af)pnpm exec vitest runon the three touched test files (repo-root spelling), before the merge at5b212d6:Test Files 3 passed (3),Tests 35 passed (35). The full-package run below covers them again on the merged head.ablation-replace.mjs(anchor hit 1 time; blob changed, then restored equal to HEAD;git diff HEADempty afterwards). The object-document branch was cut (if (!objectName) return false;becamereturn false;), and the predicted cells went red:Tests 7 failed | 28 passed (35).pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0 on the merged head, after the@object-ui/app-shell^...dependency closure was built.tsc -p tsconfig.test.json --listFileslists all three touched test files.pnpm exec vitest run packages/app-shell/on the merged head:Test Files 1000 passed | 1 skipped (1001),Tests 9930 passed | 9 skipped (9939), exit 0. The run held the shared verify lock; wall-clock figures are omitted because the box is shared.fd060f0767's (ObjectView 174, AppHeader 22, the two plugin-dashboard: a served, already-translated widget title (and a view tab) is re-translated by the packaged bundle, so a published edit shows the shipped string: objectui half of objectstack-ai/objectstack#20680 #11295 suites 3 and 17, the hook 0). The new unit file has 0 warnings.check-changeset-presence,check-changeset-no-major,check:changeset-claims(with the changeset committed),check:pending-changeset-literals,check:new-line-citations(0 new),check:control-bytes,check:vi-mock-specifiers,check:vi-mock-inherit,check:vi-mock-override-shape,check:test-path-roots,check:unreferenced-sources. CI runs the rest.Acceptance notes
c27404f0a9(17.0 to 17.5), draws embedded views' labels as authored. Today the console's second pass translates them. I found no version gate in app-shell: the only server-capability signals it reads are the runtime config'sfeatures.*flags, and none of them says "embedded listViews are served translated". The CLI-shipped pairing is unaffected, because@objectstack/consoleis built at the objectui SHA pinned per framework release. The exposed pairing is@object-ui/consolerun on its own cadence against an older 17.x server. No gate is added here; the question is in the report.useNavTargetLabel(nav-entry labels) passes a view's label throughviewLabelwithout askingisServedView, for both channels. No reproduction was run, and no carrier is known.objectui#11303kept the console path for embeddedlistViewsbecause the server did not translate them then. That reason is gone with 17.6.0, whichpnpm-lock.yamlresolves.Implemented by the dispatched
os-devagent, sessionhttps://claude.ai/code/session_015W8GBu6sBiqus2L2xjMsAL.Generated by Claude Code