Repository navigation
fix(app-shell): the membership-tier and hook-object flags read in the designer's locale (objectui#10448) - #10551
Conversation
… designer's locale FlowReferenceField's org-membership-level select flagged a stored tier outside its vocabulary with a hard-coded `(invalid)`, and HookDefaultInspector's object picker flagged a selected object missing from the live catalog with a hard-coded `(not published)`. Both now go through `flagUnknownValue` with two new designer-catalogue rows, `engine.form.invalid` and `engine.form.notPublished` (en and zh), beside `engine.form.notFound` / `engine.form.deprecated`. en-US is unchanged. ReferenceCombobox has no locale prop and reads `useMetadataLocale()`; HookDefaultInspector uses the `locale` prop it already receives. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
|
changeset-claim-re-read
|
✅ 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
|
Contract reviewServed-tier: Read: card #10448 body plus 3 comments (triage 5827608071, Claim 5828735025, os-dev-report 5829371758); PR #10551 body and 6-file list; precedent PR #10445 body and 8-file list; ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #10448
Clause-②: no — two designer display strings move onto the catalogue; no export, schema or accept set moves.
What changes
Two designer unknown-value flags were English template literals. Both now go through
flagUnknownValue(the objectui#9652 device ininspectors/_shared.tsx), so theengine.form.flaggedValuetemplate decides the order of value and flag and the gap between them.FlowReferenceField.tsx,ReferenceComboboxorg-membership-level strict select, a stored tier outside the enum`${current} (invalid)`engine.form.invalid=(invalid)/(无效)useMetadataLocale()(the control has nolocaleprop)HookDefaultInspector.tsx, object pickerpickerOptions, a selected object the live catalog does not list`${n} (not published)`engine.form.notPublished=(not published)/(未发布)localeprop the inspector already receivesengine.list.invalidis无效,engine.studio.unpublishedis未发布. Both zh flags open with a full-width bracket, as the comment above the zh flag rows requires.{value} {flag}with the en flag rebuilds the pre-fix string exactly, and both en cases pin it as a literal.pickerOptionsre-derives on thelocaleprimitive, not on thetrcallback identity (AGENTS.md rule [WIP] Enhance every detail of the designer #10).metadata-admin/i18n.ts: one EN hunk and one ZH hunk, each directly after that table'sengine.form.deprecatedrow, inside theengine.form.*flag block. Both are hunk-disjoint from the open PRs objectui#10509 and objectui#10527, which also edit this file..changeset/10448-designer-invalid-not-published-flags.md('@object-ui/app-shell': patch).Pins: red on base, green on head
New files, one beside each site:
inspectors/FlowReferenceField.flag.i18n-10448.test.tsxandinspectors/HookDefaultInspector.flag.i18n-10448.test.tsx. Each has three cases:I18nProviderin zh. HookDefaultInspector passeslocaleand waits for the object catalog to answer first;Red on base
111fa4c94(only the two new test files added):Tests 4 failed | 2 passed (6). The 2 passes are the en controls. The FlowReferenceField zh case failed withReceived: "sales_manager (invalid)". The Hook zh case found no checkbox with the zh-flagged name; the checkbox on screen was namedghost_object (not published). Both guards were red (the key was echoed).Green on head
e337f8c1e: those two files, the objectui#9652 flag suite and the seven existing FlowReferenceField / HookDefaultInspector suites gaveTest Files 10 passed (10)andTests 75 passed (75).Ablation on the committed head. The catalogue rows stayed; only the site went back to its English literal. It ran through
ablation-replace.mjs, which reported: anchor 1 to 0, blob changed, restored blob equal to HEAD,git diff HEADempty.Expected: "sales_manager(无效)",Received: "sales_manager (invalid)",Tests 1 failed | 2 passed (3).ghost_object(未发布); the rendered name wasghost_object (not published).Tests 1 failed | 2 passed (3).Local verification (head
e337f8c1e)pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json), after building the@object-ui/app-shell^...closure:VERDICT command-exit 0.tsc -p tsconfig.test.json --listFileslists both new test files.packages/app-shell/run did not finish inside the foreground cap (killed at 570 s, exit 124), so it is NOT MEASURED locally; CI runs it. The narrowed set had 117 files: the wholemetadata-admin/inspectors/directory; every test file outside it that names FlowReferenceField, HookDefaultInspector, FlowObjectListField, FlowNodeConfigField, ReferenceCombobox or default-inspector-registry; every test namingmetadata-admin/i18n; the metadata-admin i18n suites; and the fourscripts/__tests__/check-i18n-*suites. Result:Test Files 117 passed (117),Tests 1614 passed | 1 skipped (1615).check-changeset-presence(5 source files of 1 released package, 1 changeset);check:new-line-citations(VERDICT new-cross-file-line-citations: 0 new citation(s));check:control-bytesOK;check:i18n-keys;check:i18n-drift(0 en values changed, 2 keys added);check:i18n-designer-parity(every en row has a zh row with the same placeholders);check:i18n-dead-keys;check:vi-mock-specifiers/-inherit/-override-shapeOK;check:test-path-rootsOK;check:changeset-claims(report-only: 3 pending changesets namei18n.ts, and all three still hold);check:pending-changeset-literals;check-changeset-no-major;check:designer-field-key-parity;check-type-check-coverage;check:unreferenced-sources.check:eager-locale-catalogues: PREREQUISITE NOT MET (it reads a built console bundle), so NOT MEASURED.--no-inline-config, JSON output): 5 files, 0 errors, 10 warnings. All 10 are inFlowReferenceField.tsxand on lines this PR does not touch; the base blob of that file also gives 10. HookDefaultInspector.tsx gives 0 on base and on head.eslint.config.jssets noparserOptions, so linting is not type-aware and this diff cannot move the verdict on any untouched file.Acceptance notes
(not published)while the object catalog is still loading, and again after that load fails, with no failure notice. A probe of the real component with the metadata client'slistpending, and then rejected, rendered a checkbox namedaccount (not published)both times. This is the same class as objectui#8862 / objectui#9651 (the in-flight and failed roster forViewColumnInspector). This PR's Hook pin waits for the catalog to answer, so it does not pin that behaviour in either direction.All objects (*),Pick at least one object (or All objects).,Select at least one event.and themanagercell'sResolved automatically. A zh-CN probe confirmed all four.Generated by Claude Code