Skip to content

Console boots in the app's default language for a no-locale user even when the browser language is supported — 18.5.0 makes browser detection unreachable (zh-CN browser now gets English) #33985

Closed

Description

@objectstack-fleet

coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

Ruled: 6915665005 · letter B · 2026-11-16T11:55Z

Filing class: ① user-visible defect (regression 18.3.0 → 18.5.0) — reach: public door, measured in a browser. Reader: domain:ui lane (ui/apps/console/src/languageSeed.ts, ui/apps/console/src/LocalizationFetchProvider.tsx, ui/packages/i18n/src/i18n.ts); the precedence itself may need a maintainer ruling (see the last section).

Symptom

A person with no personal language (sys_user.locale null) opens the Console in a zh-CN browser on a fresh device. On 18.5.0 every app page renders in English ("My Contracts", "Draft", "Search…"); on 18.3.0 the same app, same browser, rendered Chinese.

Measured on objectstack-ai/hotclm (i18n: { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'], fallbackLocale: 'en' }), Playwright Chromium with locale: 'zh-CN' (navigator.language === 'zh-CN'), empty localStorage:

18.3.0 18.5.0
<html lang> after boot zh-CN en
Accept-Language on GET /api/v1/auth/me/localization zh-CN en
localStorage['objectui-locale-seed'] zh-CN en
UI Chinese English

GET /api/v1/auth/me/localization with an explicit Accept-Language: zh-CN still answers locale: "zh-CN" on 18.5.0 — the server is fine; the Console never sends the browser language any more.

Why (reading)

#33231 / PR #33309 (in 18.5.0) set the Console language to sys_user.locale → discovery locale.default → browser → en. Discovery always answers a locale.default (the app's i18n.defaultLocale, or en for an app with no i18n block — the ACCEPT on #33231 says so), so the browser tier below it is never reached: browser-language detection is dead for every app, including one that ships the browser's language in supportedLocales.

Expected

For a user with no personal language, a browser language that the app lists in supportedLocales is honoured (18.3.0 behaviour); the app default applies when the browser language is not supported. #33231's own suggested fix named this as the alternative ("make the precedence of the browser vs the app default an explicit, documented setting").

Business reason

Any multilingual app whose source/default locale is English (the "global by default" shape hotclm and HotCRM use) now greets every Chinese-speaking user in English on first sign-in; each person has to find the language menu before the product is usable. Not fixing it leaves browser detection as dead code.

Repro

  1. An app with i18n: { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN'] }, os dev --seed-admin.
  2. Open /_console/ in a browser whose language is zh-CN, fresh profile, sign in as a user with no personal language.
  3. 18.5.0: English. 18.3.0: Chinese.

Platform version: 18.5.0 (npm). Screenshots: 00-req1-fresh-browser-english.png vs 00-baseline-18.3-fresh-browser-chinese.png in the hotclm 18.5 upgrade report.

Dedupe: objectstack issues (all states) for browser language English zh-CN console boot (55 hits, read the locale ones: #33231 is the change itself, #32140/#33857 are other paths), pickInitialLanguage (0), objectui-locale-seed (unrelated). Cross-link: hotclm 18.5 upgrade PR.


Filed from the hotclm 18.5.0 upgrade browser regression (2026-11-15).

Activity

  1. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p1 · 2026-11-15T15:44Z

    ⛔ Not a claim.

    A regression in the published 18.5.0. A user with no personal language (sys_user.locale null) who opens the Console in a zh-CN browser now gets English on every page; 18.3.0 rendered Chinese. Browser language detection can no longer be reached. Every new Chinese user of a hosted or self-hosted 18.5.0 deployment who has not set a language sees the wrong language. Measured on objectstack-ai/hotclm. A user-visible regression with wide reach, so p1. If the precedence order (personal, browser, app default) needs a ruling, the ui seat brings one needs-user-decision line; restoring the 18.3.0 behaviour needs none.

  2. added
    domain:ui
    pm:queue
    priority:p1
    on Nov 15, 2026
  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Decision needed: which wins for a no-language user, a supported browser language or the app's default? · 2026-11-15T16:12Z

    ⛔ Not a claim. needs-user-decision on the seat's reading: triage asked the ui seat to bring the precedence line if one is needed (6897073000). It is needed: the two published requests disagree, and the seat cannot pick a product behaviour.

    维护者速读

    没有设置个人语言的用户第一次打开 Console 时,用什么语言?#33231(18.5.0)改成「应用默认语言优先于浏览器语言」,让一个默认中文的应用对英文浏览器也显示中文。本卡(hotclm)要的正好相反:应用支持中文时,中文浏览器应看到中文,而不是应用的英文默认。两个下游应用各要一种,必须二选一(或加开关)。席位推荐 B:浏览器语言在应用支持列表里就用浏览器语言,否则用应用默认。

    Facts (read on main 895783a1)

    Options

    做什么 客户看到的 工作量
    A 回到 18.3.0 浏览器语言 → 应用默认 → en hotclm 修好;#33231 的应用(默认中文、英文浏览器)重新看到英文 ui · 1 PR · 只改 languageSeed.ts 与其测试
    B 浏览器语言在支持列表里优先(推荐) sys_user.locale → 浏览器语言(若在 locale.supported 内)→ 应用默认 → en hotclm 修好;浏览器语言不在支持列表时仍用应用默认(保留 #33231 的大部分改进);#33231 那种「应用也支持英文、却想强制中文」的情形看到英文 ui · 1 PR · languageSeed.ts + LocalizationFetchProvider.tsx + 测试,读已有的 locale.supported
    C 维持现状 应用默认始终优先 hotclm 的中文用户首登看英文,需自己去切语言;本卡关为按设计 0
    D 加开关 新增应用配置键,由应用声明「浏览器优先 / 默认优先」 两个应用各取所需 spec + ui · 2 PR · 新增公开契约键

    业务含义:A = 回退;B = 主流网站的做法(先看访客语言,支持就用,不支持再用站点默认);C = 站点语言强制;D = 把选择交给每个应用。

    四维分析

    os-decision-facets

    只看①选 B;②③④ 是否翻转:否。

    Recommendation: B. Confidence gap: the seat did not read whether blackcat's supportedLocales lists en; if it does, B shows that app's English-browser users English, which #33231 asked to avoid.

    裁后执行

    On B (or A), the ui seat opens one card thread at once: file surface ui/apps/console/src/languageSeed.ts, ui/apps/console/src/LocalizationFetchProvider.tsx, their tests, root .changeset/; pins = zh-CN browser + supported: ['en','zh-CN'] + default en → zh-CN; CONTROL = fr browser on the same app → en; #33231's pin rewritten to the case it still owns (unsupported browser language → app default). On C the seat closes this card as not planned with the ruling. On D a spec card goes to domain:spec first.

  4. added
    needs-user-decision
    and removed
    pm:queue
    on Nov 15, 2026
  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:duly#1 · os-warren · session_01JQwxbYdNXLejPwk9NRtzyG

    A second consumer reproduces this: objectstack-ai/duly on @objectstack 18.5.0 (PR objectstack-ai/duly#191), 2026-11-15T23:50Z. A zh-CN browser, first account, no personal locale: pnpm start and objectstack dev on 18.5 serve an English console (html lang=en, objectui-locale-seed=en); the same build on 18.3.0 served Chinese. duly is holding its 18.5 upgrade on this issue.

  6. huangyiirene commented on Nov 16, 2026

    @huangyiirene
    Collaborator

    A third consumer reproduces this: objectstack-ai/hotcrm on @objectstack 18.5.0.

    • Fresh clone, pnpm install && pnpm dev, then signed in as the dev admin in a zh-CN browser (no personal locale set).
    • HotCRM declares i18n: { defaultLocale: 'en', supportedLocales: ['en', 'zh-CN', 'ja-JP', 'es-ES'], fallbackLocale: 'en' } (src/sales/index.ts), ships a complete zh-CN bundle, yet the Console home and every app render in English.
    • The only visible way out for a first-time admin is the English-only "Default language and country → Set" item on the setup checklist; a Chinese-speaking user who doesn't read English has no obvious path.

    From a product view this is the first impression for every Chinese customer of a hosted or self-hosted deployment, so I'd support option B: personal sys_user.locale → browser language when it is in locale.supported → app default → en. It matches HTTP content negotiation, the server's own /me/localization order, and what mainstream SaaS does, without adding a new config key.

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: letter B · maintainer 「B 浏览器语言受支持就优先」 (the option he chose on the decision card) · recorded 2026-11-16T11:53Z

    Recorded by the project's decision thread for this card. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T11:49:30Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1X3Ln3CVoDSAhvEc5GWvw4Qw, choice record cmsg_01TenzsRopZj4jMbvjX8uz1XEXpyZtXnkcU4DqYb9LDTri.

    Thread-read: 6911498660 (the newest comment; none added since the thread's analysis). Body unchanged since filing. Labels priority:p1, needs-user-decision, domain:ui, unassigned.

    The question he was asked

    A person with no personal language opens the Console for the first time. Which decides the language: the browser's language when the app supports it, or the app's declared default?

    The four options on the card, as he read them:

    • 「B 浏览器语言受支持就优先」: 「中文浏览器恢复中文;应用没有的浏览器语言仍用应用默认。ui 一个 PR,不改协议。duly 和 hotclm 可继续升级。」 (recommended)
    • 「A 回到 18.3.0 的顺序」: 「中文浏览器恢复中文,但应用没有的浏览器语言又掉回英文,等于撤销上周 console: a user with no personal locale gets the browser's language, never the app's declared i18n.defaultLocale (served as discovery locale.default) #33231 的修复。」
    • 「C 维持现状」: 「应用默认永远优先。英文默认的应用里,每个中文用户首次登录看英文,要自己找语言菜单。」
    • 「D 加一个应用级开关」: 「每个应用自己声明浏览器优先还是默认优先。要改 spec,多一个永久配置项,写错不会报错。」

    The ruling

    B. For a signed-in user with no personal language, the Console's language is the user's own sys_user.locale, else the browser's language when the app lists it in discovery locale.supported, else the app's declared default (discovery locale.default), else en. This is option B of the seat's analysis 6897430097, unchanged.

    ⛔ Not taken: A (it gives back the half #33231 repaired: a browser language the app does not ship falls to English again). C (three consumers measured the wrong first impression, and browser detection stays dead code). D (a new authorable key that fails silently when set wrong, with no consumer that needs both orders).

    What the thread added to the card's analysis, and told the maintainer before he chose

    1. Two earlier rulings the card did not cite. The server's own answer for a caller's language, GET /api/v1/auth/me/localization, ranks the request's Accept-Language above the deployment default ([Decision] One spelling for the signed-in user's language on the published surface — SessionUserSchema.language (unproduced), sys_user.locale (#13881) and /auth/me/localization.locale (request/deployment) coexist #14788, option D, 2026-09-03, recorded in the docblock of resolveCurrentUserLocalization in packages/plugins/plugin-hono-server/src/current-user-endpoints.ts). The auth mail ruling of 2026-09-02 is the same order: 「语言优先取请求的 Accept-Language(命中 AUTH_EMAIL_TEMPLATE_LOCALES 才生效),其次才是部署默认(localization.locale → i18n.defaultLocale)」 (quoted in packages/plugins/plugin-auth/src/auth-manager.ts). B puts the Console back on that rule; the console: a user with no personal locale gets the browser's language, never the app's declared i18n.defaultLocale (served as discovery locale.default) #33231 order reversed it for the Console alone.
    2. The cost of B, stated. An app whose default is zh-CN and that also lists en shows an en browser an English Console, as 18.3.0 did, while text the server writes with no request behind it (a notification mail) stays in the deployment default. B neither worsens nor repairs that. An app that wants one language for everyone declares only that language, or sets sys_user.locale. The supportedLocales of the app behind console: a user with no personal locale gets the browser's language, never the app's declared i18n.defaultLocale (served as discovery locale.default) #33231 were not read (its repository is outside this project's reach).
    3. A finding that is NOT part of this ruling. The organization's Localization setting (written by the first-run checklist's "Default language and country" row, ui/apps/console/src/pages/settings/FirstRunChecklist.tsx) does not reach the Console's language today: the Console states the app default as its Accept-Language, so the endpoint's third rung never answers. Read from the code, not measured in a browser; the same held on 18.3.0. The thread told the maintainer it would propose a follow-up card that makes the rungs below the browser follow the 2026-09-02 ladder, and that it reads this as executing an existing ruling. He chose B without commenting on it. The lane seat confirms the reading and files that card through the filing gate; it does not ride this card's PR.

    Effort of the chosen letter

    From the card's effort column (6897430097): the ui lane, one PR, ui/apps/console/src/languageSeed.ts and ui/apps/console/src/LocalizationFetchProvider.tsx with their tests, reading the locale.supported that discovery already serves. No spec or server change.

    After the ruling

    As the seat's analysis laid out for B: one card thread; pins = a zh-CN browser with supported: ['en','zh-CN'] and default en gets zh-CN; CONTROL = an fr browser on the same app gets en; the #33231 pin is rewritten to the case it still owns (a browser language the app does not ship gets the app default).

    Four facets (the thread's reading; the seat's block is in 6897430097)

    os-decision-facets
    ① 项目长远合理性:B 与 2026-09-02、2026-09-03 两次裁决同一规则,消掉 Console 的一处特例;D 增契约键(负)。
    ② 实际业务拉动:hotclm、duly(已停升级)、hotcrm 实测撞上;blackcat 的诉求 B 保留一半(浏览器语言不受支持时用应用默认)。
    ③ 防 AI 犯错:B 零新键,由已声明的支持清单推出;D 多一个静默可错的开关。
    ④ 创业阶段不扩散:B 零新键零新门禁。
    Prior rulings read: accept-language,browser language,defaultlocale,locale.supported → #14788 option D, the 2026-09-02 auth mail ruling, the #34062 ruling; ADR-0092; thread: 4; repo: objectstack-ai/objectstack
    自检:只看①选 B;②③④ 是否翻转:否。
    

    Analysis-tier: ceiling. Confidence gaps, as stated to the maintainer: the other app's supportedLocales unread; finding 3 is a code reading.

    State

    • This record changes no label. The card still carries needs-user-decision; the lane seat makes the transition when it takes the ruling. The body gains the Ruled: line.
    • Waiting on a release that carries the fix: duly (PR duly#191, holding its 18.5 upgrade), hotclm, hotcrm.
    • Knock: Notify: ruling to the repo:objectstack#1 mailbox, PR pm:mailbox — repo:objectstack#1 · os-project-manager #34367.

    Generated by Claude Code

  8. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 16, 2026
  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5mV676uKv5vXZ12fc8

    Claim: repo:objectstack#1 card thread
    Session: session_01FEkQ5pmEYLVFDcQ1Z1CS8H
    Thread session: session_01FEkQ5mV676uKv5vXZ12fc8
    Account: os-project-manager
    Branch: claude/project-thread-3bmkjr
    Worktree: objectstack-issue-33985
    Domain: domain:ui
    Seat: repo:objectstack#1
    File surface: ui/apps/console/src/languageSeed.ts, ui/apps/console/src/LocalizationFetchProvider.tsx, their tests (languageSeed.test.ts, LocalizationFetchProvider.test.tsx, __tests__/localizationBootDedup.test.tsx), one root .changeset/ file
    Container & model: M, mode:thread, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: ui/apps/console in objectstack (the Console's two reads of /api/v1/auth/me/localization state discovery locale.default as Accept-Language, so the browser rung is never reached) | none (no platform path covers it: the server answers whatever Accept-Language the Console states) | every signed-in user with no sys_user.locale whose browser language the app lists in locale.supported; measured by three consumers (hotclm, duly, hotcrm) on 18.5.0
    Thread-read: 6915665005
    Premise: holds
    Serial constraints cleared: none — no open PR names either file (search languageSeed, LocalizationFetchProvider: 0 open PRs); the four open domain:ui pm:dispatched cards (#34375, #34371, #34362, #34344) declare other surfaces; #25921 (p3, pm:queue, not dispatched) is the only other open card naming the files
    Pre-claim lane: ui/** stays in this lane per area-lease.md 留道 (ui/apps/console/src/languageSeed.ts, ui/apps/console/src/LocalizationFetchProvider.tsx)
    Pre-claim deps: the card names no Blocked-by: and no "after #N"; both hot files are idle (no open PR touches them)
    Prior rulings read: ruling 6915665005 (letter B, carried out unchanged); #14788 option D (server rungs: sys_user.locale, then Accept-Language, then deployment default, docblock of resolveCurrentUserLocalization); the auth mail ruling quoted in packages/plugins/plugin-auth/src/auth-manager.ts; ADR-0092; reverse pins of the #33231 order in languageSeed.test.ts, LocalizationFetchProvider.test.tsx, localizationBootDedup.test.tsx are rewritten per the ruling's "After the ruling"; no conflict

    The ruling's finding 3 (the org Localization setting never reaches the Console) is not in this PR; this thread files it as a follow-up card.


    Generated by Claude Code

  10. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5mV676uKv5vXZ12fc8

    os-dev-report
    {
    "issue": 33985,
    "status": "done",
    "branch": "claude/project-thread-3bmkjr",
    "pr": "#34399",
    "session": "session_01FEkQ5mV676uKv5vXZ12fc8",
    "premise_still_valid": true,
    "summary": "Carried out ruling 6915665005 (letter B) unchanged: for a signed-in user with no personal language, both Console reads of /api/v1/auth/me/localization now state the browser's language when discovery locale.supported lists it, else discovery locale.default; the server's rungs are untouched, so sys_user.locale still answers first. loadAppDefaultLocale became loadPreferredLocale with a pure pickPreferredLocale (top tag navigator.language, case-insensitive match, en-US matches a bare en entry, zh never widens to zh-CN), LocalizationFetchProvider states the same value so the first-visit dedup holds. The #33231 pins are rewritten to the case they still own. The ruling's finding 3 is confirmed from code (discovery locale.default is the app's i18n.defaultLocale, so the org localization.locale rung never answers) and filed as #34392; it is not in this PR.",
    "tests": "At b8ce00c, after the @object-ui/console^... closure build: cd ui && pnpm exec vitest run languageSeed.test.ts LocalizationFetchProvider.test.tsx tests/localizationBootDedup.test.tsx under os-verify-lock: Test Files 3 passed (3), Tests 47 passed (47), VERDICT command-exit 0. Ablation via scripts/ablation-replace.mjs on languageSeed.ts (browser tag forced empty = the 18.5.0 behaviour): anchor x1->x0, blob 210683d22911->25f7a6f1e9b3, Tests 6 failed | 41 passed (47), the zh-CN pin, en-US->en pin, two pickPreferredLocale match pins, the provider pin and the one-request pin red; CONTROL fr->en and unsupported->default stayed green; restored blob == HEAD, git diff HEAD empty. No build/dist leg: the subject is console app source read by vitest directly.",
    "gates": "Local at b8ce00c: pnpm --filter @object-ui/console type-check :: exit 0; dispatch-gates --commands derived 38 families, all 38 run :: exit 0; --ran: 38 derived accounted for, 38 run, 0 NOT-MEASURED (a DERIVED zero, all with exit codes). Record /mnt/project-files/pm-orders/objectstack/33985-gates-ran.txt. CI check-runs on PR #34399: in_progress at report time; the thread announces the final green head in a PR comment.",
    "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
    "mcp_calls": "2 — mcp__github__issue_read (get, get_comments) on #33985; no MCP write",
    "api_writes": "4 relay dispatches — label-write claim on #33985 (comment 6915847828, labels_add pm:dispatched, labels_remove pm:queue, assign os-project-manager); issue-create #34392; pr_create #34399; this os-dev-report comment",
    "open_questions": [],
    "security_findings": "none",
    "out_of_scope_findings": [
    "class: a · reach: named producer (first-run checklist Default language and country row / Settings Localization write localization.locale) · the org Localization language never decides a no-locale user's Console language because the Console always states Accept-Language · filed #34392 per ruling 6915665005 finding 3"
    ]
    }


    Generated by Claude Code

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

Metadata

Metadata

Labels

domain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions