Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(app-shell): the designer's unknown-value flags read in the designer's locale (objectui#9652) - #10445

Merged
os-litant merged 3 commits into
mainfrom
claude/issue-9652-inspector-unknown-value-i18n
Sep 25, 2026
Merged

os-litant merged 3 commits into
mainfrom
claude/issue-9652-inspector-unknown-value-i18n

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #9652

Clause-②: no

What was wrong

A designer picker that holds a stored value its roster does not offer still shows that value, flagged with the reason. The flag was an English template literal at each site, so a zh-CN author read (not found), (not in object) or (deprecated) on an otherwise Chinese inspector. The designer catalogue (packages/app-shell/src/views/metadata-admin/i18n.ts) already carried engine.form.notInObject in en and zh, and widgets.tsx already used it.

Sites (re-derived by grep on origin/main at the base 3335767b4)

site flag now
ViewColumnInspector field picker (not in object) engine.form.notInObject (existing row, unchanged)
ViewVariantInspector view type (not found) engine.form.notFound (new)
FlowNodeConfigField select branch (deprecated) engine.form.deprecated (new)
FlowObjectListField select cells (deprecated) engine.form.deprecated
InspectorSelectField default (_shared.tsx) (not found) engine.form.notFound

ActionDefaultInspector only mentions VALUE (not found) in a comment. Its ActionTargetField passes no unknownValueLabel, so it shows the _shared.tsx default, which is now translated.

Two sites of the same class that the seat's list did not name. Both are outside this claim's file surface, so they are not touched here. They are listed in the report for the seat:

  • FlowReferenceField.tsx, org-membership-level select: label: \${current} (invalid)``
  • HookDefaultInspector.tsx, object picker: label: \${n} (not published)``

Decisions, each measured

  • Keys. (not in object) now uses the existing engine.form.notInObject. Its value is unchanged, so the bare-suffix readers in widgets.tsx (which draw it in a muted span of its own) keep working. The catalogue had no row meaning "not found" or "deprecated" (grep of both tables for not found, deprecated, 未找到 and 弃用). One key was added for each, as bare suffixes shaped like notInObject: engine.form.notFound = (not found) / (未找到) and engine.form.deprecated = (deprecated) / (已弃用). 未找到 is the zh pack's own word for "not found" (未找到选项, 未找到记录). The catalogue carries en and zh only, and every new key has a value in both.
  • Word order. The catalogue's tFormat interpolates single-brace {token} holes. engine.form.notInObject is a bare suffix, and its value cannot take a {value} hole without changing widgets.tsx. So the value and its flag are joined by one template, engine.form.flaggedValue: en {value} {flag}, zh {value}{flag}. The zh template drops the space because every zh flag opens with a full-width bracket. That is the catalogue's own zh convention (component_id(此页面暂无组件)), and a ${v} (flag) literal at the call site could not express it. This adds three keys, one more than "one key each": the template is the word-order key that the open point asked for. The helper is flagUnknownValue(value, flag, locale) in _shared.tsx, a one-line tFormat call.
  • How the locale is obtained. No new plumbing. The three sites that already had a locale prop (ViewColumnInspector, ViewVariantInspector, FlowNodeConfigField) translate with that prop. Two places have no locale prop: InspectorSelectField's default and FlowObjectListField. They read useMetadataLocale(), the hook that the designer's shared editors already read when no prop reaches them (widgets.tsx, SchemaForm.tsx, and ConditionBuilder.tsx in this same directory). Every production host (ResourceEditPage, StudioDesignSurface, ObjectActionsPanel) derives the locale prop it hands to inspectors from that same hook.
  • The _shared.tsx default. It is translated. The other route would have been a locale prop on InspectorSelectField, but that needs a locale argument at each of the call sites that pass no unknownValueLabel, which are in other inspector files outside this claim. The hook covers them with no call-site edit.

Pins

The new file is inspectors/unknownValueFlag.i18n-9652.test.tsx, with 14 cases. For each site it has one render-level zh case and one en case, and it reads the rendered trigger or option text:

  • zh expectations are the value followed directly by the catalogue's zh flag. A guard proves each flag row is a real zh value: not the key echoed back, not the English value, and opening with a full-width bracket.
  • en expectations are the pre-fix literals byte for byte (amount (not in object), legacy_board (not found), sms (deprecated), role (deprecated), retired_group (not found)).
  • The prop-channel sites pass locale with no provider. The hook-channel sites mount I18nProvider in the language under test.

No existing test was rewritten or deleted. None of them asserted an English flag under a zh locale: every existing literal assertion (ReportDefaultInspector.test.tsx, FlowNodeInspector.declaredDefault.test.tsx, FlowNodeConfigField.test.tsx, FlowObjectListField.select.test.tsx, the _shared.* and ViewColumnInspector.* suites) renders en.

Reverse proof (run at ff58a68b1, which has the same code as the head; the next commit adds only the changeset)

Mutations were made through ablation-replace.mjs. Each anchor hit exactly once, the blob changed, the file was restored to its HEAD blob afterwards, and git diff HEAD was empty:

  • A. ViewColumnInspector back to `${v} (not in object)`: Tests 1 failed | 1 passed | 12 skipped. The zh case failed with Expected: "amount(不在对象中)" Received: "amount (not in object)", and the en case stayed green.
  • B. The _shared.tsx default back to `${v} (not found)`: Tests 1 failed | 2 passed | 11 skipped. The zh default case failed with expected 'retired_group (not found)' to be 'retired_group(未找到)', and the en and caller-override cases stayed green.

Verification (head f96ee760a)

  • vitest run on metadata-admin/inspectors/ (all of it) plus check-i18n-{designer-table-parity,dead-keys,call-site-keys,en-drift}.test.ts, perm-home-namespace-3546, objectView-config-keys-retired-4730, block-config-i18n, block-config, studio-locale.i18n and the console preview-samples-designer-options: Test Files 100 passed (100), Tests 1570 passed | 1 skipped.
  • vitest run on tests that render these inspectors from outside the directory: studio-design/ (all of it), both ViewConfigPanel suites, ResourceEditPage.defaultGate, ConditionalFormattingEditor.celGate, FieldsListEditor.retiredAliases, view-column-io.retiredAliases, page-schema, ViewRefWidget and four designer i18n tests: Test Files 73 passed (73), Tests 401 passed.
  • turbo run build --filter=@object-ui/app-shell^... --concurrency=2 built 28 of 28 tasks. Then pnpm --filter @object-ui/app-shell type-check (tsc --noEmit && tsc -p tsconfig.test.json) exited 0. --listFilesOnly confirms the test tsconfig includes the new test file.
  • These gates exited 0: check:i18n-designer-parity ("Every en row has a zh row, and every shared row carries the same placeholders."), check:i18n-drift (designer table: 3 keys added, 0 en values changed), check:i18n-keys, check-changeset-presence, check-changeset-no-major, check:new-line-citations (0 new), check:control-bytes, check:changeset-claims, check:pending-changeset-literals, check:vi-mock-specifiers, check:vi-mock-inherit, check:vi-mock-override-shape and check:test-path-roots.
  • check:changeset-claims reported three pending changesets that name i18n.ts: 6310-designer-formula-key-retired, 7125-dashboard-empty-state-keys-retired and 8632-malformed-picklist-option-loud. I read each paragraph, and all stay true: the keys they name are untouched and still present.
  • Lint was a proven narrowing, not a repo-wide run. eslint --no-inline-config --format json on the 7 touched .ts/.tsx files gave 7 files, 0 errors and 12 warnings. The population comes from eslint's own config: calculateConfigForFile does not ignore these files, and languageOptions.parserOptions.project is null. Invariance: type-aware linting is off, and no rule in eslint-rules/ reads other files, so this diff cannot move a verdict on an untouched file.

Acceptance notes

  • One new lint warning: react-refresh/only-export-components on the exported flagUnknownValue. _shared.tsx already exports non-component helpers such as rosterFrom and uniqueId under the same warning, and lint.yml sets no --max-warnings on purpose.
  • The console preview gallery's ?locale=zh-CN forces the locale prop without switching the i18n language. There, the two hook-read flags follow the i18n language, as SchemaForm and widgets.tsx already do on that page. Production hosts get both from the same hook.
  • defaultRosterFailureLabel stays raw English. Every current roster caller passes t('engine.form.optionsLoadFailedTitle', …), so nothing renders it. Its comment is reworded because the old one called the module locale-free.

Generated by Claude Code

…er's locale (objectui#9652)

The flag a designer picker puts on a stored value its roster does not offer
was a hard-coded English template literal at five sites, so a zh-CN author
read "(not found)", "(not in object)" and "(deprecated)" on an otherwise
Chinese inspector.

Each flag now resolves through the designer catalogue: "(not in object)"
through the existing engine.form.notInObject, and two new flag keys,
engine.form.notFound and engine.form.deprecated, beside it. The value and
its flag are joined by one engine.form.flaggedValue template, so the order
and the gap belong to the locale (zh sets no space before a full-width
bracket). InspectorSelectField's default flag reads useMetadataLocale(),
the hook the designer's other shared editors already read.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C
…te (objectui#9652)

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C
…pp-shell patch (objectui#9652)

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 3 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6310-designer-formula-key-retired.md

  • names packages/app-shell/src/views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Not touched: designer.field.formula ('Formula (CEL)') in packages/app-shell/src/views/metadata-admin/i18n.ts, a different and live key belonging to metadata-admin's ObjectFieldInspector — the surface that still authors formula expressions.

.changeset/7125-dashboard-empty-state-keys-retired.md

  • names packages/app-shell/src/views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Not touched: table.noRows ('No rows to display') and engine.form.noRows (packages/app-shell/src/views/metadata-admin/i18n.ts, read at widgets.tsx) — two different, same-named keys in different namespaces. Nor the comments in WidgetEmptyState.tsx, DatasetWidget.tsx, ObjectDataTable.tsx and PivotTable.tsx that record WHY three widgets with three strings became one shared empty state; the packs' own comment keeps that rationale and now names the retirement instead of a row that is gone.

.changeset/8632-malformed-picklist-option-loud.md

  • names views/metadata-admin/i18n.ts → packages/app-shell/src/views/metadata-admin/i18n.ts — edited by this change

    Two new strings land in the designer's own en / zh tables — the metadata-admin console owns its strings in views/metadata-admin/i18n.ts and is deliberately outside the ten locale packs (packages/i18n/README.md, "Scope — the engine.* carve-out").

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 57a2bc281 (merge-base with origin/main): 7 file(s) changed outside .changeset/, read against 1375 pending declaration(s) that publish a body (1950 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3044.2 KB 3104.5 KB
Main entry chunk (gzip) 148.3 KB 350 KB
Entry file index-DTSRl4vn.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 543.20KB 129.69KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 223.86KB 62.25KB
fields (index.js) 256.84KB 65.07KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.28KB 11.09KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 51.44KB 14.62KB
plugin-charts (index.js) 72.54KB 20.26KB
plugin-chatbot (index.js) 198.27KB 47.18KB
plugin-dashboard (index.js) 133.45KB 35.33KB
plugin-designer (index.js) 216.12KB 44.37KB
plugin-detail (index.js) 260.94KB 67.93KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.34KB 37.47KB
plugin-gantt (index.js) 168.47KB 41.53KB
plugin-grid (index.js) 215.43KB 58.90KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 114.17KB 28.21KB
plugin-map (index.js) 22.05KB 7.14KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.64KB 8.94KB
plugin-tree (index.js) 10.74KB 3.76KB
plugin-view (index.js) 85.86KB 21.38KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 114.58KB 37.60KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f96ee760a263ebdd3a983d3ef17cfa1e5b7bdbec

Rendered by an isolated review subagent spawned by the domain:ui#4 seat; its served tier was checked against its transcript stamps (140 of 140 model stamps at the review tier). Adopted by this seat.

① Derived judgments

  • (a) Completeness — grep of packages/app-shell/src/views/metadata-admin/ at head for parenthesised English markers in rendered labels (non-test files). Every hit, classified:
    • Rendered-label literals of the same class, both exactly the two the dev reported out of scope: inspectors/FlowReferenceField.tsx org-membership-level select, label: `${current} (invalid)`; inspectors/HookDefaultInspector.tsx object picker, label: `${n} (not published)`. Neither is in the claim's file surface; both are carried in the dev report's out_of_scope_findings.
    • Hits of a different class, not an unknown-value marker on a stored value: inspectors/flow-node-config.ts field labels 'Entry condition (legacy)', 'Action type (retired)', 'Template (retired)', 'Recipients (retired)', 'Template variables (retired)' (these go through the catalogue's separate flowFieldZh(type, id) zh-override route); PackagesPage.tsx (copy) in a duplicate-package request payload; previews/FlowCanvas.tsx (back-edge) in an SVG tooltip title; previews/simulator/flow-simulator.ts (no backend call) in a simulator mock message. A wider label grep also shows plain English field and option labels in ActionDefaultInspector.tsx ('— None (global) —', label="Variant") and DatasetDefaultInspector.tsx ("Label (optional)"): wholesale-untranslated inspector copy, pre-existing and outside this card's class.
    • Every other textual occurrence of (not found), (not in object), (deprecated) is a comment or JSDoc (ActionDefaultInspector.tsx, FlowNodeConfigField.tsx, ReportDefaultInspector.tsx, _shared.tsx, widgets.tsx, flow-node-config.ts) or the catalogue rows themselves in i18n.ts.
    • The five fixed sites carry no literal: ViewColumnInspector calls flagUnknownValue(v, t('engine.form.notInObject', locale), locale); ViewVariantInspector calls flagUnknownValue(typeLabel(v, locale), t('engine.form.notFound', locale), locale); FlowNodeConfigField and FlowObjectListField call flagUnknownValue(…, t('engine.form.deprecated', locale), locale); the _shared.tsx default is an arrow closure over v returning flagUnknownValue(v, t('engine.form.notFound', locale), locale).
    • The ActionDefaultInspector claim is TRUE: its only mention of VALUE (not found) is in the JSDoc above ActionTargetField, and ActionTargetField renders InspectorSelectField with label, value, options, onCommit, disabled only, no unknownValueLabel, so it shows the now-translated default.
  • (b) Keys and parity.
    • The catalogue carries exactly two locales: export type SupportedLocale = 'en-US' | 'zh-CN', with string tables ENGINE_STRINGS_EN and ENGINE_STRINGS_ZH. All three new rows exist in both: en 'engine.form.notFound': '(not found)', 'engine.form.deprecated': '(deprecated)', 'engine.form.flaggedValue': '{value} {flag}'; zh '(未找到)', '(已弃用)', '{value}{flag}'.
    • engine.form.notInObject is byte-identical between base 3335767b4 and head in both tables: en '(not in object)', zh '(不在对象中)'.
    • tFormat interpolates with template.replace(/\{(\w+)\}/g, …), i.e. single-brace {name} holes, echoing an unknown name back as {name}. {value} and {flag} are supplied by flagUnknownValue, so the holes are right, and both locales carry the same two placeholders, which is what check:i18n-designer-parity requires.
    • The zh no-space join IS the catalogue's own convention: existing zh rows 'engine.form.noObjects': 'object_name(未检测到对象)' and 'engine.form.noComponents': 'component_id(此页面暂无组件)' set an identifier directly against a full-width opening bracket, as does '例如:stage, region(逗号分隔)'.
    • The third key is justified. widgets.tsx reads t('engine.form.notInObject', locale) bare, in its own muted span, at four sites (the field picker, the catalog picker, the suffix-match row and the combobox trigger), so that row cannot absorb a {value} hole. With only two keys the join would have to live in a call-site literal `${v} ${flag}`, which puts an ASCII space before a full-width bracket in zh, against the convention above, and keeps word order in code, which is the open point the card raised. Making notFound and deprecated full templates while notInObject stays bare would leave the three flags on two different shapes. One template key that all three bare suffixes share is the smallest change that keeps widgets.tsx untouched; the deviation was declared in the report and the PR body.
  • (c) Locale mechanism.
    • ViewColumnInspector, ViewVariantInspector and FlowNodeConfigField pass their existing locale prop into both t(...) and flagUnknownValue(..., locale).
    • _shared.tsx and FlowObjectListField.tsx import useMetadataLocale from ../i18n.js, the same exported hook (useObjectTranslation().language mapped to 'zh-CN' or 'en-US') that widgets.tsx (twenty call sites), SchemaForm.tsx (eight) and ConditionBuilder.tsx (one) read. No new prop, context or plumbing; no @object-ui/i18n locale-pack file is touched (the surface is 8 files, none under packages/i18n/).
    • The host claim is TRUE for every non-test render site found: ResourceEditPage.tsx, StudioDesignSurface.tsx, ObjectActionsPanel.tsx and ViewConfigPanel.tsx each bind const locale = useMetadataLocale() and pass locale={locale} into the inspector tree (ViewInspector and FlowInspector forward {...props}). A grep for a hard-coded locale="en-US" or 'zh-CN' prop in non-test packages/app-shell/src and apps/console/src returns nothing.
    • Hook rules hold. In InspectorSelectField, const locale = useMetadataLocale() is called unconditionally in the component body directly after const id = React.useId(), with no early return before it; the default closure (an arrow over v returning flagUnknownValue(v, t('engine.form.notFound', locale), locale)) only captures locale and is invoked during the same render via unknownValueLabel(current) in shownOptions. flagUnknownValue is a pure function (return tFormat('engine.form.flaggedValue', locale, { value, flag })) with no hook inside. In FlowObjectListField, the hook call is the first statement of the body, before React.useMemo.
    • Provider-less renders stay safe: useObjectTranslation returns language: context?.language || i18n.language || 'en' and does not throw (only useI18nContext throws), so the existing provider-less inspector suites resolve 'en-US'.
  • (d) English unchanged. Verified by composing template and flag: ViewColumnInspector renders {value} {flag} with (not in object), so amount (not in object), byte-identical to the old `${v} (not in object)`; the _shared default renders retired_group (not found), identical to the old `${v} (not found)`; ViewVariantInspector still feeds typeLabel(v, locale) as the value, so legacy_board (not found). The pre-existing English assertions (FlowNodeConfigField.test.tsx sms (deprecated), FlowObjectListField.select.test.tsx role (deprecated), _shared.rosterPending.test.tsx retired_group (not found), ReportDefaultInspector.test.tsx retired_dataset (not found) under an en render, the ViewColumnInspector.* suites at locale={'en-US'}) are unmodified and green on the head.
  • (e) The pins are real and can fail.
    • unknownValueFlag.i18n-9652.test.tsx has 14 cases: 3 (an it.each guard over the three flag keys) + 2 ViewColumnInspector + 2 ViewVariantInspector + 2 FlowNodeConfigField + 2 FlowObjectListField + 3 for the InspectorSelectField default (zh, en, caller override). It imports and renders the real components from ./ViewColumnInspector, ./ViewVariantInspector, ./FlowNodeConfigField, ./FlowObjectListField and ./_shared, mocks only ../useMetadata's client so the roster answers, mounts the real I18nProvider from @object-ui/i18n for the two hook-channel sites, and asserts on the rendered combobox text or a getByText of the option, never on a label function in isolation.
    • Ablation A is consistent: only the ViewColumnInspector zh case depends on that site's join, so 1 failed | 1 passed | 12 skipped (a name-filtered run of that describe) is the expected shape, with the en case green because the en template reproduces the literal. Ablation B is consistent: the default's describe has three cases, the zh one fails while en and the caller override (which bypasses the default) pass, 1 failed | 2 passed | 11 skipped. The FlowObjectListField zh case builds its own label and so correctly does not move under B.
    • The guard actually guards. pickTable('zh-CN') returns the ZH table alone with no en fallback, and t is strings[key] ?? key, so a missing zh row echoes the key and not.toBe(key) fires; an English value pasted into the zh table fails not.toBe(t(key, 'en-US')); a value without the full-width bracket fails startsWith('('). This matters because zhFlagged builds every zh expectation from t(key, 'zh-CN'), so without the guard a missing row would make expectation and render agree on value + key and pass vacuously.
  • (f) Changeset truth. Every sentence of .changeset/9652-designer-unknown-value-flags.md holds at head: the synthesised-row behaviour and the three wordings; the pre-fix literals at each call site; (not in object) on the existing engine.form.notInObject row with engine.form.notFound and engine.form.deprecated beside it in en and zh; the single engine.form.flaggedValue template deciding order and gap with zh setting no space; en-US text unchanged (the en table diff is additions only); the five covered sites as listed; the default reading useMetadataLocale() as the other shared editors do. It contains no line-address citation. One wording note, not a defect: "Every flag now comes from the designer's own string catalogue" is true for the three flags the changeset's first paragraph defines, while the two out-of-scope (invalid) and (not published) flags of the same class remain literals; the third paragraph's explicit site list bounds the sentence. The three pending changesets that name i18n.ts stay true: 6310-designer-formula-key-retired says designer.field.formula ('Formula (CEL)') in the designer catalogue is untouched, and that row is present at head with that value in en and '公式 (CEL)' in zh; 7125-dashboard-empty-state-keys-retired says engine.form.noRows is untouched and read at widgets.tsx, and it is present in both tables and read there; 8632-malformed-picklist-option-loud says two new strings land in the designer's en and zh tables, and this PR does not touch them.
  • (g) The new lint warning. react-refresh/only-export-components is configured 'warn' with allowConstantExport: true in eslint.config.js, and lint.yml states that --max-warnings is deliberately not set because the gate is about errors. _shared.tsx already exports the non-component helpers rosterFrom, spliceArray, insertArray, appendArray, moveArray and re-exports uniqueId, so the module already tripped this rule and Fast Refresh for it was already degraded; one more non-component export changes nothing material. Acceptable as landed. A non-component home (beside unique-id.ts, for example) would be marginally tidier but would not restore refresh for _shared.tsx while the other helpers remain, so it is not worth churn here.

② Semver level

patch on @object-ui/app-shell is right. objectui AGENTS.md, "版本号策略(version alignment)": "minor/patch 独立演进——objectstack 没动时不必跟发;objectui 自己的改动照常用 changeset 推进" and "推论:changeset 里不要声明 major …objectui 自身的破坏性变更也标 minor(在正文里写清 breaking 语义即可)". This change is a user-visible bug fix with no breaking semantics: it adds three catalogue rows (additive), rewires five call sites, and adds export function flagUnknownValue to inspectors/_shared.tsx, a module that the package's only public entry (exports["."] to dist/index.js, built from src/index.ts) does not re-export, so no public API moves. Nothing here is a feature or a break that would call for minor, and major is never declared (check-changeset-no-major exited 0 per the dev report; the frontmatter reads '@object-ui/app-shell': patch).

③ Boundary flags

  • Closing keyword: Fixes #9652 is the only closing keyword and #9652 is the only issue reference in the body.
  • Model identifiers: none in the PR title, the PR body, or the three commit messages. Each commit ends with the two-line trailer pair: a co-author line carrying the assistant's name and a vendor no-reply address, and a session line carrying https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C; neither carries a model or version token, and the body footer names the product only. Title and body contain zero angle brackets.
  • File surface: exactly 8 files, matching the claim: _shared.tsx, ViewColumnInspector.tsx, ViewVariantInspector.tsx, FlowNodeConfigField.tsx, FlowObjectListField.tsx, i18n.ts, one test beside them (inspectors/unknownValueFlag.i18n-9652.test.tsx) and .changeset/9652-designer-unknown-value-flags.md. ff58a68b1 and the head differ only by the changeset, as the report says.
  • Serial, finding(app-shell,plugin-designer,a11y): three more forms put a bare required * inside the control's label (ScreenView, metadata-admin SchemaForm, AppCreationWizard), so it is read as part of the name and the requirement is never exposed as a state #10367: objectui#10367 is an open issue (pm:dispatched, domain:ui), not a pull request (the pulls endpoint returns 404). Its branch origin/claude/issue-10367-required-marker-three-forms changes metadata-admin/SchemaForm.tsx, ScreenView.tsx, plugin-designer/src/AppCreationWizard.tsx, three tests and a changeset: zero overlap with this PR's 8 files.
  • Serial, other open PRs: of 18 open PRs, one touches a file in this surface. PR fix(app-shell): remove the ai:input config panel the palette never offered (objectui#8280) #10444 (claude/issue-8280-remove-ai-input-panel, created 2026-09-25T01:15:28Z, after the claim's 00:39Z serial read) removes six engine.inspector.pageBlock.*ai:input* rows from metadata-admin/i18n.ts at old lines near 730 and 2664, while this PR adds rows near 1004 and 2980. Disjoint hunks, no shared keys, no semantic dependency; whichever lands second needs a routine rebase only. Informational, not a breach by this PR. No other open PR touches metadata-admin/inspectors/ or metadata-admin/i18n.ts.
  • mergeable_state: unknown on the first two reads (lazy computation), then clean with mergeable: true. The PR is draft: true, opened as a draft by the fleet relay per the dev report.
  • Check-runs on f96ee760a263ebdd3a983d3ef17cfa1e5b7bdbec: 43 total; 40 success, 3 skipped, 0 failure, 0 in_progress. The non-success runs are all skips: Test (coverage), Test (coverage shard ${{ matrix.shard }}/4), dependabot. Two snapshots minutes apart were identical, so no 60s polling loop was needed; nothing is in progress.

Implemented-by: claude/issue-9652-inspector-unknown-value-i18n
Reviewed-by: session_01BP8CMtACxTdLjqR6rhd33C

VERDICT: PASS


Generated by Claude Code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants