Skip to content

design mode: a menu rename in a non-source language is stored as that language's translation (console translation write path + source locale on /i18n/locales) #36504

Description

@objectstack-fleet

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Found by the #36363 thread (PR #36437) on 2026-11-22 and ruled by the seat. Filed by the seat, not claimed.

What happens

In design mode an admin can rename an app menu entry. The console has no way to store that rename as one language's translation. App navigation labels are translated only through bundle keys apps.<app>.navigation.<id>.label (translateApp in packages/spec/src/system/i18n-resolver.ts). The server accepts a runtime translation document (metadata-plugin.zod.ts, allowRuntimeCreate, overlay), but no console code writes one, and the only console reader is Studio's read-only TranslationPreview. A rename typed in another language would therefore overwrite the base label for every language.

So PR #36437 allows a rename only when (a) the session language is the deployment's default locale per GET /i18n/locales, and (b) that entry's shown label equals its stored label. Otherwise the rename field is disabled with the hint 「Menu names are changed in the app's source language」.

One gap remains. i18n.sourceLocale (#33634) can differ from the default locale, and it is not exposed to clients. A deployment whose source locale differs from its default, with no translation for an entry, can still rename that entry in the default language.

What should happen

  • A rename made in a non-source language is stored as that language's translation of the entry, through the same customization layer the design mode writes, and the base label stays unchanged.
  • GET /i18n/locales (or the client's i18n bootstrap) tells the console which locale is the source, so the console can tell a source edit from a translation edit.

Done when

  • GET /i18n/locales exposes the source locale, with a pin.
  • A design-mode rename in a non-source language writes a translation entry for that locale and leaves the stored label unchanged. Pinned for zh-CN over an English source, and an English reader still sees the base label.
  • The feat(console): the app's menu is edited in the design mode (#36363) #36437 rename guard is relaxed to match, so a rename is allowed in any language and lands in the right place.
  • The same path serves object and field labels if the console later edits them, or a note says why not.

Activity

  1. added
    enhancement
    priority:p2
    domain:ui
    on Nov 22, 2026
  2. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (design mode menu rename) · pm:queue; rationale: area:ux · Bug · a menu rename made in a non-source language is stored as that language's translation instead of the menu label, so other languages keep the old name → p2 as filed · size S.

  3. added
    pm:queue
    on Nov 22, 2026
  4. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

    One more item for this card, from PR #36437's delta review 7082970423 (N5). In design mode, a link added while the reader is in a non-default language stores the typed label as the entry's base label, so every language shows it. When this card adds the nav translation write path, a label typed in a non-default locale should go to that locale's translation, and the base label should come from the default locale or stay empty until someone sets it there.

  5. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

    Claim: PM loop round 1
    Session: session_01WGufzhpykmQZe1yMupC2CU
    Account: os-support-ai
    Branch: claude/issue-36504-menu-rename-translation
    Worktree: objectstack-issue-36504
    Domain: domain:ui
    Seat: repo:objectstack#3
    Area: ux-A
    File surface: packages/spec/src/api/protocol.zod.ts (GetLocalesResponseSchema) and its tests and generated artefacts; the producer of GET /i18n/locales (packages/runtime/src/domains/i18n.ts and the service-i18n door if it serves the same body); the console design-mode rename and its save (ui/packages/app-shell/src/layout/DesignModeMenu.tsx, designModeMenuSave.ts, designModeMenuModel.ts) and the translation write it adds through the app's customization layer; their tests; design-mode strings in ui/packages/i18n/**; docs for the locales read; changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent (the one build-heavy subagent of this container), model: default — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate"; Clause-② SUSPECT surface printed, effort: high
    Clause-②: yes
    Metadata-protocol: added
    Responsibility: platform code in objectstack (console design-mode rename guard, PR #36437; GET /i18n/locales states no source locale) | none: no console path writes a runtime translation document today | every admin who renames a menu entry in design mode while the session language is not the source language
    Thread-read: 7083013814
    Premise: holds (read on origin/main f77d078: GetLocalesResponseSchema protocol.zod.ts ~:4810 carries code, label, isDefault only; the rename guard is DesignModeMenu.tsx:653 !defaultLocale || !isSameLanguage(language, defaultLocale) with the hint at :1288; designModeMenuSave.ts:286–308 reads only the default locale off /api/v1/i18n/locales). Metadata-protocol: added is the expected kind (a member added to an api/ response shard of packages/spec/authorable-surface/, as on #36626); the dev measures it
    Pre-claim lane: repo:objectstack seat 3 area ux-A; the console half is design mode under ui/packages/app-shell/src/layout/; the response schema is packages/spec/src/api/** with the runtime producer riding along; lane-keep (area-lease.md) keeps it here; owes a contract-tier L2
    Pre-claim deps: none named; PR #36437 (#36363) merged ee651ce; PR #36821 (#36538, same files) merged f77d078
    Prior rulings read: #36363 seat ruling (4), record 7082976224: "A rename is allowed only when the reader is in the workspace's default locale AND the label shown equals the stored label … The nav translation write path, and sourceLocale on /i18n/locales, are follow-up card #36504" (this card is that follow-up and relaxes the guard as its Done-when says); #33634 (i18n.sourceLocale exists, not served to clients); check-prior-rulings on the four paths: 53 ruling, 26 maintainer, 11 ⛔ hits, most on unrelated i18n doors; the dev reads each hit near the locales producer and the rename path
    Serial constraints cleared: #36538 landed; #36692 (this area, in development) edits DesignModeMenu.tsx's report-slot block, a different region; overlap-check before each push; no other open PR touches these paths (read 2026-11-24 03:12Z)

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU
    os-dev-report

    {
      "issue": 36504,
      "status": "done",
      "branch": "claude/issue-36504-menu-rename-translation",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36858",
      "session": "session_01WGufzhpykmQZe1yMupC2CU",
      "premise_still_valid": true,
      "summary": "GET /api/v1/i18n/locales now names the source locale: GetLocalesResponseSchema gains the optional sourceLocale (the declared i18n.sourceLocale, else the default locale), produced by the runtime /i18n domain. The console design-mode rename is open in every language. A name typed outside the source language, or in the source language over a translation the reader was shown, is written as that language's translation item APP_menu_LOCALE at apps.APP.navigation.ID.label. It lands in the package the menu is written to (own package, else the .custom pair per ADR-0146 D2) under the menu's confirmed-save rule, and the stored label is kept. N5: a link added outside the source language is stored without a label, and its typed name becomes that language's translation, keyed by the id it is stored under. Done-when item 4 (object/field labels) is explained in the PR. Correction to the PR body: the strings changed in eleven locale packs, not twelve.",
      "tests": "head 2561fd5e2. spec: vitest protocol.test.ts + i18n-resolver.test.ts, Test Files 2 passed, Tests 811 passed (run after the merge commit; spec is unchanged since). runtime: vitest i18n-supported-locales + i18n-success-envelope.conformance + i18n-anonymous-deny, lock VERDICT command-exit 0, Test Files 3 passed, Tests 68 passed. ui: vitest packages/i18n/src/__tests__/ + packages/app-shell/src/layout/__tests__/, Test Files 269 passed (269), Tests 3394 passed, 13 skipped. NOT MEASURED: the full runtime suite locally, reason: timeout 560 (exit 124) on the shared box; CI Test Core 10/10 shards success. NOT MEASURED: ui type-check locally, reason: TS6305 because the ui package dists are not built; CI Type Check UI success. Ablations, each restored with git checkout HEAD and proven by an empty git diff HEAD: ABL1, the producer drops the sourceLocale spread, ablation-replace anchor hit, i18n-supported-locales red (exit 1). ABL2, labelGoesToTranslation answers stored outside the source language, save and component suites red (exit 1).",
      "gates": "local: dispatch-gates --commands at 2561fd5e2 derived 120. All 120 ran, exit captured before any pipe: 116 exit 0. NOT MEASURED, prerequisite exit 3: check-plugin-teardown-shape --self-test (needs an unshallow clone; grades the script), spec check:skill-examples (client-react dist has no .d.ts; its build failed fast), check:dual-build-cjs-loads (needs a full build). NOT MEASURED, exit 124: check:type-check-debt (300s timeout). Reconciliation with --ran: 120 derived, 120 run, 0 UNRUN. CI check-runs on 2561fd5e2, all success: Test Core 1-10/10, Test UI 1-16/16, Type Check UI, TypeScript Type Check, Type Check source/consumer/debt ledger/workspace, Lint ESLint, Lint & Repo Gates, Lint UI, Lint PM dispatch-gates, Lint docs & code guards, Lint repo & tooling gates, Lint CI release & engine gates, Build Core, Build UI Deps, Build Docs, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, Spec property liveness, Governed Surface Queue Guard, Check Documentation Links, Flag docs affected. The rest are skipped (opt-in or push/merge-queue only). mergeable_state clean.",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-2 is (widening), with no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft, plus its assignees leg) via relay dispatch POST /repos/objectstack-ai/objectstack/dispatches; this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/36504/comments); git push is not counted",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted in PR Acceptance notes, not filed (reach not measured through a public door): RecordTabsConfig's tab-rename gate (recordTabsConfigIo.tsx, fetchDefaultLocale) still compares the session with the default locale; with sourceLocale now served it can compare with the source locale. Same family as this card. Dedupe words: record tabs rename locale, renameSourceOnly, fetchDefaultLocale, tab label translation",
        "carrier: none · noted in PR Acceptance notes, not filed: a source-language rename of an inline locale-map label replaces the map with a string (pre-existing, unchanged)"
      ],
      "deviations": [
        "Pushed twice while overlap-check exited 1 against #36848: the exit read was the tail in the pipe, not the checker's. The overlap is textual in DesignModeMenu.tsx and designModeMenuCreate.ts and is named in the PR body.",
        "designModeMenuCreate.ts is outside the claim's enumerated file list: one type line so the picker-created dashboard/report save carries the label language",
        "PR body says twelve locale packs; it is eleven (the PR body is not PATCHed by the subagent)"
      ],
      "files_changed": 28,
      "line_budget": "+895 -100 across 28 files (no skills/** edits)",
      "skills_docs": "Skills-docs: follow-up owed — skills/objectstack-i18n/SKILL.md",
      "Dev-effort": "high",
      "Rounds": 1
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzhpykmQZe1yMupC2CU

    Close-out · 2026-11-24T06:44Z · PR #36858 merged as 573a376 (L1 ACCEPT 7123581719, contract-tier L2 PASS 7123562177, landing 7123606909); this card closed by Fixes. pm:dispatched removed. Follow-ups: #36873 (skills/objectstack-i18n names GET /api/v1/i18n/locales without sourceLocale, Skills-docs: follow-up #36873); #36876 (a source-language rename over an inline locale-map label flattens the map); the RecordTabsConfig tab-rename gate reading sourceLocale is with triage (seat request 7123598133). Remaining nits as recorded on the PR (L1 N1–N4).

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

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions