Repository navigation
fix(app-shell): the dashboard preview canvas and the flow Debug run read the designer locale (objectui#10835) - #10850
Conversation
…ead the designer locale (objectui#10835) DashboardPreview's empty-canvas message, error-boundary hint, loading text and selected-widget strip, FlowSimulatorPanel's step status chip and out-edge error result, and every note and error sentence FlowSimulator itself writes on a step now read new engine.* rows in the designer locale. Each en row is the literal it replaces. The simulator writes them in the locale its constructor already took for validateFlowDraft; unevaluableVisibleWhen passes that locale on to screenVisibleWhenScopeError. The engine.flowRef.notAScreenField* en controls in the objectui#10804 pin file read the en rows through tFormat. One changeset declares an app-shell patch. Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN Co-Authored-By: Claude <noreply@anthropic.com>
|
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: This is round 2, reviewed in-seat as a narrow re-review. It supersedes PR objectui#10845 and is checked against that PR's round-1 FAIL record, ① Derived judgmentsThis is the same change. I compared the blob of every path in this PR's diff against PR objectui#10845's head
So round 1's judgments on the seam, completeness, the zh rows, the bounded The changeset: both FAIL items are resolved verbatim.
The trailer exposure is resolved.
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
…he CEL try-it dialog read the designer locale (objectui#10862, slice 1) (objectstack-ai#10871) Part of objectstack-ai#10862 Clause-②: no — rows are added and a locale is passed; each en row equals today's literal. No declared surface or stored value moves. Slice 1 of 3 (the flow / automation previews), per triage `5860733428`: one card, landed in slices by preview family. objectstack-ai#10862 stays open for the object / data slice and the admin slice. Dispatched by the `domain:ui` seat 4 PM (claim `5860844842`, session `session_01MCg3z5cGrV51xEddpGcxEY`), implemented on `claude/issue-10862-designer-english-slice-1` as two commits on `main` `a7fd877`: `d9346a0` (the slice) and `aa8601e` (the CI fix and the review round, see "CI fix" below). It uses the objectui#10832 / objectstack-ai#10850 / objectstack-ai#10857 shape: `engine.*` rows whose en value is the literal each replaces, plus zh, read in the designer locale the surface already receives. ## What changed All under `packages/app-shell/src/views/metadata-admin/`. - **`previews/ActionPreview.tsx`** (the card's site 2 and its site-4 census). The pills ("AI: opted out", "AI: exposed", "refresh after", and the type / object / variant labels), "Locations:", "Requires:", "Visible when", "Disabled when", "On click" and the handler sentence for every action type, "First asks:", "On success:", the "Where it appears" section with its capability note and the placement frames' mock text, the test-request panel, the input-dialog mock (its buttons, the carry-over line, the param placeholders and notes) and the result-dialog mock's defaults. - **`previews/AgentPreview.tsx`, `SkillPreview.tsx`, `ToolPreview.tsx`, `JobPreview.tsx`** (site 4's census). Empty prompts, section headings, pills, table headers, notes, the "Try in chat" and "Open in API Console" links and their tooltips, the skill's `missing` cell and its tooltip, and the job's next-run list. - **`celAuthoring.ts`** (site 3). `testRunCelPredicate` hands the two sentences it writes itself back as a `messageKey` instead of English text: "The predicate is empty." (`engine.celTest.predicateEmpty`) and the "Evaluation failed." fallback, which reuses `engine.flowSim.note.evaluationFailed`: same English, same meaning (a CEL evaluation failed and the engine gave no message) at all five sites that read it. The engine's own message passes through as written, as `message`. The module takes no locale and imports nothing at load. - **`CelTestRunDialog.tsx`**, the one place those two sentences render. Its banner reads the `messageKey` through the `t` its host binds to the designer locale. Bounded in-place fix in the same file, same defect class and same gates: its own sample-JSON refusal "expected a JSON object." reads `engine.celTest.notObject` through the same `t`. The seat should add this file to the claim's surface; it is where the dry run's words are read. - **`i18n.ts`.** 128 new en rows, each the literal it replaces, and 128 zh rows beside them. No existing row moves. - **Pins.** `previews/automationPreviews.i18n-10862.test.tsx` and `CelTestRunDialog.i18n-10862.test.tsx`, 66 cases (see below). - **Changeset.** `.changeset/10862-designer-automation-previews-locale.md`, `'@object-ui/app-shell': patch`. ## The seam - **The five previews read the `locale` prop** their `MetadataPreviewProps` already carry. Every production host passes `useMetadataLocale()` as that prop: `ResourceEditPage`, `EmbeddedItemEditor` and `StudioDesignSurface`. So no new prop and no hook: the preview reads what its host hands it. The prop is also what the gallery's `?locale=` feeds, so these previews follow it there (the hook-read gap disclosed on objectui#10857 does not apply to them). - **The dry run's words are read where the translator already is.** `CelTestRunDialog` has one locale source, the `t` its only host (`PermissionMatrixEditor`) binds from `useMetadataLocale()`. It translates the `messageKey` the dry run hands back. No locale is threaded through `PermissionAdvancedFacets`, and `celAuthoring.ts` stays free of any import at load, as it was at the base. - **New static edges:** only the five previews now import `../i18n.js`, and each already reached it through `PreviewShell` (objectui#10857). A static-import closure diff of all 840 test files in `packages/app-shell` against the base finds no test whose closure grew at `aa8601e`. The same instrument lists 19 at `d9346a0`, the skew test among them, as its lit control. `check:eager-closure` needs a console build and was not run here (NOT MEASURED, left to CI). ## Census, confirmed per file Counts are rendered English sites, read at source and each pinned through the real component. "Rows" below counts the rows each file reads. A plural pair or a branch pair of one literal is two rows, for example `paramsOne` / `paramsOther`. | File | Sites converted | Not counted, and why | |---|---|---| | `ActionPreview.tsx` | 58: 57 new rows plus the reused `engine.cancel` | `INHERITED_TARGET` "(inherited from the bound field)" is never rendered: it is a non-empty stand-in handed to `paramDegradesWithoutTarget`. Identifiers: the location frame labels (`record_header` and the rest), the `reference` code span, the default body language `expression`, the `param_N` fallback name and the component token. Protocol text: the "HTTP 200 OK" status line. Author data: label, name, target, confirm and success text, param labels, placeholders and help text, option labels, result-dialog title, description, acknowledge text and field labels, script source. Producer text: the fetch error and the response body. | | `AgentPreview.tsx` | 19 | Identifiers: the rail keys (`maxIterations`, `short.maxMessages`, `long.enabled`, `long.store`). Author data: provider, model, guardrail keys and values, permissions, label, role, instructions. | | `SkillPreview.tsx` | 16 | Author data: tool names and the condition cells. | | `ToolPreview.tsx` | 14 | Identifiers: the JSON-Schema type labels (`string`, `any`, `ref`, array forms) and the example call's JSON with its type stubs. Author data: parameter names and descriptions. | | `JobPreview.tsx` | 20 | "Cron" is the name of the syntax and reads the same in every locale. Compact durations (`5m`, `30s`, `2h`) are the notation the schedule is written in. Author data: timezone, handler key and label. The fire times were already formatted in the display locale (objectui#9909). | | `celAuthoring.ts` | 2 | Its two lint advisories are not in this slice; see "Out of scope" below. | | `CelTestRunDialog.tsx` | 1 (in place) | The JSON parser's own message passes through as written. | The five files' premise holds at the base `a7fd877`: none of them imported the designer `t`. `JobPreview` imported `@object-ui/i18n` only for `useDisplayLocale()`. ## CI fix (`aa8601e`) - **Symptom.** `Test (shard 2/8)` was red at `d9346a0`. `clientValidation.skew.test.tsx` failed at import with `[vitest] No "VIEW_FILTER_LIST_VALUE_OPERATORS" export is defined on the "@objectstack/spec/ui" mock`. - **Root cause, this PR's.** - `d9346a0` gave `celAuthoring.ts` a static import of `./i18n.js`. - `i18n.ts` imports `useObjectTranslation` from `@object-ui/i18n`. Its `utils/number-display.ts` value-re-exports from `@object-ui/core`, whose index re-exports `utils/filter-converter`. That module spreads `VIEW_FILTER_LIST_VALUE_OPERATORS` from `@objectstack/spec/ui` at load. - At the base, `celAuthoring.ts` reached `@object-ui/core` only through a dynamic `import()`. So every importer of `lintCelPredicate`, `clientValidation.ts` among them, now loaded that graph eagerly. - The skew test replaces `@objectstack/spec/ui` wholesale, so it failed before any case ran. - It is the only test in the repo that mocks `@objectstack/spec/ui`. The other 18 tests whose closure grew were green at `d9346a0`, but they loaded the extra graph. - **Fix, and why this one.** The dry run returns its two sentences as catalogue keys, and the dialog translates them through the `t` it already holds. - Its reach is the two files that own the seam. It removes the edge rather than working around it in one test. - `celAuthoring.ts` is import-free again, so no mock anywhere can sit upstream of the catalogue through it. - The dialog loses its second locale source. - The alternative, making the skew mock inherit the real module, would have left the new edge in place for all 19 tests. It would also have left it for any later full-replacement mock of `@objectstack/spec/ui`, `@object-ui/core` or `@object-ui/i18n` upstream of `celAuthoring.ts`. The test is untouched. - **Reproduced before, green after**, each through the verify lock: - At `d9346a0`: `Test Files 1 failed (1)`, `Tests no tests`, with the error above at `filter-converter.ts` and `element-data-source.ts`. - At `aa8601e`: the skew file's 4 cases pass, `Test Files 3 passed (3)`, `Tests 70 passed (70)` with the two pin files. - **Review round, same commit.** `renderFieldMock`'s lookup placeholder keeps the base's nullish reading of `reference` (`reference ?? 'records'`): an empty string is not "records". - A new pin covers the empty-string edge in en and zh. - Measured: through the real component, a lookup param with `reference: ''` never reaches the Search placeholder. `paramDegradesWithoutTarget` reads the empty target as missing, so it renders the degraded record-id box and the no-reference note. - The en case passes on the base `ActionPreview` source too (base blob restored, `git diff HEAD` empty), so the edge renders byte-equal to the base. ## H1: reproduced on the base, under zh-CN, through the real components This is the red run of the new pins, run at `d9346a0`. The seven component sources were at the base `a7fd877`: the five previews, `celAuthoring.ts` and `CelTestRunDialog.tsx`. For each, the blob equalled the base blob. The rows and pins were at HEAD. A trap restored the sources afterwards: each blob equalled HEAD, and `git diff HEAD` was 0 bytes. Result: `Tests 31 failed | 33 passed (64)`. - The 31 failures are exactly the zh cases that carry a site. The one zh case that stayed green is the producer pass-through control. - All 32 en controls passed on the base sources. Between them they render all 128 new en rows and the two reused ones. So each en row renders exactly what the base literal rendered. - The failure diffs list 125 unrendered zh sites across the list-shaped cases. - Quoted from the diffs: "Navigate to /orders" and "Run flow approve_order" where zh was expected, and "The predicate is empty." and "Evaluation failed." in the zh dialog's error banner, under its already-zh title 求值错误. Lit control, green on the base on the same mount: the dialog's error-banner title (`perm.cel.test.error`, 求值错误). ## Pins and ablation The pins use the objectui#10748 / objectstack-ai#10804 / objectstack-ai#10835 / objectstack-ai#10848 harness. Each case mounts the real preview or dialog under `I18nProvider` in its language and reads what rendered: an element's whole text, a `title`, or a `placeholder`. Each zh value is read back from the catalogue and guarded by `zhRow` (not the echoed key, not the en row). Each en value is read through `t` / `tFormat` for `en-US`. On the same mounts, each case checks a sample of author data, identifiers and producer text, and expects them verbatim in both locales. Two stand-ins are used: - `fetch` is stubbed so the test-request panel shows its sending and network-error states. - The `__setCelFormulaLoader` seam hands the dry run an engine whose failure carries no message. That is the only way to reach the fallback. The empty-predicate result is reached through the real dialog: the selected clause's predicate is cleared by a re-render while the dialog is open. Offline cross-check: every one of the 128 new rows is read by the code and asserted by a pin. - **Head** `aa8601e`: `Tests 66 passed (66)`. The two pin files are also inside the related-suite run below. - **Ablation**, one mutation, through `ablation-replace.mjs` in wrap mode on `aa8601e`, on the seam as it now stands: - Change: in `CelTestRunDialog`'s banner, `{outcome.messageKey ? t(outcome.messageKey) : outcome.message}` became `{outcome.message}`. - Anchor x1 → x0, replacement x0 → x1, blob `ea530a7049` → `163cf26660`. - Result: `Tests 4 failed | 4 passed (8)`. The 4 failures are exactly the two self-worded dry-run sentences, in zh and in en. The producer pass-through and sample-JSON cases stayed green. - Restored: blob == HEAD (`ea530a7049`), and `git diff HEAD` is empty. - The earlier ablation at `d9346a0` targeted the `useMetadataLocale()` read that `aa8601e` removed. It gave `2 failed | 62 passed (64)`. - The pins import the sources by relative path, so no `dist/` sits between the mutation and the run. ## Gates Every line below was run on HEAD `aa8601e` unless it says `d9346a0`. - **Related suites, 174 files, in three locked batches: 59 / 56 / 59 files, 624 / 636 / 1123 tests, all passed.** They are the 164 files run at `d9346a0` plus the tests that name `celAuthoring` or `clientValidation`, the skew test among them. They cover: - the whole `previews/` tree; - every test file that names one of the seven changed components, `PermissionAdvancedFacets` or `PermissionMatrixEditor`; - the metadata-admin i18n pin files; - the i18n gate scripts' own suites and the icon-record and spec-symbol ledger suites. - **Declared narrowing.** The full `packages/app-shell` suite is left to CI. - **Type check.** `pnpm --filter @object-ui/app-shell type-check` (`tsc --noEmit && tsc -p tsconfig.test.json`) exits 0. The dependency closure was built first (`turbo run build --filter='@object-ui/app-shell^...'`, 28/28 tasks). `--listFilesOnly` shows that `tsconfig.test.json` compiles both new pin files. - **eslint on the 10 changed source and test files**, at `d9346a0`. At `aa8601e`, the 6 files it touched have 0 errors and 1 warning: the same `set-state-in-effect` the base `CelTestRunDialog` carries. - Every file is inside eslint's config (`--print-config` exits 0 for each). - `--format json`: 10 files, 0 errors, 9 warnings. The base versions of the same files carry the same 9: `no-explicit-any` ×4 in `AgentPreview`, ×2 in `JobPreview`, `exhaustive-deps` ×2 in `ToolPreview` and `set-state-in-effect` ×1 in `CelTestRunDialog`. - No type-aware linting is configured (no `projectService` or `project` in `eslint.config.js`), and no `eslint-rules/` rule reads the disk. So this diff cannot change any verdict on an untouched file. The repo-wide lint is CI's. - **The remaining gates.** - `check:i18n-designer-parity` 0: "Every en row has a zh row, and every shared row carries the same placeholders." - `check:i18n-drift` 0: "No designer-table en value changed in this range." (128 keys added, 0 en values changed.) - `check:i18n-keys` 0 and `check:designer-field-key-parity` 0. - `check:new-line-citations` 0 (0 new) and `check:control-bytes` 0. - `check:vi-mock-specifiers`, `check:vi-mock-inherit` and `check:vi-mock-override-shape` 0, re-run at `aa8601e`. - `check:test-path-roots` 0, `check:unreferenced-sources` 0 and `check:icon-record-names` 0. - `check:changeset-claims` 0. It is report-only and lists four pending changesets that name a touched file: 6310, 6329, 7125 and 8632. Each paragraph was read and is still true. - `check:pending-changeset-literals` 0. - `check-changeset-presence` 0, `check-changeset-no-major` 0 and `check-changeset-fixed` 0. - `check-governed-queue-guard --test`: NOT GOVERNED (11 paths). - `check:i18n-dead-keys` is report-only. None of the 128 new rows is listed as a candidate. - **NOT MEASURED: a browser drive of the preview gallery.** Reason: the console's Vite dev server exited at startup in this worktree with a dependency-resolution error on `react-map-gl`. The error is outside this diff and was not investigated. The pins above read the same components the gallery mounts. ## Out of scope - **`celAuthoring.ts`'s two lint advisories render English under zh-CN.** One is the local fallback of the wrong-root advisory ("… is not the row on this surface …"). The other is the pushdown advisory ("This read filter isn't a simple field comparison (…) …"). `CelPredicateField` shows both beneath the RLS and field-rule CEL editors. Localizing them needs a locale through `lintCelPredicate` and its callers: `CelPredicateField`, `ConditionalFormattingEditor`, `ConditionBuilder`, `ObjectFieldInspector` and `clientValidation`. All of those are outside this slice's surface. This is a read at source, not a browser drive. Carrier: this card, for a later slice. ## Pending changesets - `.changeset/olive-crabs-visit.md` says the agent rail's empty collection renders `EmptyDescription` "with the text "No values set."". After this PR that sentence is true in en. Under zh the row is now localized: 未设置任何值。 ## Acceptance notes - `describeHandler`'s form sentence names the path "/console/forms/NAME". `AgentPreview`'s own note says the console declares no path beginning with `/console`. The text is kept byte for byte, per the family rule. It is an observation only, not a card. Carrier: none. --- _Generated by [Claude Code](https://claude.ai/code/session_01MCg3z5cGrV51xEddpGcxEY)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…he designer locale (objectui#10862, slice 2) (objectstack-ai#10880) Part of objectstack-ai#10862 Clause-②: no — rows are added and a locale is passed; each en row equals today's literal. No declared surface or stored value moves. Slice 2 of 3 (the admin previews and the CEL lint advisories), per triage `5860733428` and the slice-1 ACCEPT `5861649175`: one card, landed in slices by preview family. The card stays open for slice 3 (the object / data previews and the ten `fallbackHint` literals). Dispatched by the `domain:ui` seat 4 PM (claim `5861770181`, session `session_01MCg3z5cGrV51xEddpGcxEY`), implemented on `claude/issue-10862-designer-english-slice-2` as two commits on `main` `309d17b`. It uses the objectui#10832 / objectstack-ai#10850 / objectstack-ai#10857 / objectstack-ai#10871 shape: `engine.*` rows whose en value is the literal each replaces, plus zh, read in the designer locale the surface already receives. No second catalogue. ## What changed All under `packages/app-shell/src/views/metadata-admin/`. - **The seven admin previews** (`previews/AppPreview.tsx`, `BookPreview.tsx`, `DatasourcePreview.tsx`, `EmailTemplatePreview.tsx`, `PermissionPreview.tsx`, `PositionPreview.tsx`, `TranslationPreview.tsx`) read 104 new `engine.*Preview.*` rows in the `locale` prop every production host already passes (`ResourceEditPage`, `EmbeddedItemEditor` and `StudioDesignSurface` hand it `useMetadataLocale()`). A sentence with a code span inside it (`navigation`, `groups`, `include`, `pages`, the `{{var}}` sample, a position's name) is one row with a `{token}` hole that the code span fills, through `withNodes` in a new `previews/row-nodes.ts` (the same function slice 1 wrote locally in `ActionPreview`), so the sentence keeps its own order in zh. `TranslationPreview`'s local `locale` (the bundle's own language, author data) is renamed `bundleLocale` so the prop can carry the designer's. - **`celAuthoring.ts`** (the two advisories the slice-1 ACCEPT carried here). `lintCelPredicate` returns its two self-worded advisories as a catalogue key plus the values its holes take: the wrong-layer root's local sentence (`engine.celLint.notTheRow`, values `identifier` / `canonical`) and the non-pushdown-able `USING` filter (`engine.celLint.notPushdownable`, value `detail`, the engine's own reason). `CelLintIssue` is now a union: an error, a warning in its producer's words (`message`), or a warning in objectui's words (`messageKey` + `messageVars`). **No import is added to `celAuthoring.ts`**: it still imports nothing at load (the three dynamic `import()`s only), the slice-1 seam. The `@objectstack/lint` verdict branch keeps shipping that package's message as written. - **`CelPredicateField.tsx`** renders every finding through `issueText`: the producer's message as written, or the keyed row read through the designer `t` its host already binds to the designer locale (`PermissionAdvancedFacets` via `PermissionMatrixEditor`, `ConditionBuilder`, `ObjectFieldInspector`, and `ViewVariantInspector` for `ConditionalFormattingEditor`), with the holes filled the way `tFormat` fills them. No new import there either. - **`clientValidation.ts` is unchanged, by decision.** It is `lintCelPredicate`'s other caller, and it keeps errors only (`if (f.severity !== 'error') continue;`, then `f.message`). A keyed issue is typed as a warning only, so it never reaches that path, and the compiler proves it: after the error filter `f.message` is a `string`, and `tsc` passes. Nothing it surfaces changes. - **`i18n.ts`**: 106 en rows (each equal to the replaced literal) and 106 zh rows, placeholders identical. - One `.changeset/10862-designer-admin-previews-locale.md` (`patch` for `@object-ui/app-shell`). ## Census, confirmed per file (card site 4 for these seven, plus the two advisories) Every census hit was read at source before it was counted. A site is one rendered designer word: an element's text, a `title`, an `aria-label` or a `placeholder`. | file | rows | rendered sites | not counted, and why | |:--|--:|--:|:--| | `AppPreview` | 8 | 8 | `hint` (PreviewShell no longer renders it); nav kinds (spec enum tokens); routes and target names; the app's label and name | | `BookPreview` | 22 | 22 | `hint`; the `(unnamed)` group-label fallback never renders (a group with neither key nor label is dropped first); `#N` order notation; doc names, badges, hrefs | | `DatasourcePreview` | 10 | 11 | `SSL` (the protocol's name); `∅`, the redaction dots and `[N]` notation; `hint`; config keys and values (the key-count row serves the config table and the side blocks) | | `EmailTemplatePreview` | 9 | 9 | the em-dash placeholder; `hint`; variable names and envelope values | | `PermissionPreview` | 37 | 39 | the C / R / U / D / E / T / V* / M* column letters (the legend spells them out); the access-scope tokens (compacted enum values); the field-security tooltip (spec key notation); tab visibility values; `hint` (granted / not granted serve the cell `aria-label`s and the legend) | | `PositionPreview` | 4 | 4 | `hint`; the position's label, name and description | | `TranslationPreview` | 14 | 14 | `hint`; the coverage ratio notation; sample keys and values; the bundle's own locale | | `celAuthoring.ts` | 2 | 2 | engine errors and warnings, and the `@objectstack/lint` field-rule message (producer text) | Totals: 106 rows, 109 rendered sites, every one pinned. ## Tests All at HEAD `5cac47f`. - **Pins** (new): `previews/adminPreviews.i18n-10862-s2.test.tsx` (38 cases: each of the 19 mounts in zh and in en; 106 site assertions per language, plus the email template's `srcdoc` empty-body note) and `CelPredicateField.i18n-10862-s2.test.tsx` (6 cases: each advisory driven through the real field against the real engine in zh and en, plus a producer control per language where a covered slot ships `@objectstack/lint`'s message as written). Every zh expectation is read back from the catalogue and guarded against a missing row or an English one; every en case reads the en row through `t` / `tFormat` for `en-US`. - **Red run A** (the seven preview sources checked out at base `309d17b`, blobs equal base; rows, helper and pins at HEAD; trap restore, blobs equal HEAD, `git diff HEAD` 0 bytes, porcelain 0 lines): `Tests 19 failed | 19 passed (38)`. The 19 failures are exactly the zh cases and list all 106 zh sites unrendered; all 19 en controls pass against the base sources, so each en row renders exactly what the literal rendered. - **Red run B** (`celAuthoring.ts` and `CelPredicateField.tsx` at base, same restore proof): `Tests 4 failed | 4 passed (8)`. The four advisory cases fail (no keyed advisory at base) and both producer controls pass. A one-off test in the same run, deleted on the way out and never committed, confirmed that with `celAuthoring.ts` at base each advisory's literal equals `tFormat` of its en row, byte for byte. - **Ablation** via `ablation-replace.mjs` wrap mode on `PermissionPreview.tsx`: the legend's locale thread cut (anchor 1 to 0, replacement 0 to 1, blob `ff4805f` to `964536c`) gives `Tests 1 failed | 37 passed (38)`, that one being the zh matrix case, listing exactly the four legend sites; the cells' `aria-label`s stay zh. Restored: blob equals HEAD `ff4805f`, `git diff HEAD` empty. The pins import the sources by relative path, so no `dist` sits between mutation and run. - **Existing tests touched**, because the two advisory sentences left the code: `celAuthoring.test.ts` and `celAuthoring.fieldRuleVerdict-9318.test.ts` read a finding's English through the catalogue (`en(i)`), so every regex keeps checking the words an en author reads; `CelPredicateField.test.tsx` and `ConditionalFormattingEditor.test.tsx` mount with an identity `t` and now expect the key, as they already did for `perm.cel.valid`. - **Related suites**, 240 files in four locked batches: the whole `previews/` tree, every test naming a changed component or a host of `CelPredicateField`, every `clientValidation` suite (the skew test included), the i18n pins and the gate-script suites. Results: `Test Files 60 passed (60) Tests 507 passed (507)`, `Test Files 56 passed (56) Tests 700 passed (700)`, `Test Files 57 passed (57) Tests 779 passed (779)`, `Test Files 67 passed (67) Tests 1580 passed (1580)`, each `VERDICT command-exit 0`. - **Static closure** (the slice-1 lesson). New static edges: the seven previews to `../i18n.js`, which each already reached through `./PreviewShell.js`, so no module set grows there; four previews to `./row-nodes.js`, a new module that imports only `react` and runs nothing at load; and the two `celAuthoring` test files to `./i18n`, both run above. `celAuthoring.ts` and `CelPredicateField.tsx` gain no import. Every test that mocks the designer `i18n` module inherits the original (`importOriginal`), so none loses `t` or `tFormat`. - **Type check**: `turbo run build --filter=@object-ui/app-shell^...` (28 of 28 tasks), then `pnpm --filter @object-ui/app-shell type-check` (script echoed: `tsc --noEmit && tsc -p tsconfig.test.json`), exit 0. `tsc -p tsconfig.test.json --listFilesOnly` lists both new pin files and the four touched tests. - Declared narrowing: the full `packages/app-shell` suite, repo-wide lint and `check:eager-closure` are CI's. ## Gates (at `5cac47f`, each exit 0) `check:i18n-designer-parity` (Every en row has a zh row, and every shared row carries the same placeholders.) · `check:i18n-drift` (106 key(s) added, 0 en values changed) · `check:i18n-keys` · `check:designer-field-key-parity` · `check:control-bytes` · `check:new-line-citations` (0 new citations) · `check:vi-mock-specifiers` / `check:vi-mock-inherit` / `check:vi-mock-override-shape` · `check:test-path-roots` · `check:unreferenced-sources` · `check:icon-record-names` · `check:esm-specifiers` · `check:self-import` · `check:phantom-deps` · `check:handler-key-reads` · `check:metadata-write-doors` · `check:action-forward-parity` · `check:element-data-source-declaration` · `check:changeset-claims` (report-only: three pending changesets name `i18n.ts`, 6310, 7125 and 8632; each paragraph read, still true) · `check:pending-changeset-literals` · `check-changeset-presence` · `check-changeset-no-major` · `check-changeset-fixed` · `check-changeset-overwrite` · `check-governed-queue-guard --test` (NOT GOVERNED, 18 paths) · `check:i18n-dead-keys` (report-only; none of the 106 new rows listed). ESLint on the 17 changed source and test files (`--format json`, 17 files): 0 errors with inline config honoured, as the package's own `eslint .` runs; every modified file carries the same error and warning counts as its base blob, with and without `--no-inline-config` (under the latter `AppPreview` shows the one inline-disabled `react-hooks/static-components` finding its base blob shows too), and the three new files carry none; `--print-config` resolves for all 17; the config enables no type-aware linting and no local rule reads the disk, so no untouched file can change verdict. NOT MEASURED: `check:eager-closure` (needs a console build; the only new module on any static path is `row-nodes.ts`). A browser drive of the preview gallery, whose `I18nProvider` mounts in `en` (the dev-harness gap the card names as out of scope). ## Acceptance notes - **File outside the claim's list**: `previews/row-nodes.ts`, the shared `withNodes` four of the previews read. Same defect class, no behaviour of its own, reachable (`check:unreferenced-sources` OK). - `ActionPreview` still carries its own copy of `withNodes` from slice 1. Moving it onto the shared helper is a refactor, not a locale fix; whoever next edits `ActionPreview` can take it. - **Same family, not in the census**: `external/ExternalDatasourcePanel.tsx`, rendered inside `DatasourcePreview` for a federated datasource, carries English of its own (the "Tables" / "Validation" tabs, "writes allowed" / "read-only", "Federation is not enabled on this server.", the save-first prompt). Read at source only. This card is the family's carrier, so it rides here for a later slice. - The preview gallery still mounts `I18nProvider` in `en` (out of scope, as the card says). - Remaining for slice 3: the object / data previews and the ten `fallbackHint` literals. --- _Generated by [Claude Code](https://claude.ai/code/session_01MCg3z5cGrV51xEddpGcxEY)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…ce panel read the designer locale (objectui#10862, slice 3) (objectstack-ai#10906) Part of objectstack-ai#10862 Clause-②: no — rows are added and a locale is passed; each en row equals today's literal. No declared surface or stored value moves. Slice 3 of 3 (the object / data previews), per triage `5860733428`, seat 4's release `5863137337` and the slice-1 / slice-2 ACCEPTs `5861649175` / `5862348719`. Dispatched by the `domain:ui` seat 2 PM (claim `5863389454`, session `session_014mXUNuFomfj24w7s1pZzhN`), implemented on `claude/issue-10862-designer-english-slice-3` from `main` `35d68c4`. Same shape as objectui#10832 / objectstack-ai#10850 / objectstack-ai#10857 / objectstack-ai#10871 / objectstack-ai#10880: `engine.*` rows whose en value is the literal each replaces, plus zh, read in the designer locale the surface receives. No second catalogue. **This PR leaves the card open.** The dispatch made this the card's final slice unless a family site is still English after it. The census below found nine more files outside this slice's list that still render English under zh-CN (listed under Acceptance notes), so the first line is `Part of`, and objectui#10862 remains open as their carrier. ## What changed All under `packages/app-shell/src/views/`. - **`metadata-admin/i18n.ts`**: 140 en rows (each equal to the literal it replaces, byte for byte) and 140 zh rows, placeholders identical. Three existing rows are reused with the same meaning: `designer.canvas.renameHint` (the canvas rename tooltip), `engine.inspector.add.block` (the add-block trigger, the label `PagePreview`'s outline strip already reads) and `engine.inspector.view.object` (the view preview's no-object code span, the label the view inspector shows that field under). - **The registered previews** (`previews/ObjectPreview.tsx`, `DatasetPreview.tsx`, `ViewPreview.tsx`, `ReportPreview.tsx`, `PagePreview.tsx`, `ValidationPreview.tsx`) read their rows in the `locale` prop their hosts already pass. Every `fallbackHint` literal in `previews/` now reads a row: the ten the card counted in seven files. `DashboardPreview` and `FlowPreview` already read `engine.dashboardPreview.malformed` / `engine.flowPreview.malformed`, so they are recorded, not changed. A sentence around a code span is one row whose hole `withNodes` (`previews/row-nodes.ts`) fills: the view preview's no-object note, whose code span now shows the right panel's field label (`engine.inspector.view.object`) in the same locale, and the validation preview's removed-type sentence. - **`previews/PageBlockCanvas.tsx`** and **`previews/block-types.ts`**: the canvas's own words, plus the add-block picker's category headings and block names. `BLOCK_TYPE_META` entries gain a `labelKey` (the add-widget picker's shape from objectui#10804); `CATEGORY_LABEL_EN` becomes `CATEGORY_LABEL_KEY`, its en rows the English it carried. The picker's search matches the displayed name or the type id. `label` stays as the English name. - **`previews/SourcePageEditor.tsx`**: the textarea label and the preview hint. - **The column manager**: `previews/FieldsListEditor.tsx` (heading, empty note, positional label) and `FieldListRow` in `previews/ViewColumnPanes.tsx` (the remove control). `previews/view-column-io.ts` `colLabel` takes an optional positional formatter, so the `col N` fallback reads the designer row where it renders while the module stays free of the string tables (its default is unchanged). - **`metadata-admin/external/ExternalDatasourcePanel.tsx`** (carried from slice 2's ACCEPT): its own nine sites. - **Locale threading**: `PagePreview` passes its `locale` to `PageBlockCanvas` and `SourcePageEditor`; `studio-design/StudioDesignSurface.tsx` passes its own to its three `SourcePageEditor` mounts; `previews/DatasourcePreview.tsx` passes its `locale` to `ExternalDatasourcePanel`. - `celAuthoring.ts` is untouched: no static import is added to it. - One `.changeset/10862-designer-object-data-previews-locale.md` (`patch` for `@object-ui/app-shell`). ## H1 census, confirmed per file Read at source per file, then each hit confirmed as rendered by a pin through the real component. A site is one rendered designer word: an element's text, a `title`, an `aria-label` or a `placeholder`. | file | rows | rendered sites | not counted, and why | |:--|--:|--:|:--| | `ObjectPreview` | 1 | 1 | `hint` props (`PreviewShell` no longer renders them) | | `DatasetPreview` | 15 | 15 | `hint`; the error banner (the server's text); header labels and cell values (field metadata and data) | | `ViewPreview` | 4 (+1 reused) | 4 | `hint` (three); the reused row fills the no-object note's code span inside that note's own site | | `ReportPreview` | 6 | 6 | `hint` | | `PagePreview` | 8 | 8 | `hint`; the regions-shaped outline fallback `region N · M` (a regions page in design mode renders the block canvas, never the outline strip, so it cannot show); record labels (data) | | `PageBlockCanvas` + `block-types` | 55 (+2 reused) | 57 | region and slot names, block ids, type badges and region widths (author data); the `region_N` names `addRegion` writes (stored); `blockLabel`'s `block` fallback (only a component with no `type`, which `PageComponent` refuses); the `AI` heading (routed through a row whose zh is `AI`, as the metadata domain table's is); the `misc` heading (no block type is in that category, so it never renders) | | `SourcePageEditor` | 2 | 2 | `hint`; Monaco's model path | | `ValidationPreview` | 36 | 36 | `hint`; the severity, rule-type and event tokens (stored enum values); a bare `JSON Schema` title (the standard's name); the `—` of an absent otherwise; label, name, description, message, tags, states, fields, regex and CEL sources (author data) | | `FieldsListEditor` | 3 | 3 | column labels and field names (author data) | | `ViewColumnPanes` | 1 | 1 | `ColumnChip`'s own `Remove …` label: `ColumnChip` has no production importer (dead export; see Acceptance notes) | | `ExternalDatasourcePanel` | 9 | 9 | the `schemaMode` token (stored value); the snapshot time (display-locale formatting, objectui#9909's channel); a refresh failure's own message (producer text) | Totals: 140 new rows, 142 rendered sites (`Add region` and `Select …` each render at two places; the two canvas reused rows add two sites; the third reused row adds none, being part of the view preview's no-object site), every site pinned. The `AI` and `misc` heading rows are the two rows not counted as sites. ## H2: every production host passes the locale - **The registered previews** read the `locale` prop. Every registered-preview mount passes `useMetadataLocale()`: `ResourceEditPage` (`PreviewComponent … locale={locale}`), `EmbeddedItemEditor` (`Preview … locale={locale}`), `StudioDesignSurface` (the interfaces pillar's `Preview` and the automations pillar's `React.createElement(Preview, {…, locale})`). - **`PageBlockCanvas`** has one host, `PagePreview`, which now passes the `locale` it receives at both mounts. - **`SourcePageEditor`** has two hosts: `PagePreview` (split mode, now passes `locale`) and `StudioDesignSurface` (preview mode on the canvas, editor mode twice in the inspector; each now passes the surface's `useMetadataLocale()` value). - **`ExternalDatasourcePanel`** has one host, `DatasourcePreview`, which now passes its `locale`. - **The column manager** (`FieldsListEditor`, `FieldListRow`) reads `useMetadataLocale()`, as the add-field popover rendered beside those rows (`AddFieldPopover`, same file as `FieldListRow`) already did. Its hosts (`ViewColumnInspector`, `ViewVariantInspector`, `ReportDefaultInspector`) hold the same hook's value, so no host edit was needed. ## Pins Two new files, all mounting the real component under `I18nProvider` in the case's language: `previews/dataPreviews.i18n-10862-s3.test.tsx` (54 cases) and `previews/externalDatasourcePanel.i18n-10862-s3.test.tsx` (8 cases). `PageBlockCanvas` and `SourcePageEditor` are mounted through `PagePreview`, `ExternalDatasourcePanel` through `DatasourcePreview`, so the cases also read the threading. Every zh expectation is read back from the catalogue and guarded by `zhRow` (neither the echoed key nor the en row); every en case reads the en row through `t` / `tFormat` for `en-US`. A case reads every site on every mount before it judges, so a failing case lists each missing site. The error-boundary hints show through stand-ins that throw on demand (`SchemaRenderer`, the chart and report renderers, `ObjectFormCanvas`, `InterfaceListPage`), each mock spreading the real module; the report's loading text shows through a stand-in that suspends. - **Red run on the base** (the 15 changed sources checked out at `35d68c4`, blobs equal base; `i18n.ts` and the pins at HEAD `497678c`; trap restore, blobs equal HEAD, `git diff HEAD` 0 bytes, porcelain 0 lines): `Tests 31 failed | 31 passed (62)`. The 31 failures are the 30 zh cases plus the one case that reads the new `labelKey` / `CATEGORY_LABEL_KEY` wiring. The 30 zh cases list 151 missing sites covering 140 distinct keys: 138 of the 140 new rows (all but the `AI` and `misc` headings named above) and the two canvas reused rows; the third reused row is read inside the no-object case's code-span check. All 30 en controls pass against the base sources, and so does the unit case that compares every block name's en row with the English the table carries, so each en row renders exactly what the literal rendered. - **Ablation** through `ablation-replace.mjs` (wrap mode) on `PagePreview.tsx`: the `locale` thread to the region canvas cut (anchor 1 to 0, blob `e2f4198` to `6ba718f`) gives `Tests 5 failed | 49 passed (54)`. The five are exactly the zh `PageBlockCanvas` cases; every en case stays green. Restored: blob equals HEAD `e2f4198`, `git diff HEAD` empty. The pins import sources by relative path, so no `dist` sits between mutation and run. - **Green at HEAD `497678c`**: the two pin files with `FieldsListEditor.retiredAliases`, `view-column-io.retiredAliases` and `clientValidation.skew` (the slice-1 skew test), `Test Files 5 passed (5)`, `Tests 77 passed (77)`. ## Consumer sweep - **Static closure**: a base-vs-HEAD import-graph diff over every test file in the repo (vitest alias map, static non-type imports). Five tests' closures grow, each by `previews/row-nodes.ts` alone (it imports only `react`): `EmbeddedItemEditor.preview`, `ValidationPreview.test`, `ViewPreview.optionsFold-7928`, `emptyCollection-8570` and the new pin file. The new `ExternalDatasourcePanel` edge to `i18n.ts` grows no test's closure (every test reaching the panel already reaches `i18n.ts`). `celAuthoring.ts` gains no import. - **Full-replacement mocks**: an AST census of `vi.mock` / `vi.doMock` of `@objectstack/spec/ui`, `@object-ui/core` and `@object-ui/i18n` across the 455 tests whose closure reaches a changed module: 33 sites, all spread the real module; positive control: the same recogniser flags `clientValidation.skew.test.tsx`'s `@objectstack/spec/ui` mock (outside that set) as a full replacement. Every mock of the designer `i18n` module inherits it too. - **Literal readers**: a whole-repo scan of test files for the 140 replaced en literals finds 82 tests inside that 455 set (most on short common words); the ones that read this slice's sentences (`DatasetPreview.test`, `PageBlockCanvas.test`, `ReportPreview.dataset`, `ValidationPreview.test`, `page-preview-record-type-10482`, `palette-discussion-alias`, `emptyCollection-8526` / `-8570`, `inspectorStrings.i18n-10586`, `EmbeddedItemEditor.preview`) mount in en and see the same words. Outside the set, `e2e/live/studio-editor.spec.ts` matches `/Add block/i` against a live en console, unchanged by construction. - **The run**: all 455 tests whose closure reaches a changed module, plus the 17 `previews/` suites outside that set and the skew control, in seven locked batches at `f19d127` (the code of HEAD; later commits touch only the changeset and a test type): `Test Files 76 passed (76)` six times and `Test Files 17 passed (17)` once: 473 files, 4665 tests passed, 0 failed, 1 skipped (a pre-existing conditional skip in `flow-node-config.spec-reconciliation`). Every batch `VERDICT command-exit 0`. - **Type check** at HEAD `497678c`: `turbo run build --filter=@object-ui/app-shell^...` (28 of 28 tasks), then `pnpm --filter @object-ui/app-shell type-check` (script echoed: `tsc --noEmit && tsc -p tsconfig.test.json`), `VERDICT command-exit 0`; `tsc -p tsconfig.test.json --listFilesOnly` lists both pin files. ## Gates (at HEAD `497678c`, each exit 0) `check:i18n-designer-parity` (Every en row has a zh row, and every shared row carries the same placeholders.) · `check:i18n-drift` (140 key(s) added, 0 en values changed) · `check:i18n-keys` · `check:designer-field-key-parity` · `check:control-bytes` · `check:new-line-citations` (0 new citations) · `check:vi-mock-specifiers` / `check:vi-mock-inherit` / `check:vi-mock-override-shape` · `check:test-path-roots` · `check:unreferenced-sources` · `check:icon-record-names` · `check:esm-specifiers` · `check:self-import` · `check:phantom-deps` · `check:handler-key-reads` · `check:metadata-write-doors` · `check:action-forward-parity` · `check:element-data-source-declaration` · `check:prompt-keys` · `check:changeset-claims` (report-only: five pending changesets name a touched file, 6310, 6681, 7125, 8632 and `rotten-pugs-invent`; each paragraph read, still true) · `check:pending-changeset-literals` · `check-changeset-presence` · `check-changeset-no-major` · `check-changeset-fixed` · `check-changeset-overwrite` · `check-governed-queue-guard --test` (NOT GOVERNED, 19 paths) · `check:i18n-dead-keys` (report-only; none of the 140 new rows listed). ESLint on the 18 changed source and test files (`--format json`, 18 files): 0 errors. Every modified file carries the same error and warning counts as its base blob, with and without `--no-inline-config`; the two new test files carry none. The config enables no type-aware linting (no `project` / `projectService` in the resolved parser options) and no local rule reads the disk, so no untouched file can change verdict. NOT MEASURED: `check:eager-closure` and `check:eager-locale-catalogues` (both read a console build; the latter printed PREREQUISITE NOT MET here); the console performance budget (CI's). A browser drive of the preview gallery, whose `I18nProvider` mounts in `en` (the dev-harness gap the card names as out of scope). ## Serial - PR objectui#10888's `previews/__tests__/block-config-schema-parity-8216.test.ts` is untouched (it has since merged). - Open PRs' file lists re-read before the first edit (10 open, the release PR among them) and before opening this PR (6 open): no file in common with this branch. - `git merge-tree --write-tree` of HEAD against a fresh `origin/main` `9f0c84a`: exit 0, no conflict. Re-run at fix round 1 (HEAD `6a21fd3`) against a fresh `origin/main` `8522396`: exit 0, tree `8ac1563`, and no file main changed since the base is in this PR's diff. ## Fix round 1 (HEAD `6a21fd3`) Contract review at `497678c` returned wording findings only; this round takes all of them in one commit. - **Glossary, zh only, each now the catalogue's existing term**: `engine.pageBlockCanvas.type.recordRelatedList` 关联列表 (as `engine.inspector.pageBlock.option.location.record_related` and `engine.inspector.action.location.record_related`); `engine.validationPreview.transitions` 状态流转, `.transitionsOn` `{field} 的状态流转`, `.noTransitions` 未声明任何状态流转。 (as the rules editor's `engine.studio.rules.transitions` / `.typeStateMachine`); `engine.pagePreview.sampleOne` / `.sampleOther` `{count} 条示例` (示例记录, as `engine.actionPreview.placement.sampleRecord` and `perm.cel.test.record`); `engine.pageBlockCanvas.itemN` 第 {n} 项. No en row moves; placeholders unchanged. - **Changeset**: the page-block-canvas bullet now names the sites converted (region and container labels; the no-regions, empty-region, inherited-slot and empty-group states; the add-region and add-block buttons; drop target, rename tooltip, select labels, each block's render-failure hint; the picker's search box, headings and names) and no longer claims slot labels, which show as written, as the closing paragraph says. - **Pins** read every zh value from the catalogue, so none needed an edit; none hard-codes 相关列表, 状态转换 or 样本. - **Re-run at `6a21fd3`**: the two pin files with `ValidationPreview.test`, `PageBlockCanvas.test`, `palette-discussion-alias` and `page-preview-record-type-10482` under the verify lock, `Test Files 6 passed (6)`, `Tests 95 passed (95)`, `VERDICT command-exit 0`. `check:i18n-designer-parity` (Every en row has a zh row, and every shared row carries the same placeholders.), `check:i18n-drift` (140 key(s) added, 0 en values changed), `check:i18n-keys`, `check:control-bytes`, `check:new-line-citations`, `check:changeset-claims`, `check:pending-changeset-literals`, `check:i18n-dead-keys`, `check-changeset-presence`, `check-changeset-no-major`, `check-changeset-fixed`, `check-changeset-overwrite`, `check-governed-queue-guard --test` (NOT GOVERNED, 19 paths): each exit 0. - **Not taken**: a pin for `StudioDesignSurface`'s three `SourcePageEditor` `locale` threads. Mounting `StudioDesignSurface` needs its own scaffolding (router, metadata client, pillar state), which no existing pin file carries, so it would not be one case in an existing file. The threads are read by review and by `tsc`, not by a test. ## Acceptance notes - **The family is not closed: nine files outside this slice still render English under zh-CN** (read at source, not driven in a browser), which is why this PR says `Part of`: - `metadata-admin/external/SchemaBrowser.tsx`, `ValidationPanel.tsx`, `ImportObjectDialog.tsx`: the federated panel's tab contents and import dialog never read the designer `t` (the filter placeholder, the Refresh button, the table headers, Import, the unavailable hint, the ten diff-kind labels, Run validation, the match summaries, the dialog's title, labels and buttons). - `previews/FlowCanvas.tsx`: the edge tooltips (the un-declared-cycle sentence, `(back-edge)`) and the approval node summary (`N approver(s)`, `· all`). - `previews/FlowPreview.tsx`: the variables panel's `in` / `out` tags. - `previews/FlowRunsPanel.tsx`: an expanded run's `run …` / `· trigger …` line. - `previews/FieldStub.tsx`: the address field's placeholder (`Street / City, State ZIP / Country`). - `previews/useObjectFields.ts` (`Object not found`, shown inside the localized `engine.form.noObjectFields` sentence) and `previews/useDatasetCatalog.ts` (`Dataset not found`, the dashboard widget inspector's error slot). - **Files outside the claim's listed files**: `studio-design/StudioDesignSurface.tsx` and `previews/DatasourcePreview.tsx` (one `locale` attribute each, the threading the claim names), `previews/block-types.ts` (the picker's name table) and `previews/view-column-io.ts` (the optional positional formatter). Same defect class, no other behaviour. - `ColumnChip` in `previews/ViewColumnPanes.tsx` keeps its English `Remove …` label: nothing in the product imports it (dead export), so it is neither counted nor converted. - Pending changesets `8570-inline-empty-markers` ("the wording of both sentences is preserved", about the validation preview's `none`) and `palette-canonical-discussion-5495` (the label "Discussion") stay true in en; in zh the same words now read `无` and `讨论`. - `ActionPreview` still carries its own copy of `withNodes` from slice 1 (a refactor, not a locale fix). - The preview gallery still mounts `I18nProvider` in `en` (out of scope, as the card says). - `ExternalDatasourcePanel` stores its federation-unavailable sentence in state when a refresh fails, so after a language switch that sentence keeps the old language until the next refresh (review note, not changed). --- _Generated by [Claude Code](https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #10835
Clause-②: no — the locale is passed and rows are added; each en row equals today's literal, and no declared surface or stored value moves.
Supersedes PR objectui#10845 (closed by the seat): that branch carried a commit with a model-identifier trailer, and objectui squash-merges carry commit co-author trailers to main.
Dispatched by the
domain:uiseat 2 PM (claim5859105327, sessionsession_014mXUNuFomfj24w7s1pZzhN), implemented onclaude/issue-10835-designer-locale-v2as one commit,57e0689b5e, onmain256b4c9ef5. It carries the objectui#10832 review follow-up.What changed
All under
packages/app-shell/src/views/metadata-admin/.previews/DashboardPreview.tsx. The empty-canvas message, thePreviewErrorBoundaryhint, the Suspense loading text, and theSelectedWidgetStripwords ("Selected", the "Click to rename" tooltip, the "untitled" fallback, and the "Save title", "Rename widget" and "Clear selection" aria-labels) read nine newengine.dashboardPreview.*rows.SelectedWidgetStriptakes the preview'slocale.previews/simulator/flow-simulator.ts. Every note and error sentence a step records reads a newengine.flowSim.note.*row, through one privatesay(key, vars)helper. It is written in the locale the constructor already took forvalidateFlowDraft.previews/FlowSimulatorPanel.tsx. The step status chip readsengine.flowSim.stepStatus.*(five values), and an out-edge'serrorresult readsengine.flowSim.edge.error.previews/screen-spec.ts(bounded in-place fix, see H2).unevaluableVisibleWhen(node, locale?)passes an optional trailing locale on toscreenVisibleWhenScopeError, the shape that function already has. With no locale, it reads the en rows.i18n.ts. 48 new en rows, each the literal it replaces, and 48 zh rows beside them. No existing row moves.inspectors/inspectorStrings.i18n-10804.test.tsx(the objectui#10832 review follow-up). Theengine.flowRef.notAScreenField*en controls now readtFormat(key, 'en-US', …)instead of pinning the sentence. The file header says so..changeset/10835-dashboard-preview-debug-run-locale.md('@object-ui/app-shell': patch). After the contract review of PR objectui#10845, its second bullet reads "every note and error sentence the simulator itself writes on a step", and its last paragraph names what stays English under zh-CN: the framesflow-sim-validateputs around a CEL refusal, and the default edge'selsekeyword. The frontmatter is byte-identical (md5 of the first three lines4e8ce55021fe3b14329c8b4cb3f9f354before and after the edit).Carried over from PR objectui#10845
git diff origin/main...73fd1ccb4a), applied withgit apply --3way. All eight files applied cleanly; nothing was resolved by hand.73fd1ccb4a:git diff 73fd1ccb4a HEADover those paths lists only the changeset (2 insertions, 2 deletions).git diff 73fd1ccb4a HEAD, with the changeset excluded, ismain's own newer commits: its 30 files equal the list ofgit diff 8eaa1a0022 256b4c9ef5, and the two diffs are byte-identical (md5df4b7ef4f32c7d045f3a7aebb9ad01effor both).git diff origin/main --stat(withorigin/mainat256b4c9ef5): 8 files changed, 745 insertions(+), 60 deletions(-).git log origin/main..HEADis one commit,57e0689b5e5080d5a3635769dbafda167a288051. It ends with the model-free pair (Claude-Session:andCo-Authored-By: Claude), and a search of the message for a model identifier finds none.H1 — reproduced on the base, under zh-CN, through the real components
This is the red run of the new pins. The component sources are at the base (
256b4c9ef5, where the four component files are the same blobs as at PR objectui#10845's base8eaa1a0022), and the rows and pins are at HEAD.DashboardPreviewandFlowSimulatorPanelwere mounted with localezh-CNunder the i18n provider. The text below is quoted from the failure diffs.DashboardPreview:reasonfield hasvisibleWhen: 'needsApproval == true': "A screen field's visibleWhen may reference only the fields declared on this screen; the screen cannot evaluate "reason" (needsApprovalis not a field on this screen)." The inner reason was English as well, becauseunevaluableVisibleWhenpassed no locale.H2 — the simulator's locale seam
FlowSimulatorPanelbuildsnew FlowSimulator(nodes, edges, locale)from itslocaleprop.FlowPreviewpasses the preview'slocale, whichResourceEditPagereads fromuseMetadataLocale(). The constructor stored it forvalidateFlowDraft, but none of the step sentences read it.this.locale. The alternative, notes emitted as keys and parameters for the panel to render, was rejected because it changes theSimStepshape.noteanderrorstaystring, so no reader moves. Every reader ofnote:FlowSimulatorPanelrenderss.note(ands.error).ScreenPreview.debugRunScope-10743.test.tsxchecks that the step'snotenames no hidden field.flow-simulator.parity-10692.test.tsreads it seven times: "No out-edge was taken", "first declared branch", "No out-edge carries the branch label "default"",in "out",{NOW()} in "when", and "Kept as written" absent.flow-simulator.test.tsreads it twice: "No out-edge was taken", and/not modelled/i.flow-simulator.test.tsalso readssim.state.errorfor/step limit/i.unevaluableVisibleWhencalledscreenVisibleWhenScopeError(visibleWhen, node)with no locale, so theengine.flowRef.notAScreenField*reason inside the zh frame stayed English. The locale is now passed through.screen-spec.ts, which is outside the claim's file surface. All four conditions hold: it is the same defect class (a caller passing no locale); it is mechanical, with the optional trailing-locale shape that objectui#10832 established; no open PR touches the file (see Serial); and it runs the same gates.ScreenPreview.test.tsxcallers pass no locale and still read en.@objectstack/formula/@objectstack/spec) inside a reason, a guard error or an envelope error is the producer's own words. finding(formula,spec): expression refusal text renders English under zh-CN in objectui's flow designer — validateExpression / collectCelRootIdentifiers / predicateSlotRefusal messages carry no locale objectstack#20291 is not addressed here.H3 — census of the three files
flow-simulator.ts: display, localized (33 rows).The step-limit sentence goes to
state.error, which no renderer reads today; only a test does. It is localized because that same field already carries the localizedvalidateFlowDraftmessage.flow-simulator.ts: left as written.config.conditions[K].expression: …,assignments.KEY: …andCONDITION: …frames are a config path or CEL source followed by a reason. They contain no words of their own.DEFAULT_BRANCH_LABEL(default) is the runtime's branch value, matched against author edge labels.' ',', 'and'; 'separators are punctuation.FlowSimulatorPanel.tsx: display, localized.errorresult.FlowSimulatorPanel.tsx: left as written.true/falseis its CEL value, printed on the row's code line beside the condition.elseis the default edge's keyword on that code line. The canvas prints the sameelse, and the zh edge inspector keeps it (默认分支(else)).→ TARGETis a node id.s.typeand the mock list's type are the stored nodetypeid.{ "OUTPUT": … }placeholder is a JSON sample.=,▶,·and→are symbols.DashboardPreview.tsx: display, localized (9 rows). These are the ones listed under What changed.DashboardPreview.tsx: left as written.New TYPEandNew widgetdefault titles are stored author data, per the objectui#10678 / objectui#10651 ruling. They are pinned as a control.titleis author data.PreviewShellhintstrings (dashboard · N widgets · design) are not user-visible:PreviewShellno longer rendershint, as its own doc comment says.Pins and ablation
The new pin file is
previews/previewStrings.i18n-10835.test.tsx. It uses the objectui#10696 / objectui#10748 / objectui#10804 harness: it reads the rendered text of the realDashboardPreviewandFlowSimulatorPanel, reads zh back from the catalogue and guards it withzhRow, and reads en throught/tFormatforen-US.DashboardRendereris a stand-in that can suspend or throw, which is how the loading text and the boundary hint are shown.type: 'bar'andtitle: 'New bar chart'.256b4c9ef5forDashboardPreview.tsx,FlowSimulatorPanel.tsx,flow-simulator.tsandscreen-spec.ts; rows and pins at HEAD; restored by a trap, with blob == HEAD for each path andgit diff HEAD0 bytes after):Tests 14 failed | 16 passed (30).{name}standing where the base interpolated:rows=48 matched=48.57e0689b5e):Tests 30 passed (30). The run together with the objectui#10804 file readsTests 51 passed (51).ablation-replace.mjs, on57e0689b5e: the simulator seamthis.locale = locale;becamethis.locale = undefined;.3b72e31939→5e59861f56.Tests 7 failed | 23 passed (30). The 7 failures are exactly the Debug run's zh cases that read a simulator note.3b72e31939), andgit diff HEADis empty.dist/sits between the mutation and the run.Gates
Every line below was run on HEAD
57e0689b5e.DashboardPreview,FlowSimulatorPanel,flow-simulator,screen-specorFlowPreview;block-config-i18n.test.tsandperm-home-namespace-3546.test.tsx, which read the designer table;Test Files 22 passed (22) · Tests 358 passed (358).check-i18n-dead-keys,check-i18n-designer-table-parity,check-i18n-en-drift):Test Files 3 passed (3) · Tests 211 passed (211).packages/app-shellsuite is left to CI.pnpm --filter @object-ui/app-shell type-checkexits 0. The dependency closure was built first (turbo run build --filter='@object-ui/app-shell^...', 28/28 tasks).--listFilesshows thattsconfig.test.jsoncompiles both pin files.--print-configexits 0 for each).--format json: 7 files, 0 errors, 8 warnings, all inDashboardPreview.tsx. The base file has the same 8 (exhaustive-deps×3,no-explicit-any×4,set-state-in-effect), on lines this diff only shifts.parserOptions/projectServiceineslint.config.js), and noeslint-rules/rule reads the disk. So this diff cannot move any verdict on an untouched file. The repo-wide lint is CI's.check:i18n-designer-parity0: "Every en row has a zh row, and every shared row carries the same placeholders."check:i18n-drift0: "No designer-table en value changed in this range."check:i18n-keys0 andcheck:designer-field-key-parity0.check:new-line-citations0 (0 new).check:control-bytes0.check:vi-mock-specifiers,check:vi-mock-inheritandcheck:vi-mock-override-shape0.check:test-path-roots0 andcheck:unreferenced-sources0.check:changeset-claims0 andcheck:pending-changeset-literals0.check-changeset-presence0 andcheck-changeset-no-major0.check-governed-queue-guard --test: NOT GOVERNED (8 paths).check:i18n-dead-keysis report-only. It lists no new row as a candidate. The fiveengine.flowSim.stepStatus.*rows are held live by their template head inFlowSimulatorPanel.Serial
git merge-tree --write-treeagainst a freshly fetchedmained76b1b08ais clean (treed1026096e5). Nometadata-admin/file changed onmainbetween the base256b4c9ef5anded76b1b08a.Acceptance notes
These designer surfaces are still English under zh-CN. They are outside this card's file surface. They were found in passing through a zh probe of the same mounts; this is not a sweep.
previews/PreviewShell.tsx,PreviewErrorBoundary. Its heading "Preview failed to render" sits above the now-zh hint on every preview's error boundary. The probe read: 添加组件Preview failed to render…某个组件引用了无法解析的对象或字段。previews/ScreenPreview.tsx, inside the Debug run's paused screen. The "Preview" header, the "Submit" button, and the empty text "Add a title, description, fields, or an object form to preview this screen."previews/simulator/flow-sim-validate.ts. Its own frames around producer text in a step's or out-edge's error: "CEL evaluation failed: ", "condition failed to evaluate as CEL: ", and the fallback "Evaluation failed.". The probe read:discount > 1: condition failed to evaluate as CEL: Unknown variable: discount.previews/FlowCanvas.tsx. Its default-edge labelelseandif CONDITIONare left for the same reason as the panel'selse: they are keywords on a code line. This is not a defect claim.inspectors/inspectorStrings.i18n-10804.test.tsx. Its other en controls ("Screen fields" and the widget-picker words) still pin literal wording. The review follow-up named only theengine.flowRef.notAScreenField*controls, so they were left as they are.Generated by Claude Code