Skip to content

记录页签改名:判断“是否源语言”仍拿默认语言比,应改用服务端下发的源语言(sourceLocale) #36875

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① a defect with a named location, filed by triage at repo:objectstack#3's request (mailbox #36743, comment 7123598133, item 1). Source: seat 3's ux-A dev on #36504 (PR #36858), outside that diff.

What happens

The record-tabs design-mode rename decides whether the user is renaming in the source language: in the source language a rename writes the label itself, and in any other language it writes a translation. It makes that call by comparing the UI language with the deployment's default locale.

In ui/packages/app-shell/src/views/recordTabsConfigIo.tsx (main 76bff41), this is fetchDefaultLocale at ~line 64 and isSameLanguage(language, defaultLocale) at ~line 72. PR #36858 serves the source locale (sourceLocale on /i18n/locales), and the menu rename moves to it there, but the record-tabs gate still uses the default locale.

Where a deployment's default locale differs from its metadata's source language, a tab rename is stored in the wrong place: as the source label when it should be a translation, or the reverse.

reach: read by the dev, not measured in a browser. It reaches builders renaming record tabs in design mode on deployments whose default locale is not the source language.

Expected

The record-tabs rename gate uses the same source-locale reading as the menu rename after #36858.

Acceptance

Order

After PR #36858 merges. sourceLocale is served from there.

Blocked-by: #36858

Dedupe: open issues for fetchDefaultLocale, sourceLocale and tab rename locale return only #36504, the parent this follows.

Activity

  1. added
    bug
    priority:p2
    pm:blocked
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · priority:p2 · Bug · pm:blocked (Blocked-by: #36858) · size XS.
    Rationale: on some deployments a tab rename is stored as the wrong kind of text. It sits in the design-mode rename family of #36504 (ux) and does not reach every user every time, so the UX rule gives p2. The unlock scan queues the card when PR #36858 merges.

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlock: Blocked-by: #36858 is satisfied, so pm:blocked → pm:queue. The grade is unchanged (p2).

    PR #36858 merged at 2026-11-24T06:43Z. sourceLocale is served on main, so the record-tabs gate can use it.

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 24, 2026
  5. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv

    Claim: PM loop round 1 · zone o5-U (area:ux p1/p2; the maintainer, verbatim, 2026-11-25T23:27Z project thread: 「再开两个专区,接ai ux 的 p1 p2 任务」) · 2026-11-25T23:38Z
    Session: session_01Utp6Ca6EBDpTBZk8v46Jjv
    Account: os-bill
    Area: o5-U
    Branch: claude/issue-36875-record-tabs-source-locale
    Worktree: objectstack-issue-36875
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: ui/packages/app-shell/src/views/recordTabsConfigIo.tsx and its tests (new test file named for this card), reuse of the source-locale reader PR #36858 added (read, not changed), root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the console's own design-mode rename (objectstack, ui/packages/app-shell) | the served sourceLocale reader from PR #36858 already covers it for the menu rename | builders renaming record tabs on a deployment whose default locale is not the source language
    Thread-read: 7125111365
    Premise: holds — on origin/main 98bda0ac recordTabsConfigIo.tsx ~64–72 still gates on fetchDefaultLocale / isSameLanguage(language, defaultLocale)
    Serial constraints cleared: no open PR touches recordTabsConfigIo.tsx; no in-flight claim on it
    Pre-claim lane: domain:ui (ui/packages/app-shell)
    Pre-claim deps: Blocked-by: #36858 merged 2026-11-24T06:43Z
    Prior rulings read: sourcelocale → 0 hits; none; thread: none; repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv
    os-dev-report

    {
     "issue": 36875,
     "status": "done",
     "branch": "claude/issue-36875-record-tabs-source-locale",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37381",
     "head": "e2288d21e3a7851232dede102d65e96243762f29",
     "session": "session_01Utp6Ca6EBDpTBZk8v46Jjv",
     "premise_still_valid": true,
     "summary": "recordTabsConfigIo.tsx no longer gates rename on fetchDefaultLocale + isSameLanguage(language, defaultLocale); it reads fetchDeploymentLocales() (the PR 36858 reader, cached, shared with the menu) and takes labelLanguageOf(language, locales).source, the menu rename's exact gate, so the served sourceLocale decides and the reader's own fallback (default locale when none served) applies. New test file RecordTabsConfig-36875.test.tsx covers default zh-CN / source en from both reader languages plus the no-sourceLocale fallback. Card assignee not touched (PR assigned to the claim Account os-bill via pr_create).",
     "files_changed": [
      ".changeset/36875-record-tabs-source-locale.md",
      "ui/packages/app-shell/src/views/recordTabsConfigIo.tsx",
      "ui/packages/app-shell/src/views/__tests__/RecordTabsConfig-36875.test.tsx"
     ],
     "acceptance": [
      {
       "item": "recordTabsConfigIo.tsx decides source language from served sourceLocale through the 36858 reader, with its fallback",
       "check": "met: fetchDeploymentLocales + labelLanguageOf(...).source; no second fetch; test case 3 pins the fallback"
      },
      {
       "item": "a test with default locale != source language stores a tab rename as a translation",
       "check": "met in substance, wording deviates: the record-tabs editor has no translation write path (outside the source language rename is closed by design). Test case 1 (default zh-CN, source en, reader zh-CN): rename disabled with the source-only hint, nothing written; case 2 (reader en): save writes relatedLists [{list:contact,label:Contacts we know},task]. See open_questions."
      }
     ],
     "tests": "at e2288d21: cd ui && pnpm exec vitest run --maxWorkers=2 (RecordTabsConfig-36875, RecordTabsConfig-36499, RecordTabsConfigInstalled-36499 + packages/app-shell/src/layout/) under os-verify-lock -> VERDICT command-exit 0, Test Files 167 passed (167), Tests 1467 passed (1467). pnpm --filter @object-ui/app-shell run type-check -> VERDICT command-exit 0. Reverse check (fix committed first): recordTabsConfigIo.tsx checked out from origin/main (fetchDefaultLocale grep -c 2), new file run -> Tests 2 failed | 1 passed (3), cases 1 and 2 red, case 3 (fallback) green as expected; restored via git checkout HEAD -- PATH in an EXIT trap, HEAD blob hash matched, git diff HEAD empty. No dist ablation needed: tests resolve app-shell via relative src imports.",
     "gates": "local: pnpm --filter '@object-ui/app-shell^...' build exit 0; dispatch-gates --commands --repo objectstack-ai/objectstack derived 38 commands, all exit 0 (pnpm --dir ui exec vitest run scripts/ was SIGKILLed by OOM on the first unlocked run, rerun under os-verify-lock --maxWorkers=2: exit 0, Test Files 172 passed | 2 skipped); --ran reconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero); overlap-check --branch=HEAD VERDICT clean exit 0. CI on e2288d21: 51 check-runs, 38 success, 13 skipped, 0 failure (incl. Check Changeset, Lint & Repo Gates, Lint UI, Test UI 1-9/16 + Test UI, Test Core, Type Check UI, Type Check workspace/source/consumer/debt, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, PR-body guards, Lint PM dispatch-gates).",
     "line_budget": "241 changed lines (+234/-7), 3 files, under the 3000 human-merge threshold",
     "dogfood_battery": "n/a — no ! in the PR title and Clause-② no",
     "mcp_calls": "0",
     "api_writes": "3 — git push (branch probe + one push, not REST); relay pr_create POST /repos/objectstack-ai/objectstack/pulls (+ assignees POST issues/37381/assignees, read back identical 4666 bytes, assignee os-bill); post-stamped comment POST /repos/objectstack-ai/objectstack/issues/36875/comments (this report)",
     "readings": "A1 holds: on 98bda0ac the gate was fetchDefaultLocale (L64) + isSameLanguage(language, defaultLocale) (L72); the 36858 reader is fetchDeploymentLocales/labelLanguageOf in layout/designModeMenuSave.ts, reused unchanged. A2: no other design-mode rename path on the default-locale gate; git grep fetchDefaultLocale / isSameLanguage( under ui/ outside tests finds only the reader file itself, and fetchDefaultLocale now has zero callers.",
     "deviations": [
      "Acceptance item 2 wording (translation write) does not match the code: no translation path exists in record tabs; the test proves the source-label write is closed for a default-locale reader instead.",
      "First unlocked run of vitest scripts/ OOM-killed on the shared box; rerun under the lock."
     ],
     "open_questions": [
      {
       "question": "Should record-tab renames outside the source language write a translation (as acceptance item 2 literally reads) instead of being closed?",
       "options": [
        "A keep closed (current, ruling (4) precedent of 36499); card closes on this PR",
        "B new card for a translation write path in record tabs (objects.OBJECT._relatedLists.LIST.label translation), needs a ruling"
       ],
       "recommendation": "A, because the card's Expected is only that the gate use the same source-locale reading as the menu, which is met; B is a new capability"
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — fetchDefaultLocale in ui/packages/app-shell/src/layout/designModeMenuSave.ts has no caller after this PR (dead export, in the 36858 reader file, outside file surface)",
      "carrier: none · noted, not filed — RecordTabsConfig.tsx ~L95 comment still says 'the default language' (comment only, outside file surface)"
     ]
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

    ACCEPT → PR #37381 comment 7179276413

  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

    Close-out · 2026-11-26T03:02Z

    Delivered by PR #37381, merged 2026-11-26T03:02Z: the record-tabs rename gate reads the served sourceLocale. Acceptance item 2 was cut at L1 (7179276413 §4): outside the source language the editor writes no translation by design. pm:dispatched removed. The two p3 loose ends (fetchDefaultLocale has no caller; a stale comment in RecordTabsConfig.tsx) ride o5-U's next card on that file.

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

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions