This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(app-shell): resolve a report's inline locale label and description to the viewer's language (objectui#13470) - #13487
Merged
Conversation
…n to the viewer's language (objectui#13470)
ReportSchema types a report's label and description as I18nLabel, so an
inline locale map ({ en, 'zh-CN' }) is valid metadata and is served
unchanged. ReportView drew both raw into the page heading and the line
under it, and the app bar's report crumb handed the label to reportLabel
as its fallback, so the map reached JSX and React error #31 blanked the
report page for every viewer. A whole-report drill titled its drawer
"[object Object]".
All four sites now resolve the map with metadataText in the viewer's
language, the reader the app's report index and recent items already
name a report with.
Claude-Session: https://claude.ai/code/session_01EsHaC5nYMcJgk2Nr6fbVdG
Co-authored-by: Claude <noreply@anthropic.com>
…nes (objectui#13470) Claude-Session: https://claude.ai/code/session_01EsHaC5nYMcJgk2Nr6fbVdG 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
|
Contributor
Author
席位核对 — ACCEPT · PR #13487 @
|
This was referenced Oct 25, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 Elon · project thread
Fixes #13470
Clause-②: no
Metadata-protocol: none
What changed
ReportSchemain@objectstack/spectypes a report'slabelanddescriptionasI18nLabel, so an inline locale map such as{ 'zh-CN', en }is valid metadata, and the/metaread serves it unchanged. Four places on the report route drew it raw:ReportView's page heading (previewReport.title || previewReport.label) and the line under it (previewReport.description). React refused the object as a child (error Task: Refactor Monorepo to Support Lazy-Loaded Plugins #31) and the page was blank for every viewer, the card's repro.AppHeader. It handed the served label toreportLabelas its fallback, andreportLabelreturns an unmatched fallback untouched, so the map reached JSX there too. WithReportViewfixed alone, the page stayed blank through this crumb (measured: the ablation below).String(reportData.label), which reads[object Object].Each now resolves the map in the viewer's language (
useObjectTranslation().language) withmetadataText, the app-shell reader the app's report index (useAppReportEntries) and recent items already name a report with. It is the spec'sresolveI18nLabel, which agrees limb for limb withpickLocalized(the resolver the objectui#13380 fix used) and spells a missundefined, so the existing fallbacks ('Report Viewer', the humanized slug, the report name) keep working through??. A plain-string label or description draws exactly as before. One changeset:@object-ui/app-shellpatch.The other surfaces that print a report's label or description were checked and already resolve the map: the app's report index (
AppReportIndexView) and the ⌘K palette's app-report rows both readuseAppReportEntries, which callsmetadataText. The palette's navigation rows print the navigation entry's own label, not the report's.Tests
New pins, both mounting the real component under a real
I18nProvider, each leg inenandzh-CN, with a plain-string report as the control:packages/app-shell/src/views/ReportView.inlineLocaleLabel-13470.test.tsx: the card's repro report, with the map on bothlabelanddescription. LegsHEADING_MAP_RESOLVES,DESCRIPTION_MAP_RESOLVES,DRILL_TITLE_MAP_RESOLVES,PLAIN_STRING_CONTROL.packages/app-shell/src/layout/__tests__/AppHeader.reportCrumbInlineLocale-13470.test.tsx: theAppHeader.dashboardReportCrumb-12273harness withuseObjectLabelreal. LegsLABEL_MAP_RESOLVES,PLAIN_STRING_CONTROL.Readings, all at head
899902d:ReportView,AppHeader,AppReportIndexVieworappReportIndex(39 files, found bygit grepover test files), withpnpm exec vitest run --maxWorkers=2: Test Files 39 passed (39), Tests 323 passed (323).turbo run type-check --filter=@object-ui/app-shell --concurrency=2: 30 successful, 30 total. The package'stype-checkchainstsconfig.test.json, so both new test files are type-checked.node scripts/check-changeset-presence.mjs: pass (1 changeset for 1 released package).pnpm check:new-line-citations: 0 new citations.node scripts/check-changeset-no-major.mjs: pass.Narrowed, declared: the whole
packages/app-shell/suite at--maxWorkers=2printed nothing for 60 minutes on this shared container and was stopped, so it is NOT MEASURED locally; CI's shardedpnpm testruns it. The narrowed set is every test that imports a changed module. Its blind spot: a test that mounts these components through another import path without naming them.Ablation, one site at a time on the committed fix. Each leg put the pre-fix line back, ran the two new files, then restored the file with
git checkout HEADand confirmedgit diff HEADwas empty:ReportViewfile fails onObjects are not valid as a React child (found: object with keys {zh-CN, en}); the control legs and the crumb file pass.DRILL_TITLE_MAP_RESOLVESfails, in both languages, and the drawer reads[object Object].LABEL_MAP_RESOLVESlegs fail, on the same React error Task: Refactor Monorepo to Support Lazy-Loaded Plugins #31.Acceptance notes
AppHeader's page branch handspageDef.labeltopageLabelas its fallback the same way, andPageSchema.labelisI18nLabeltoo. A throwaway probe (not committed) mounted this PR's crumb harness at/apps/srm/page/welcomewith that page's label set to{ 'zh-CN', en }: it fails onObjects are not valid as a React child (found: object with keys {zh-CN, en}), so a page with an inline-map label blanks its route. Handed to the seat to file.DatasetReportRenderer'sresolveText(the heading of each block of ajoinedreport) reads only a map'sdefaultentry, so a block label written as{ 'zh-CN', en }shows the block's name instead of either string. Read-only observation from the code, not measured; nothing filed.ReportViewstill readspreviewReport.titlebeforelabel.ReportSchemadeclares no roottitle, so the arm reads a key no valid document carries (the dashboard view retired its twin under ADR-0049). Left as it was, now resolved likelabel; outside this card.reports.NAME.labelbundle lookup (reportLabel), while the page heading draws the served label as given. That split predates this PR and is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01EsHaC5nYMcJgk2Nr6fbVdG