Repository navigation
fix(app-shell,fields,plugin-form,plugin-gantt,plugin-grid,components,console): record pages, forms, drawers and preview cards draw a served object label as served - #30475
Merged
Conversation
…console): record surfaces draw a served object label as served A served object label is already translated by the server (its label order for an overridden item), so running the client bundle over it again let the base package's string win a rename back. The record page, form, drawer, preview card, hover card, pointer cell and the rest of the family now draw the served label as given and ask the bundle only when none is served. WIP: tests and changeset follow. Claude-Session: https://claude.ai/code/session_01Utp6CZgb7dMvMK3Biysr7P Co-authored-by: Claude <noreply@anthropic.com>
…N fixtures in zh-CN Claude-Session: https://claude.ai/code/session_01Utp6CZgb7dMvMK3Biysr7P Co-authored-by: Claude <noreply@anthropic.com>
… label pins Claude-Session: https://claude.ai/code/session_01Utp6CZgb7dMvMK3Biysr7P Co-authored-by: Claude <noreply@anthropic.com>
… with no provider imports A record surface reading the rule no longer pulls the metadata store into its module graph. Claude-Session: https://claude.ai/code/session_01Utp6CZgb7dMvMK3Biysr7P Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG 维护者速读
席位核对 — ACCEPT · head 2e89958
|
…-x9e7d4 # Conflicts: # ui/packages/app-shell/src/views/RecordDetailView.tsx
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG 席位核对 — ACCEPT(head 后移复核)· head 3567f3b
|
This was referenced Nov 5, 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 Bill · project thread
domain:ui#3 · os-bill · session_01Utp6CbPN5UYMnBaNJPJWfG
维护者速读
.custom覆盖里给已安装对象改名后,列表与页头(上一张卡已修)显示新名,但点进记录、表单、抽屉、预览卡仍是基础包的旧译名,同一个东西出现两个名字。ui/packages/app-shell/src/hooks/servedObjectLabel.ts(新增单数servedObjectLabel、复数 helper 加fallback参数,从 useNavTargetLabel 拆出)、ui/packages/app-shell/src/views/RecordDetailView.tsx(11 处)、ui/packages/app-shell/src/console/AppContent.tsx(弹窗标题与保存提示)。pnpm --dir ui exec vitest run packages/app-shell/src/hooks/__tests__/servedObjectLabel-30390.test.ts packages/app-shell/src/views/RecordFormPage.listLinkPlural-11733.test.tsx packages/app-shell/src/views/record-preview/RecordPreviewCard.test.tsx,预期全绿,其中 objectstack#30390 分组断言改名后的对象名胜过目录旧译名。Fixes #30390
Clause-②: no
Metadata-protocol: none
What changes
Route 1 of the card (per site), ruled by the seat on the Claim: every Console surface that names a served object draws the served label as given, and asks the client catalog (
useObjectLabel) only when no label is served. The rule is the one PR #30388 applied to the list and header surfaces.app-shell: a singular siblingservedObjectLabelnext toservedObjectPluralLabelin the privatehooks/servedObjectLabel.ts(re-exported byhooks/useNavTargetLabel.tsfor its existing importers), and an optionalfallbackargument on both (client text no server translated, such as the object's name, handed to the catalog lookup as its own last resort, exactly as the sites passed it before). Neither is exported from the package entry, soClause-②: no. Sites:AppContent(dialog title ×2, save toast, way-back label),ActivityObjectLabel,ConsoleLayout(dock chip),ObjectDataPage(record drawer title),ObjectView(delete confirmation, cascade labels, import wizard),RecordDetailView(related-list titles ×2, phone back and crumb plurals ×2, access-denied and delete copy ×2, cascade labels, record trail ×2, page title ×2),RecordFormPage(title and list link),appReportIndex(plural and singular),RecordPreviewCard,recordDrawerStack(singular and plural),WidgetRefCellFaces(object-ref cell; its label comes from the metadata store's object list).app-shell, each package applies the same rule inline with its own served text:fieldsRecordHoverCard,plugin-formObjectFormContainer(save toast) andClosedAffordanceNotice,plugin-ganttname column,plugin-gridRecordPointerCell,componentspage-header record chrome, and the ConsoleFormPageform-view heading. The last two are the same-class sites the seat added to the surface.patchfor the seven packages.Tests
hooks/__tests__/servedObjectLabel-30390.test.ts(helper rule, inline locale map, fallback order);RecordFormPage.listLinkPlural-11733.test.tsx(title, toast and list link of a renamed object);RecordDetailView.relatedListTitlePlural-11733.test.tsx(both related-list producers);record-preview/RecordPreviewCard.test.tsx(card heading);plugin-form/src/closedAffordanceNotice.i18n-11000.test.tsx(notice naming). Each renamed case has a no-label control that the catalog still answers.54a922c2: with the pre-change source restored (tree only) the 9 renamed-object cases go RED and every control stays GREEN; restored fromHEAD,git diff HEADempty.54a922c2(every test file named for, or importing, a changed module, plus every zh-CN fixture file that serves objects; 615 files): 595 passed, 1 skipped, 19RecordDetailView.*files failed to load because the record page newly reached the metadata provider throughuseNavTargetLabel's imports. The helpers moved tohooks/servedObjectLabel.ts, a module with no provider imports (useNavTargetLabelre-exports them); the 19 plus 9 pin and importer files re-run:Test Files 28 passed (28),Tests 237 passed (237).RecordDetailView.recordReadFailure-11902,AppContent.createLandingOriginPlural-11733,AppContent.recordSaveToastNamesRecord-26172,InboxPopover.activityObjectLabel-12212,HomeActivity.objectLabel-12238(the last two test names now say where the label comes from), and the first case ofclosedAffordanceNotice.i18n-11000.Acceptance notes
useNavTargetLabel's draft-label rung (a pending draft's label is client text no server translated);objectViewPageHeader(already receives the served plural helper);plugin-detailrecord-reference-rail(two sites) andrecord-related-list(no definition in hand, only a humanized name: reported to the seat as out of scope);PackagedActionsSection(its object list is read by a barefetchwithout the session'sAccept-Language, so its served label is in the browser's language, not the session's; drawing it as given would show English to a zh-CN user with an English browser).Verification
Gate logs, sweep counts and the reverse leg are in the os-dev report comment on #30390.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CZgb7dMvMK3Biysr7P
Generated by Claude Code