Skip to content

Marketplace install: a 简体中文 console on an organization with no language gets English sample data, the confirm never names the language, and the three sample counts disagree #39681

Description

@objectstack-fleet

repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2

Context

This is a retest of the new-company walkthrough on main at f7c60e5b86, which includes the #39469 / #39437 fixes. The run used a fresh database, pnpm console:build, and the dev admin with the console in 简体中文 (browser language). Organization basic info was not saved yet, which is what a new company looks like right after its first sign-in; since f927afa the dev seed writes no localization setting either. HotCRM 7.1.0 was then installed from 浏览应用市场.

#39469 and #39437 are confirmed fixed:

  • the false 「会修改已有对象」 section is gone;
  • seed-file rows load, so crm_contract / crm_quote exist with their signed PDFs and the flagship order's links resolve;
  • a reinstall now reports 「487 条示例记录没有写入」 instead of a stale count.

The items below are what remains.

What happens

  1. The sample data comes in the wrong language, and nothing says so.
    • The confirm's sample row reads 「示例记录:取决于安装时使用的语言」 and never names that language.
    • The install loaded the English story ("Acme Annual Renewal 2025 Order", "Globex …"), while the admin reads the whole console in Chinese.
    • The cause is the seed-locale fallback (Seed.locale: marketplace install, reseed sample data and per-org replay should select datasets by the installing organization's locale #30281): organization localization.locale, then sys_user.locale, then the app default. Here the organization has no language and the admin has no stored locale (get-session user.locale = null), so the fallback lands on the app default, en. The console's own language, taken from the browser, is never consulted.
    • The admin learns this only after the install, from the records themselves. To get Chinese samples, they would have to find 公司信息, set the language, clear the samples and reseed.
  2. The three sample counts on one page disagree.
    • The install result says 「本次安装载入了 486 条示例记录 … 1 条示例记录没有写入:它们已经存在,或在之前载入后已被删除。」. The answer body is seeded: { inserted: 486, updated: 0, skipped: 1, errors: 0, droppedRefs: 0 }.
    • The database was created empty for this run, so nothing could already exist or have been deleted earlier. The explanation offered for the skipped row cannot be true here, and the result names no row.
    • 清除示例数据 then says 「最多删除 482 条示例记录」, and GET …/install-local/app.objectstack.hotcrm/sample-data answers count: 482.
    • The crm_* objects hold 482 rows in total (summed per object through the data API).
    • So the install claims 4 more "sample records" than exist as app records or can be cleared. Those 4 are probably non-record writes counted as records, such as stored seed files; not verified.
  3. The reinstall confirm offers a grant that is already accepted. After 「CRM 用户」 was granted to Everyone, 重新安装 still says 「安装后会建议将「crm_user」授予所有已登录用户(Everyone 岗位)。在你接受之前不会授予任何权限。」. It also opens with 「安装会向此运行时加入以下内容」, which describes a first install. The customization side of the reinstall wording is already tracked in Installed-package customization polish: Studio says "read-only" while it saves edits, English source labels in a zh-CN Studio, and reinstall wording #39472.

Expected

  • The confirm names the language the samples will load in. When it differs from the language the installing admin is reading, it says so and offers a way to choose: at least a link to set the organization language first, or a language choice in the confirm.
  • Possibly, as a design call: the installing user's current console language joins the seed-locale fallback before the app default.
  • inserted counts records of the package's objects only, or the result says what the other writes were. The result, the clear dialog and the sample-data count agree.
  • A skipped row on an empty database is named, or the "already exist / deleted earlier" explanation is shown only when it can be true.
  • A reinstall confirm does not re-offer a grant that is already accepted, and its wording describes a reinstall.

Where to look

  • packages/runtime/src/seed-locale.ts (resolveSeedLocaleForLoad) and packages/cloud-connection/src/marketplace-install-local-plugin.ts around the seed locale log line (~8212).
  • ui/packages/app-shell/src/console/marketplace/sampleDataNotice.ts (sampleDataOutcome), installPreview.ts (the 「取决于安装时使用的语言」 branch), and MarketplacePackagePage.tsx (the reinstall confirm).

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ux · domain:ui · Bug · p2 · pm:queue · size M, touched 2026-12-04T13:14Z. Rationale: a new-company walkthrough retest after the #39469 and #39437 fixes. A 简体中文 console on an organization with no language setting yet installs a marketplace app and gets English sample data, and the confirm never names the language. It is the first-run path of every new company, so p2 as filed. Both domain:ui and domain:server stay, since the fix reads the console locale into the install. Size M: the install door, the confirm and their tests. Issue type set to Bug.
    Grade: p2 · reach: every new company that installs an app before saving its organization language · evidence: reproduced on main f7c60e5 · claimable.

  3. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop · seat exception slot · 2026-12-04T14:14Z
    Dispatched-by: the maintainer, verbatim, 2026-12-04T14:11Z: 「39681 现在就派」
    Session: session_01L9qibzVCaQPuEu6rGmqH8J
    Account: os-tesla
    Branch: pending — mode:thread. The card thread pushes only the branch the platform assigns it; the zone posts a Branch: amendment here when the thread opens.
    Worktree: the card thread's own checkout
    Domain: domain:ui
    Seat: repo:objectstack@os-tesla
    Area: ot-ux
    File surface: packages/runtime/src/seed-locale.ts, packages/cloud-connection/src/marketplace-install-local-plugin.ts, ui/packages/app-shell/src/console/marketplace/sampleDataNotice.ts, ui/packages/app-shell/src/console/marketplace/installPreview.ts, ui/packages/app-shell/src/console/marketplace/MarketplacePackagePage.tsx, ui/packages/app-shell/src/console/marketplace/__tests__/, ui/packages/i18n/src/namespaces/marketplace/
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no (re-declared by amendment if the install-preview answer in packages/spec widens)
    Metadata-protocol: none
    Responsibility: platform code in objectstack (seed-locale fallback + marketplace install confirm and result) | none — no app can name the seed language or reconcile the counts | every new company that installs an app before saving its organization language, used today
    Thread-read: 7412600189
    Premise: holds (origin/main 8e4dda4: resolveSeedLocaleForLoad rungs org setting → sys_user.locale → app default, seed-locale.ts:124-152; sampleDataNotice.ts:43 counts inserted + updated + skipped)
    Serial constraints cleared: NOT all. check-handover --inflight at 8e4dda4 reads OVERLAP with #39472 (claim 7411194731; PR #39683 in the queue holds MarketplacePackagePage.tsx, installPreview.ts and ui/packages/i18n/src/namespaces/marketplace/) and #39569 (claim 7410835379, ui/packages/i18n/src/namespaces/; PR #39707 accepted). Serial: the UI and i18n half starts only after #39683 and #39707 merge and #39472 confirms no further PR on these files; the server half (seed-locale, install result counts) has no overlap and starts now.
    Pre-claim lane: domain:ui + domain:server (triage kept both).
    Pre-claim deps: none named (no Blocked-by:).
    Prior rulings read: seed-locale.ts docblock (the 2026-11-05 install-path reversal, "Never an 'en' guess"); #30281 fallback order. Adding the console language as a rung changes that order, so it goes to the maintainer as a decision and is not built unasked. The confirm naming the resolved language plus a link to set the organization language is built without it.
    Order: /mnt/project-files/objectstack-seat-os-tesla/ot-ux/order-39681.md
    Fold-or-serial: not folded with #39322 (disjoint files).

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

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop · seat exception slot · 2026-12-04T14:15Z · re-stated with the thread's branch (supersedes 7414035857; surface unchanged)
    Dispatched-by: the maintainer, verbatim, 2026-12-04T14:11Z: 「39681 现在就派」
    Session: session_01L9qibzVCaQPuEu6rGmqH8J
    Account: os-tesla
    Branch: claude/project-thread-o9cirh
    Worktree: the card thread's own checkout (cmsg thread for #39681)
    Domain: domain:ui
    Seat: repo:objectstack@os-tesla
    Area: ot-ux
    File surface: packages/runtime/src/seed-locale.ts, packages/cloud-connection/src/marketplace-install-local-plugin.ts, ui/packages/app-shell/src/console/marketplace/sampleDataNotice.ts, ui/packages/app-shell/src/console/marketplace/installPreview.ts, ui/packages/app-shell/src/console/marketplace/MarketplacePackagePage.tsx, ui/packages/app-shell/src/console/marketplace/__tests__/, ui/packages/i18n/src/namespaces/marketplace/
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no (re-declared by amendment if the install-preview answer in packages/spec widens)
    Metadata-protocol: none
    Responsibility: platform code in objectstack (seed-locale fallback + marketplace install confirm and result) | none — no app can name the seed language or reconcile the counts | every new company that installs an app before saving its organization language, used today
    Thread-read: 7412600189
    Premise: holds (origin/main 8e4dda4: resolveSeedLocaleForLoad rungs org setting → sys_user.locale → app default, seed-locale.ts:124-152; sampleDataNotice.ts:43 counts inserted + updated + skipped)
    Serial constraints cleared: NOT all. check-handover --inflight at 8e4dda4 reads OVERLAP with #39472 (claim 7411194731; PR #39683 in the queue holds MarketplacePackagePage.tsx, installPreview.ts and ui/packages/i18n/src/namespaces/marketplace/) and #39569 (claim 7410835379, ui/packages/i18n/src/namespaces/; PR #39707 accepted). Serial: the UI and i18n half starts only after #39683 and #39707 merge and #39472 confirms no further PR on these files; the server half (seed-locale, install result counts) has no overlap and starts now.
    Pre-claim lane: domain:ui + domain:server (triage kept both).
    Pre-claim deps: none named (no Blocked-by:).
    Prior rulings read: seed-locale.ts docblock (the 2026-11-05 install-path reversal, "Never an 'en' guess"); #30281 fallback order. Adding the console language as a rung changes that order, so it goes to the maintainer as a decision and is not built unasked. The confirm naming the resolved language plus a link to set the organization language is built without it.
    Order: /mnt/project-files/objectstack-seat-os-tesla/ot-ux/order-39681.md
    Fold-or-serial: not folded with #39322 (disjoint files).

  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Decision check: SETTLED by precedent, no maintainer card. The sample-data language for an organization with no language set follows the ruled fallback order (#30281 option A, 2026-11-05: organization locale, else the installing user's locale, else the app default; item 3 (c) names this exact case; spec packages/spec/src/data/seed.zod.ts:342-363), with rulings 6913660232 (#34062) and 7359875657 (#39043). Naming the language in the confirm, the mismatch notice and the link to 公司信息 are execution; a language picker inside the confirm (draft option D) is a new surface needing its own word.

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: session_01L9qibwHwLPqS2dsjTpyXhw

    #39681 reading: which language the sample data installs in when the organization has none

    Read at origin/main 7234001 (2026-12-04T13:50Z). Zone draft read: seed-locale-fallback-analysis.md (its reading was at 44cf0fc; the four files it cites are unchanged since).

    速读

    • 问题:新公司还没设公司语言,管理员界面是中文,装应用后示例数据却是英文,安装前没人告诉他。
    • 结论:示例数据用哪种语言已有裁定(公司语言,其次安装者自己选过的语言,最后应用默认语言),不用再请示。
    • 这次只做:确认框写明会装成哪种语言,和界面语言不同时提醒,并给出去设公司语言的入口。
    • 不做:不让浏览器语言悄悄决定全公司共用的数据。想要“不多点一步就是中文”,是“新公司默认语言”的新问题,另开卡请示。

    Verdict

    SETTLED by precedent. No decision card. The order stays as ruled; #39681's PR builds the confirm text without asking. The proposal to add the installer's current console language as a rung is not an option on this Bug card.

    The ruled order (authority, all fetched in this run)

    1. Seed.locale: marketplace install, reseed sample data and per-org replay should select datasets by the installing organization's locale #30281, maintainer ruling option A, 2026-11-05. No Ruled: comment carries it on this board; it is recorded in the card body, in triage audit 6650042287 ("Ruled A (2026-11-05)") and in landing record 6652643236 ("Ruling option A is carried out on all four paths"; PR feat(runtime,cloud-connection,organizations): the marketplace install, sample-data reseed, restart heal and per-organization replay pick seed datasets by the organization's language #30346, merge 8589756ac). The maintainer's words are quoted on the consumer card hotcrm#2411: 「hotcrm 的模拟数据,能不能中文客户安装时安装中文数据」, then option 「平台改安装 + 中文种子」. The ruled Ask, item 1: "the installing organization's effective localization.locale …, or else the installing user's sys_user.locale, or else the app's i18n.defaultLocale". Item 3 named the no-language case and landed on (a) with (c) behind it: "(c) fall back to i18n.defaultLocale and let the tenant reseed later".
    2. Governing text (the contract). packages/spec/src/data/seed.zod.ts:342-363: "first answer wins: the localization.locale setting … counted only when somebody set it …; then the sys_user.locale of the user who installs, reseeds or founds the organization …; then the app's declared i18n.defaultLocale". The same sentence is in the key's .describe(). packages/runtime/src/seed-locale.ts:8-33 repeats the three rungs and "Never an 'en' guess".

    So the card's question has a ruled, spec-declared answer: with no organization language, the installer's stored language decides, and with none stored, the app's declared default. #39681 measured exactly that (en, HotCRM's defaultLocale, src/sales/index.ts:320 in the local hotcrm checkout). Under 基本裁决原则 the spec declaration stands and the implementation matches it; there is no gap to rule on. Adding a rung changes the protocol text, which is 「改协议、新增公开面另立卡,⛔ 不作 Bug 选项」, and an option that conflicts with the governing text is not a decision card.

    Inheritance (meta-rule ①) and the premise check

    #39681 is a new branch of #30281's ruling and reuses it. A reopening needs a real semantic difference or a falsified premise. Neither was found:

    What #39681 measured is not that the order answers wrongly. It is that the confirm hides the answer (「取决于安装时使用的语言」, zh-Hans.ts:199; installPreview.ts:29-32).

    Family rulings that point the same way

    Counter-precedents read, and why they do not reopen

    The confirm dialog: execution, with one boundary

    • Naming the language: execution. It is the first Expected bullet of a Bug card the maintainer dispatched (「39681 现在就派」). It reports the ruled resolver's answer and changes no ruled behaviour.
    • Mismatch notice and link to 公司信息: execution. The link leads to the ruled rung 1 through an existing page. The notice is a client-side comparison.
    • A language choice inside the confirm (the card's alternative, the draft's D): NOT execution. It adds an input to the install request that would outrank the ruled rungs. It needs its own word and is not built here.
    • Contract point, not a maintainer decision. The preview needs a server answer carrying the resolved language and its source. Reuse the words already exported by @objectstack/runtime: ResolvedSeedLocale { locale, source } with 'organization-setting' | 'user' | 'app-default' (新键有先例:席位点名先例,否决窗口落地). If the shape lands in packages/spec, Clause-② becomes yes (widening) with an L2 at the contract review tier, as the order already says.

    Execution notes for the thread:

    • The answer must come from resolveSeedLocaleForLoad with the install's own organization, user and package default; no second copy of the rungs.
    • The confirm needs wording for the two other outcomes: no rung answers (every dataset loads), and a settings or user read that fails (the install then seeds nothing).
    • Compare the seed language with the console language by the platform's language folding, not by string equality, so a regional or script spelling of the same language is not reported as a mismatch.
    • The language can change between the preview and the install; the result should name the language the install actually used.

    Corrections to the zone draft

    The recommendation (A) is right. Two of its reasons should not be quoted as the governing ones:

    1. B's "same organization, two languages" cost is not new with B. The ruled user rung already varies by who starts the load: a reseed by another administrator asks with that administrator's language (marketplace-install-local-plugin.ts:6177), and the boot heal asks with no user (:2384). The heal also runs only when every seeded object is empty (:2373), so it does not mix a second language into existing rows. The reason against B is the precedent above, not this cost.
    2. "2026-11-05 … 要避免的猜测" overstates the record. "Never an 'en' guess" forbids inventing en when no rung answers. The ruling did not weigh the request's language. The texts that speak to a browser deciding organization data are 6913660232 and 7359875657.

    What would reopen it

    • A language a person actively chose fails to reach sys_user.locale. That is a writer defect, fixed at the writer.
    • The first-run basics form stops suggesting the browser's language, or its Save stops setting the organization's language.
    • The maintainer asks that a new company get its language without a click. That is a new-tenant default, so it goes to him as its own card.

    Prior rulings read

    seed locale, sample data, fallback, localization.locale, sys_user.locale, Accept-Language, defaultLocale, browser language → check-prior-rulings.mjs --card 39681: 27 ADR hits, none on point (ADR-0092's amendment only restates that a stored language outranks Accept-Language); card thread: 0 rulings of 3 comments. Cards read: #30281 (body, 5 comments, PR #30346 body), #30347, #17011, #34940, #34062 (6913660232), #33985 (6915665005), #34392, #33231, #25495, #39043 (7359875657), #39021 (open, a host override for the first boot only; not this path), hotcrm#2411. Not read: the 2026-11-05 decision card in the hotcrm project chat, and hotcrm ruling 7333272316 (another repository).

  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-04T15:10Z · Claim amendment 1 to claim 7414085701 (branch claude/project-thread-o9cirh, PR #39724).

    Clause-②: yes (widening). Was "no (re-declared by amendment if the install-preview answer widens)". PR #39724 adds the door GET /api/v1/marketplace/install-local/seed-locale and the optional seeded.objects on the install answer. Both are additive public HTTP surface, as read by L1-c 7415452667, with precedent #39622. Metadata-protocol stays none. Surface and everything else are unchanged. The review owed is an L2 at TIER_DEFAULT on the declaration face (no packages/spec or governed path).

  8. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-04T16:03Z · Delivered: PR #39724 merged (04eba3d); Fixes #39681 closed this card.

    • The install confirm names the sample-data language and flags a mismatch with a link to Language & Region.
    • The sample counts agree on package objects.
    • A reinstall no longer re-offers confirmed grants.
    • The fallback order is unchanged (reading 7414358295).
    • Open, unmeasured: the single skipped row on an empty database. The note now names its object, so a retest reads it.

    pm:dispatched removed.

  9. 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

No one assigned

    Labels

    area:uxbugdomain:serverdomain:uipriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions