Skip to content

Studio: renaming an installed package's field does nothing in a translated language: the package's translation keeps winning #39470

Description

@objectstack-fleet

repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2

Context

New-company walkthrough, customizing the installed HotCRM 7.1.0 package (showcase dev server, latest main, console in 简体中文).

For a field of an installed package, the Studio inspector says only display properties are editable: 「你只能修改它的显示名、描述、帮助文本、占位符、选项显示名,修改会保存为你的定制」. The display name is the first of those.

Steps

  1. Studio → 对象 → crm_opportunity → 字段布局 → select 线索来源 (lead_source).
  2. The 显示名 input reads Lead Source. A hint under it says 「在 zh-CN 中显示为"线索来源":应用的翻译包覆盖了此显示名。」
  3. Change it to 客户来源 and click the header 保存. The save succeeds: GET /api/v1/meta/objects/crm_opportunity now serves "label":"客户来源".
  4. Open 新建商机, or any record page, in the console.

Actual

The field still reads 线索来源 everywhere in zh-CN. For a customer whose users work in Chinese, the one property the inspector lets them change has no visible effect. The hint explains why, but offers no way to do what they wanted.

Expected

The customer's rename is shown in the language they made it in. Design mode already does this for menus: since #36504, a menu rename in a non-source language is stored as that language's translation in the .custom pair, and the dialog says 「新名称只在中文(中国)下显示」. Renaming the 商机 menu item to 销售机会 that way took effect immediately and survived a reinstall.

The field inspector should do the same for label, description, help text, placeholder and option labels:

  • When the active language has a package translation, write the edit as a .custom translation for that language.
  • Or at least offer that choice instead of only the hint.

Related history: #30193 (an override's own label losing to the base translation), #11782 (the hint itself).

Where to look

Acceptance

  • Renaming an installed package's field in zh-CN changes what zh-CN users see.
  • Other languages keep the package's translation.
  • The rename survives reinstalling the package.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:ui
    area:studio
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:build · domain:ui · Bug · p2 · pm:queue · size S, touched 2026-12-04T02:15Z. Rationale: area:studio is not on the North Star list; authoring in Studio goes to build, so I moved it there. Studio offers to rename an installed package's field, but in a translated language the package's own translation keeps winning, so the edit does nothing. The filer's p2 stands. Issue type set to Bug.
    Grade: area:build · Bug · p2 · customers customizing an installed package in a non-English console · read (new-company walkthrough, HotCRM 7.1.0 install).

  3. added and removed
    area:studio
    on Dec 4, 2026
  4. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvqcHrQpENbRP7eLfU

    2026-12-04T06:51Z · zone ot-build

    Claim: PM loop round 1
    Session: session_01L9qibvqcHrQpENbRP7eLfU
    Account: os-tesla
    Branch: claude/issue-39470-field-rename-custom-translation
    Worktree: objectstack-issue-39470
    Domain: domain:ui
    Seat: repo:objectstack@os-tesla
    Area: ot-build
    File surface: ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx, ui/packages/i18n/src/namespaces/studio/ (reason: inspector copy in each locale file), the design-mode menu-rename translation write helper that #36504 landed (reason: reuse, not copy; the dev names the exact file in the report)
    Container & model: M (S card with a design judgement), mode:subagent, model: default (dispatch-gates --tier at e43597b1: "no path-derived mandate … floor sonnet · default opus · ceiling fable"), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: ui/packages/app-shell Studio field inspector (objectstack) saves the label into the field body while the installed package's translation keeps winning in the active language | the design-mode menu rename (#36504) already writes a non-source-language rename as that language's .custom translation | every customer customizing an installed package in a non-English console reaches it today (new-company walkthrough, HotCRM 7.1.0)
    Thread-read: 7398751537
    Premise: holds (read at e43597b: LabelTranslationHint at ObjectFieldInspector.tsx:2355, rendered at :1641; the dev re-measures the zh-CN rename end to end before code)
    Pre-claim lane: domain:ui — the fix is in ui/packages/app-shell/src/views/metadata-admin/inspectors/ (file ownership only)
    Pre-claim deps: none named on the card; check-handover.mjs --inflight on the surface: no overlap read (4 unrelated surfaces name no path: #39507 #39506 #38415 #35238)
    Prior rulings read: ADR-0146 (D3 display-property whitelist, D6 not-done list) — label, description, help text, placeholder and option labels are the customer's patchable class; check-prior-rulings.mjs --card 39470 with narrowed terms → 0 decision hits; thread: none
    Serial constraints cleared: none (no open pull or held claim on ObjectFieldInspector.tsx; sibling #39471 in this zone is claimed with a surface that leaves this file out)

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 4, 2026
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvqcHrQpENbRP7eLfU
    os-dev-report

    {
     "issue": 39470,
     "status": "blocked",
     "branch": "claude/issue-39470-field-rename-custom-translation",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/39548",
     "session": "session_01L9qibvqcHrQpENbRP7eLfU",
     "premise_still_valid": true,
     "summary": "BLOCKED on one thing only the PM can resolve: the fix needs ui/packages/app-shell/src/views/studio-design/DataPillar.tsx, which is outside the claimed file surface, so per the dispatch I stopped before editing it. Why: the inspector only patches a draft; the header Save that writes the field's pair extension is the Data pillar's (doSaveExt, useStudioSaveEntry). A zh-CN rename has to be staged and written by that same Save as a .custom translation row, and a buffer held in the inspector would be lost when the field rail closes. The missing wiring is two call sites: (1) call useFieldDisplayTranslationBuffer with active = extendsBase && extWritable, pairFor = () => extPairFor(customization), client, locale, label = current.label || current.name, order = 2; (2) wrap the inspector element in FieldDisplayTranslationContext.Provider with value = buffer.sink. Not done because it would edit that file: an immediate publish from inside the inspector. It would fit the surface, but it would put a second, un-cancellable save path into the staged one-Save rail (ADR-0146 note: 'Changes are staged: Save commits them together, Cancel drops them'). Done and pushed in draft PR #39548 (Part of #39470): (a) new module inspectors/fieldDisplayTranslation.tsx with the routing hooks (label and option labels), the pair translation writer (item OBJECT_fields_LOCALE, keys objects.OBJ.fields.FIELD.label and .options.VALUE, first-write pin, pinned publish, discard-own-draft on refusal) and the host buffer plus context. It reuses the exported labelLanguageOf, fetchDeploymentLocales, holdsStoredApp and publishPinAt from layout/designModeMenuSave.ts, which is imported, not edited. (b) ObjectFieldInspector.tsx gets call sites only (+32/-9). With no buffer provided it behaves exactly as before. (c) en and zh copy rows. Mechanism checks: A1 holds. A DOM test reproduces it with no buffer: the zh-CN rename is patched into the field label while the bundle resolver still answers 线索来源. The console resolves the label from the bundle first (useSafeFieldLabel().fieldLabel). The bundle is the shipped bundles with the authored translation rows laid over them (service-i18n getTranslations and core memory-i18n), and installed packages load their translations as static bundles (AppPlugin.loadTranslations), so a .custom translation row wins. A2 holds only in part: the menu's writeMenuTranslation is private and specific to app navigation, so the field writer mirrors it and reuses the four exported helpers. Not routed, on purpose: help text and placeholder (the console reads them from the served field, where the pair's patch already wins on a changed slot; the client bundle carries no help) and description (a field translation has no description key). Card assignee untouched.",
     "tests": "At final head 49fd7519c5: pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.translatedLabel-39470.test.tsx -> 'Tests 14 passed (14)'. At 6d9e981824 (the later commits only add a changeset and a module-top import in the test): the 39470 + 11782 + 28986 files together -> 'Test Files 3 passed (3) / Tests 37 passed (37)'. Ablation: committed first, then disabled the routed commit in ObjectFieldInspector.tsx (sed 'if (routedLabel && false)'), re-ran -> 'Tests 3 failed | 11 passed (14)' (the zh-CN rename, the emptied input, the source language over a shown translation), restored with git checkout HEAD, porcelain clean. pnpm --filter @object-ui/app-shell run type-check: source tsc exit 0; test tsconfig exit 0 at the final head. eslint on the two new files: 0 problems; the inspector's remaining warnings were there before this change. Prior closure build: turbo build --filter='@object-ui/app-shell^...' --concurrency=2, VERDICT command-exit 0. NOT MEASURED: end to end on a live server with an installed package carrying a zh-CN translation and a .custom pair (reason: it needs the marketplace install of HotCRM and the missing host wiring).",
     "gates": "Local: dispatch-gates --commands derived 38 families at 2fd35ad0d5. 37 were run sequentially, each exit captured before any pipe: 36 exited 0; check:test-source-alias exited 1 (the new test reached the lazy import('@objectstack/lint') with no module-top import). Fixed in 49fd7519c5 and re-run: 'check-test-source-alias OK', exit 0. The 38th, pnpm --dir ui exec vitest run scripts/, ran under the lock: 'Test Files 172 passed | 2 skipped', VERDICT command-exit 0. Re-run at the final head 49fd7519c5: check:test-source-alias exit 0, check:nul-bytes exit 0, app-shell test tsc exit 0. Also ui check:new-line-citations: '0 new citation(s)', exit 0. dispatch-gates --ran: '38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED'. CI on 49fd7519c5, read once and not waited for: Check Changeset success, Check PR Size success, Governed Surface Queue Guard success, PR-body guards success, Test Core success, Dogfood Regression Gate success, Build UI Deps success; Lint UI, Lint (all lanes), Test UI shards, Build & E2E UI and Live E2E UI were in_progress, not yet concluded.",
     "mcp_calls": "0",
     "api_writes": "3 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/39548/assignees os-tesla; read-back identical, 4553 bytes); post-stamped report comment on #39470 (POST /repos/objectstack-ai/objectstack/issues/39470/comments). git push x6 not counted.",
     "classifier_refusals": [],
     "open_questions": [
      {
       "question": "Extend #39470's file surface to DataPillar.tsx call sites (the buffer hook plus the context provider around the field inspector), or route the rename through an immediate publish inside the inspector?",
       "options": [
        "A: extend the surface to the two DataPillar.tsx call sites; the rename is staged and written by the page's one Save, Cancel drops it (about 10 lines on this branch)",
        "B: keep the surface; the inspector publishes the translation at once from its own control, outside Save and Cancel"
       ],
       "recommendation": "A, because the Studio and design-mode rule is staged edits that one Save commits and Cancel drops (ADR-0146 note), and it mirrors the menu rename the card cites; B adds a second save path the top bar cannot undo."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "class: none · noted, not filed (no reach measured) · observation: a help-text or placeholder edit on a base field in a translated console is a body patch, so through the server's changed-slot rule it reads in every language, English included, rather than only in the language it was typed in · carrier: none · dedupe words: base field help text translation, fieldPatches inlineHelpText locale, changed slot override text"
     ]
    }
  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvqcHrQpENbRP7eLfU

    Claim amendment: 2026-12-04T07:59Z · claim 7403966804 (zone ot-build), on the dev's open question (report 7405306312, draft PR #39548).
    File surface (adds): ui/packages/app-shell/src/views/studio-design/DataPillar.tsx (reason: two call sites only — the field-display translation buffer hook and its context provider around the field inspector, about 10 lines; the rename is staged and written by the page's one Save, Cancel drops it). Route A, as the dev recommends: no second save path inside the inspector.
    Serial constraints cleared: DataPillar.tsx is also in sibling #39471's surface (amendment 7404447144, call sites and one prop); both are this zone's. #39470 (PR #39548, open first) lands first; #39471's dev merges main after it and resolves its call sites. check-handover.mjs --inflight on the file: no overlap with any other seat's claim.

  8. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvqcHrQpENbRP7eLfU
    os-dev-report

    {
      "issue": 39470,
      "status": "done",
      "branch": "claude/issue-39470-field-rename-custom-translation",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39548",
      "session": "session_01L9qibvqcHrQpENbRP7eLfU",
      "premise_still_valid": true,
      "summary": "Route A landed at d93e881e14. In Studio's display-patch mode (a base package's own field), a label or option label typed in a language other than the deployment's source language, or typed over a translation the author is shown, is staged as that language's translation (OBJECT_fields_LOCALE in the customization pair, first-write pin, publish pinned to the row read, refused publish discards its own draft) instead of patching the field label; the page Save writes it and Cancel drops it. New logic is in the sibling module fieldDisplayTranslation.tsx; ObjectFieldInspector.tsx gains call sites only, and DataPillar.tsx gains exactly the two approved call sites (the buffer hook at order 2 and the provider around the field inspector). Help text, placeholder and description are kept out on purpose and the PR body says why; the PR body now opens with Fixes #39470 below the harness attribution lines (the fleet's own fixtures use that order) and ends with the signed trailer, read back byte-identical. PR stays draft. Not done (the review request on os-tesla that the session hook asks for): it is outside the three-write budget.",
      "tests": "At d93e881e14 under os-verify-lock: `cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/studio-design/DataPillar packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector` gives 'Test Files 84 passed (84) / Tests 657 passed (657)', VERDICT command-exit 0. New: ObjectFieldInspector.translatedLabel-39470.test.tsx (15) and DataPillar.baseObjectExtension-28575.test.tsx +2 (the page Save writes {name:'crm_account_fields_zh_cn', locale:'zh-CN', objects.crm_account.fields.name.label:'公司名称'} as a pair draft with ifNoneMatch '*' and publishes at the pair, with no extension or object write; Cancel writes nothing). `pnpm --dir ui exec vitest run --maxWorkers=2 scripts/` gives 'Test Files 172 passed | 2 skipped (174)', VERDICT command-exit 0. `pnpm --filter @object-ui/app-shell run type-check` exit 0; eslint on the touched files 0 problems. Ablations (rebuilt test run, the source mutated on disk, restored from HEAD): the inspector's routed commit disabled gives 3 inspector tests fail; DataPillar's provider value set to null gives both page tests fail.",
      "gates": "Local derived subset at d93e881e14: 38 commands from `dispatch-gates.mjs --commands` each captured exit 0 before any pipe (redirect then $?), including check:test-source-alias, check:nul-bytes, check:published-files, check:tier-file-adoption, check:type-check-coverage, check:type-check-debt, check:undeclared-dep-imports, check:watch-hint-literal, check:where-matcher, and ui scripts vitest. `dispatch-gates.mjs --repo objectstack-ai/objectstack --ran` gives 'Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN', exit 0. PR check-runs on d93e881e14, read once and not waited on: 45 success (among them Test Core, Test UI and shards 1-16, Type Check UI, Lint UI, TypeScript Type Check, Lint & Repo Gates, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check PR Size, Governed Surface Queue Guard, the Lint and Type Check lanes), 17 skipped, 2 in_progress (PR-body guards and Check Changeset, re-run by the body edit; both read success on the earlier body).",
      "mcp_calls": "0",
      "api_writes": "4 relay dispatches (fleet-write), 5 endpoints: pr_create (POST /repos/objectstack-ai/objectstack/pulls, then POST /issues/39548/assignees); POST /issues/39470/comments (report 7405306312, round 1); PATCH /issues/39548 (body, issue_patch, read-back 5953 bytes identical); POST /issues/39470/comments (this report). Plus git push of the branch (not a REST write).",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: help text and placeholder on a base field are patched in the field itself, so an edit typed in one language reaches readers of every language (no per-language route exists for them, and a field translation has no description key). Recorded in the PR's Acceptance notes; no reach measured, so not a filing class."
      ]
    }
  9. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibvqcHrQpENbRP7eLfU

    2026-12-04T10:41Z · zone ot-build · Tidy: PR #39548 merged as 0b9a11bef969004a7223f347cdb009c3927a615a (Fixes #39470: a base field's label or option label typed in a non-source language is staged as that language's translation in the customization pair); the card closed completed. Help text, placeholder and description stay field patches (Acceptance notes on the PR; not a filing class). pm:dispatched removed in this stroke.

  10. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:buildbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions