This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit f94cfa5
fix(app-shell): the membership-tier and hook-object flags read in the designer's locale (objectui#10448) (#10551)
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 in
`inspectors/_shared.tsx`), so the `engine.form.flaggedValue` template
decides the order of value and flag and the gap between them.
| site | before | new catalogue row (en / zh) | locale channel |
|:--|:--|:--|:--|
| `FlowReferenceField.tsx`, `ReferenceCombobox` org-membership-level
strict select, a stored tier outside the enum | `` `${current}
(invalid)` `` | `engine.form.invalid` = `(invalid)` / `(无效)` |
`useMetadataLocale()` (the control has no `locale` prop) |
| `HookDefaultInspector.tsx`, object picker `pickerOptions`, a selected
object the live catalog does not list | `` `${n} (not published)` `` |
`engine.form.notPublished` = `(not published)` / `(未发布)` | the `locale`
prop the inspector already receives |
- The zh words are the catalogue's own: `engine.list.invalid` is `无效`,
`engine.studio.unpublished` is `未发布`. Both zh flags open with a
full-width bracket, as the comment above the zh flag rows requires.
- en is byte-identical: `{value} {flag}` with the en flag rebuilds the
pre-fix string exactly, and both en cases pin it as a literal.
- `pickerOptions` re-derives on the `locale` primitive, not on the `tr`
callback identity (AGENTS.md rule #10).
- `metadata-admin/i18n.ts`: one EN hunk and one ZH hunk, each directly
after that table's `engine.form.deprecated` row, inside the
`engine.form.*` flag block. Both are hunk-disjoint from the open PRs
objectui#10509 and objectui#10527, which also edit this file.
- Changeset: `.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.tsx` and
`inspectors/HookDefaultInspector.flag.i18n-10448.test.tsx`. Each has
three cases:
- a non-vacuity guard: the zh row is not the key, not the en row, and
opens with a full-width bracket;
- a zh case: the RENDERED text is the value followed directly by the
catalogue's zh flag. FlowReferenceField mounts an `I18nProvider` in zh.
HookDefaultInspector passes `locale` and waits for the object catalog to
answer first;
- an en control: the pre-fix literal, byte for byte.
**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 with `Received: "sales_manager
(invalid)"`. The Hook zh case found no checkbox with the zh-flagged
name; the checkbox on screen was named `ghost_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 gave `Test Files 10 passed (10)` and `Tests 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 HEAD` empty.
- FlowReferenceField: `Expected: "sales_manager(无效)"`, `Received:
"sales_manager (invalid)"`, `Tests 1 failed | 2 passed (3)`.
- HookDefaultInspector: no checkbox named `ghost_object(未发布)`; the
rendered name was `ghost_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
--listFiles` lists both new test files.
- Tests, narrowed and declared. The full `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
whole `metadata-admin/inspectors/` directory; every test file outside it
that names FlowReferenceField, HookDefaultInspector,
FlowObjectListField, FlowNodeConfigField, ReferenceCombobox or
default-inspector-registry; every test naming `metadata-admin/i18n`; the
metadata-admin i18n suites; and the four
`scripts/__tests__/check-i18n-*` suites. Result: `Test Files 117 passed
(117)`, `Tests 1614 passed | 1 skipped (1615)`.
- Gates, each exit 0: `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-bytes` OK; `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-shape` OK;
`check:test-path-roots` OK; `check:changeset-claims` (report-only: 3
pending changesets name `i18n.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.
- eslint on the five changed ts/tsx files (`--no-inline-config`, JSON
output): 5 files, 0 errors, 10 warnings. All 10 are in
`FlowReferenceField.tsx` and 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.js` sets no `parserOptions`, so linting
is not type-aware and this diff cannot move the verdict on any untouched
file.
## Acceptance notes
- Out of scope, handed to the seat, not changed here:
HookDefaultInspector's object picker flags a selected object `(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's `list` pending, and then rejected, rendered a
checkbox named `account (not published)` both times. This is the same
class as objectui#8862 / objectui#9651 (the in-flight and failed roster
for `ViewColumnInspector`). This PR's Hook pin waits for the catalog to
answer, so it does not pin that behaviour in either direction.
- Out of scope: both inspectors still render other hard-coded English
under zh, for example `All objects (*)`, `Pick at least one object (or
All objects).`, `Select at least one event.` and the `manager` cell's
`Resolved automatically`. A zh-CN probe confirmed all four.
---
_Generated by [Claude
Code](https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 93a689d commit f94cfa5
6 files changed
Lines changed: 210 additions & 4 deletions
File tree
- .changeset
- packages/app-shell/src/views/metadata-admin
- inspectors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1017 | 1021 | | |
1018 | 1022 | | |
1019 | 1023 | | |
| |||
2998 | 3002 | | |
2999 | 3003 | | |
3000 | 3004 | | |
| 3005 | + | |
| 3006 | + | |
3001 | 3007 | | |
3002 | 3008 | | |
3003 | 3009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
613 | 615 | | |
614 | 616 | | |
615 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
| |||
700 | 705 | | |
701 | 706 | | |
702 | 707 | | |
703 | | - | |
| 708 | + | |
704 | 709 | | |
705 | 710 | | |
706 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | | - | |
| 137 | + | |
135 | 138 | | |
136 | | - | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
0 commit comments