Repository navigation
fix(app-shell): the bell's Activity rows name their object by its label, not its API name (objectui#12212) - #12237
Merged
objectstack-fleet[bot] merged 1 commit intoOct 12, 2026
Conversation
…el, not its API name (objectui#12212) The Activity tab's second line printed `sys_activity.object_name` as stored (`… · sys_user_preference`, `… · crm_lead`) beside a summary that already uses the object's label. It now resolves the label in the reader's language from the console's cached object list (`useMetadata().objects`) through `useObjectLabel`'s bundle lookup, the way `useNavTargetLabel` reads an object's label, and falls back to the API name only when nothing names the object. The lookup lives in its own component so the object list is read only while Activity rows are on screen. Claude-Session: https://claude.ai/code/session_016djJF12Qt14ejKR5Vjt4sK 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
|
objectstack-fleet
Bot
deleted the
claude/issue-12212-activity-object-label
branch
October 12, 2026 11:54
This was referenced Oct 12, 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 #12212
Clause-②: no
What changed
The bell's Activity tab (
InboxPopover) printed each row's object by its API name (… · sys_user_preference,… · crm_lead) beside a summary that already names the object by its label. The row's second line now shows the object's label in the reader's language, and the API name only when nothing names the object.sys_activitystill storesobject_name, and the console resolves it, as triage6121938464directs.packages/app-shell/src/layout/InboxPopover.tsx: a module-privateActivityObjectLabelcomponent renders the object half of the row's second line. It finds the definition inuseMetadata().objects(findByName), reads itslabelin the active language (metadataText, which also reads an inline locale map), and passes that throughuseObjectLabel().objectLabel, so a bundle entryobjects.NAME.labelwins, as on the console's other object surfaces. An empty answer falls back to the API name. These are the three readersuseNavTargetLabelcomposes for an object, imported from that module, not copied.packages/app-shell/src/layout/__tests__/InboxPopover.activityObjectLabel-12212.test.tsx..changeset/12212-activity-object-label.md(@object-ui/app-shellpatch).No new i18n key, no export, prop or type change, nothing on the server.
activityItemType.tsis read, not changed: the lookup needs the reader's language and the cached definitions, both React context, so it sits at the render, not in the row mapping that Home's card shares.Where the definitions come from (H1)
useMetadata().objects:MetadataProvider's per-type cache of theobjectlist, the same listuseNavTargetLabel,useRecentItemLabeland the app sidebar read. It is one list request for the whole type, shared with every other reader, never one per row (no N requests for N rows). Theobjecttype is not eager (EAGER_TYPESisappandview), and readingobjectsis what loads it. So the lookup is its own component: the row elements are built on every render of the bell, open or closed, and only a mounted row reads the list. The pin's last case holds both halves: a closed bell reads the list zero times, and the Activity tab with rows reads it.Objects the console has not loaded (H2)
Read at objectstack
origin/main794177d9b, inpackages/rest/src/meta-item-read-gate.ts: theobjectlist answer (createMetaListAnswer) prunes each object'slistViewsper caller (createMetaListReadGate,filterObjectListViewsForUser) and masks fields (maskMetaObjectList). It drops no object. So a system object such assys_user_preferenceis in the list the console caches, with itslabel, which the list's translation step serves in the request locale. Two cases can still miss: the list has not loaded yet (the row shows the API name until it lands, then re-renders with the label), or the object has since been removed. Both fall back to the API name, per the ruling. This is a reading of the source, not a live call.Translation (H3) and the summary (H4)
objectLabeltriesobjects.NAME.labelunder every app namespace the loaded bundle carries (and the un-prefixed base name), falling back to the definition's label. The pin'szh-CNcase reads线索from a bundle entry forcrm_lead. The summary (description) is server text and is rendered unchanged; the pin asserts it verbatim inenandzh-CN.Tests
Every run below is on
9662600, this branch's head when the PR was opened.enbusiness object showsLead;ensystem object showsUser Preference(the staging row);zh-CNshows线索from the bundle; an unknown object showscrm_gone; the summaries are verbatim in both languages; a closed bell reads no object list, and the Activity rows read it. Result: 6 passed.scripts/ablation-replace.mjs; mutation and restore proven by blob hash,git diff HEADempty after):4 failed | 2 passed. The three label cases and the read case are red; the fallback and the summary are green, as the pin's header predicted before the run.ActivityObjectLabelcalled as a function inside the row map):1 failed | 5 passed, failing withread while the bell is closed: expected 3 to be +0. The laziness claim in the code comment is measured.InboxPopover,activityItemTypeorinbox-activity: 28 files, 290 tests passed. Every test namingAppHeader,ConsoleLayoutorInboxPopover(the bell's hosts, several with a mockeduseObjectLabel): 82 files, 719 tests passed.turbo run build --filter='@object-ui/app-shell^...' --concurrency=2: 28 of 28 tasks.pnpm --filter @object-ui/app-shell type-check(bothtsclegs): exit 0, andtsc -p tsconfig.test.json --listFilesincludes the new pin.check:vi-mock-specifiers,check:test-path-roots,check-changeset-presence.mjs,check:changeset-claims,check:pending-changeset-literals,check:control-bytes,check:new-line-citations(0 new),check:vi-mock-inherit,check:vi-mock-override-shape,check:phantom-deps,check:esm-specifiers,check:self-import,check:i18n-keys,check-changeset-no-major.mjs,check-changeset-fixed.mjs,check-changeset-overwrite.mjs..tsxfiles: the config's TS block isfiles: ['**/*.{ts,tsx}']and neither path is ignored;--format jsonreports 2 files, 0 errors, 0 warnings. Invariance: the config sets noparserOptions.projectorprojectService(no type-aware linting), and no rule undereslint-rules/reads the filesystem, so this diff cannot move a verdict on an untouched file. The fullpnpm lintis CI's.Acceptance notes
HomeActivityinpackages/app-shell/src/console/home/HomeRail.tsx, renders the same shared feed's rows with the sametimeAgo(...) · a.objectNameline. A throwaway probe (deleted, never committed) renderingHomeActivitywith acrm_leadrow and acrm_leaddefinition labelledLeadread"3 hours ago · crm_lead". Reported to the seat. MovingActivityObjectLabelto a shared module would serve both surfaces.Generated by Claude Code