Skip to content

fix(service-settings): Settings help in business words; Country is a picker that shows names and stores the code - #28063

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-ilqjg3
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-ilqjg3

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #27853
Fixes #27867

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:设置页(认证、功能开关、邮件)的帮助文字改成业务用语,不再出现环境变量名、选项键、错误码、对象 API 名或代码调用;继承值徽标从「租户」改为「组织」;Webhooks 副标题改写;公司「国家」与本地化「默认国家」改为显示国名、存储代码的选择器。四个语言包同步。
  • 为什么改:管理员在 Setup → Settings 看到的是像代码注释的说明(invite_only、OS_AUTH_REQUIRE_EMAIL_VERIFICATION、defineWebhook()),国家要手打两位大写代码,输入「de」或「Germany」都被拒且没有提示。
  • 风险与回滚:低。只改文字与国家字段的控件类型;国家仍以 iso_3166_alpha2 值域校验,接受的值集合不变(DE 照收,de、ZZ 照拒)。回滚 = revert 本 PR。
  • 先看:packages/services/service-settings/src/manifests/company.manifest.ts(国家选项从共享的 249 个代码生成);packages/services/service-settings/src/manifests/auth.manifest.ts(帮助改写);packages/services/service-settings/src/settings-help-business-words.pin.test.ts(形状钉子)。
  • 两分钟验证:pnpm --filter @objectstack/service-settings exec vitest run src/settings-help-business-words.pin.test.ts src/manifests/country-picker.pin.test.ts,预期全绿;或打开 Setup → Company,在「国家」输入 Germ,列表出现「Germany (DE)」,选中后保存为 DE。
  • 需要你做的:无,席位落地。

What changes

#27853 — Settings help in business words. Every string an administrator is shown for Authentication, Feature Flags and Mail (the manifest literals, which are the English fallback, and the en / zh-CN / ja-JP / es-ES packs) now names the effect instead of the machine value:

  • Self-registration audience: the help says Invitation only / Allowlisted email domains / Open (the labels the page shows), not the stored option keys. The email-verification override, the Google client ID and secret, and the reverse-proxy trust switch are described as "set in the server configuration" instead of by env var name or stack-config path. The API-key help no longer quotes error codes; the permission-set help no longer quotes permission-set API names.
  • Feature Flags beta banner: no env var, no code span.
  • Mail: the durable-queue help no longer names the queue object. The Send-test-email result for a log-only provider (packages/plugins/plugin-email/src/email-plugin.ts, the two message strings only) says "kept in the email log" instead of naming the mail object.
  • The inherited-value badge (settingsCommon.sourceLabels.tenant) reads Organization / 组织 / 組織 / Organización.
  • The Webhooks subtitle (sys_webhook description, packages/plugins/plugin-webhooks/src/sys-webhook.object.ts) says what a webhook is without the code calls or the internal component names; the code-level account stays in the comment beside it. The en bundle is regenerated with node scripts/check-i18n-bundles.mjs --write; the zh-CN / ja-JP / es-ES values are hand-translated leaves.

The technical detail the help used to inline is already in the deployment docs (content/docs/deployment/environment-variables.mdx names the email-verification override). The settings manifest has no per-field docs-link slot, so the help now carries no technical detail rather than a link.

#27867 — Country pickers. Company → Country and Localization → Default country change from text to select. Their options are every member of the iso_3166_alpha2 value domain, generated from the shared ISO_3166_ALPHA2_CODES (@objectstack/spec/shared) with names from Intl.DisplayNames, never a hand-kept list; each locale pack names the same 249 codes in its own language through countryOptionLabels(locale). The valueDomain declaration stays, so it remains the enforcement boundary and the accepted set is unchanged. The console renders a domain-bearing select as its suggest-and-pick combobox: typing a name lists the named options, and picking one stores the code. pattern / minLength / maxLength stay on the specifier, so the server's verdict for every value is the same as before.

Premise correction for #27867. Company has no Locale or Timezone setting; it has only Country. Locale and Timezone live on Localization, where locale is already a closed picker with language names and timezone is the suggest-any-IANA-zone combobox with named suggestions, so neither changes here. Localization's default_country had the same two-letter free-text shape as Company's country and gets the same picker (file surface amended on the claim).

Tests

  • src/settings-help-business-words.pin.test.ts (new): for auth, feature_flags and mail, the manifest literals and every shipped pack carry no env var or error code, enum key or object API name, camelCase code identifier, code call or code span; a teeth case proves each shape catches the string it was written for. Every pack's tenant source label is not "tenant" in any of the four languages.
  • src/manifests/country-picker.pin.test.ts (new): both keys are select with valueDomain: 'iso_3166_alpha2' after the spec parse; their options equal the 249 domain codes, each named with its code; a stored DE round-trips through SettingsService and is one of the options; ZZ and de are still refused with value_domain and Germany is still refused; each pack names all 249 codes.
  • packages/plugins/plugin-webhooks/src/sys-webhook.description.pin.test.ts (new): the source description and the four bundles carry no code call, camelCase identifier, object API name or internal component name.
  • src/manifests/auth.manifest.test.ts: the two pins that held the old wording now hold the business wording (the sign-up help names each posture by its label and spells no key; the Google help names the server configuration and no env var).

Acceptance notes

  • The console shows a stored country code (DE) in the combobox text box, with the named options in its list. Showing the stored code as its name inside the box is a ui/ change to DomainCombobox (ui/apps/console/src/pages/settings/SettingsField.tsx), outside this PR's file surface; reported to the seat for a follow-up card.
  • The console's own fallback for the source badge (ui/apps/console/src/pages/settings/useSettingsLabel.ts, used only when no server bundle loads) still reads "Tenant"; outside this file surface.
  • AI & Embedder help still names env vars and sys_ai_trace (parent row 2 lists it); not in this card's three namespaces; reported to the seat.

Verification

All readings at head b7cfa217 (base origin/main 5aee2065).

Package tests and typecheck (under the shared verify lock)
  • @objectstack/service-settings: Test Files 64 passed (64), Tests 1053 passed (1053); typecheck exit 0.
  • @objectstack/plugin-webhooks: Test Files 25 passed (25), Tests 258 passed (258); typecheck exit 0.
  • @objectstack/plugin-email: Test Files 45 passed (45), Tests 749 passed (749); typecheck exit 0.
Ablations (scripts/ablation-replace.mjs, restored by blob hash)
  • company.manifest.ts country type: 'select' mutated to 'text': country-picker.pin.test.ts 1 failed / 16 passed (company.country is a select that keeps the iso_3166_alpha2 domain); restored blob 0ee79213 matches HEAD.
  • en pack Feature Flags banner given OS_FEATURE_FLAGS_AI_ENABLED: settings-help-business-words.pin.test.ts 1 failed / 19 passed (feature_flags: the en pack carries no developer-only value); restored blob eaba9945 matches HEAD.
Gate families (dispatch-gates --commands, reconciled with --ran)
  • 62 families derived; 61 run with exit 0; 1 NOT MEASURED: pnpm check:dual-build-cjs-loads exits 3 (PREREQUISITE NOT MET: needs every package's dist), left to CI.
  • check-plugin-teardown-shape --self-test first exited 3 in the shallow clone; after fetching its pinned fixture commit it exits 0 (48 cases).
  • check:i18n exit 0 after node scripts/check-i18n-bundles.mjs --write (only plugin-webhooks en bundle moved).
  • check:dts-closure and check:sourcemap-no-sources-content swept the 62 built packages only; CI sweeps the whole tree.
  • pnpm lint exit 0.
  • Reconcile: 62 derived famil(ies) accounted for — 61 run, 1 NOT-MEASURED.

Not browser-driven: the combobox rendering was read from SettingsField.tsx, not re-driven in Chromium.


Generated by Claude Code

…ickers

Authentication, Feature Flags and Mail help, the inherited-value badge and
the Webhooks subtitle no longer explain themselves in env var names, option
keys, error codes, object API names or code calls. Company's Country and
Localization's Default country become pickers over the iso_3166_alpha2
domain that show names and store the code; the domain stays the
enforcement boundary.

Claude-Session: https://claude.ai/code/session_016WV4d1MApr9y6yjfjdVYmA
Co-authored-by: Claude <noreply@anthropic.com>
…regenerate the webhook en bundle

Claude-Session: https://claude.ai/code/session_016WV4d1MApr9y6yjfjdVYmA
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/plugin-email, @objectstack/plugin-webhooks, @objectstack/service-settings, touching 6 documentable anchor(s).

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/webhooks.mdx (via SysWebhook (symbol, a top-level const object), sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/permissions/system-context.mdx (via sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/protocol/kernel/i18n-standard.mdx (via settingsCommon (symbol, a field of const object en; a field of const object esES; a field of const object jaJP; a field of const object zhCN))
  • content/docs/ui/apps.mdx (via sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/ui/translations.mdx (via settingsCommon (symbol, a field of const object en; a field of const object esES; a field of const object jaJP; a field of const object zhCN))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/releases/v17/17-5.mdx (via sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))
  • content/docs/releases/v18/18-0.mdx (via sys_webhook (symbol, a field of const object enObjects; a field of const object esESObjects; a field of const object jaJPObjects; a field of const object zhCNObjects))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 58 of 210 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 847e4248e9b7059e5b069056bf636c75c1f53b14 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 63a954befe9850fcb3469561346c190edb84d999 — the merge of head 47f77a523f5a54b5588dad9babd86395bc704660 into base 847e4248e9b7059e5b069056bf636c75c1f53b14, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 63a954befe9850fcb3469561346c190edb84d999 && git checkout 63a954befe9850fcb3469561346c190edb84d999
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 847e4248e9b7059e5b069056bf636c75c1f53b14 47f77a523f5a54b5588dad9babd86395bc704660 && git checkout -B drift-repro 847e4248e9b7059e5b069056bf636c75c1f53b14 && git merge --no-ff 47f77a523f5a54b5588dad9babd86395bc704660

node scripts/docs-audit/affected-docs.mjs --json 847e4248e9b7059e5b069056bf636c75c1f53b14

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 847e4248e9b7059e5b069056bf636c75c1f53b14 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#4 · os-elon-musk · session_016WV4d1Np3hU7RQnA13YZcL

维护者速读

席位意见:ACCEPT。

席位核对

Head-sha: 47f77a523f5a54b5588dad9babd86395bc704660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant