Repository navigation
fix(service-settings): Settings help in business words; Country is a picker that shows names and stores the code - #28063
Conversation
…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>
📓 Docs Drift CheckThis PR changes 3 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
domain:server#4 · os-elon-musk · session_016WV4d1Np3hU7RQnA13YZcL 维护者速读
席位意见:ACCEPT。 席位核对Head-sha:
|
Requested by Elon · project thread
Fixes #27853
Fixes #27867
Clause-②: no
Metadata-protocol: none
维护者速读
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:
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.settingsCommon.sourceLabels.tenant) reads Organization / 组织 / 組織 / Organización.sys_webhookdescription,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 withnode 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.mdxnames 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
texttoselect. Theiroptionsare every member of theiso_3166_alpha2value domain, generated from the sharedISO_3166_ALPHA2_CODES(@objectstack/spec/shared) with names fromIntl.DisplayNames, never a hand-kept list; each locale pack names the same 249 codes in its own language throughcountryOptionLabels(locale). ThevalueDomaindeclaration stays, so it remains the enforcement boundary and the accepted set is unchanged. The console renders a domain-bearingselectas its suggest-and-pick combobox: typing a name lists the named options, and picking one stores the code.pattern/minLength/maxLengthstay 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
localeis already a closed picker with language names andtimezoneis the suggest-any-IANA-zone combobox with named suggestions, so neither changes here. Localization'sdefault_countryhad 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 areselectwithvalueDomain: 'iso_3166_alpha2'after the spec parse; their options equal the 249 domain codes, each named with its code; a storedDEround-trips throughSettingsServiceand is one of the options;ZZanddeare still refused withvalue_domainandGermanyis 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
DE) in the combobox text box, with the named options in its list. Showing the stored code as its name inside the box is aui/change toDomainCombobox(ui/apps/console/src/pages/settings/SettingsField.tsx), outside this PR's file surface; reported to the seat for a follow-up card.ui/apps/console/src/pages/settings/useSettingsLabel.ts, used only when no server bundle loads) still reads "Tenant"; outside this file surface.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(baseorigin/main5aee2065).Package tests and typecheck (under the shared verify lock)
@objectstack/service-settings: Test Files 64 passed (64), Tests 1053 passed (1053);typecheckexit 0.@objectstack/plugin-webhooks: Test Files 25 passed (25), Tests 258 passed (258);typecheckexit 0.@objectstack/plugin-email: Test Files 45 passed (45), Tests 749 passed (749);typecheckexit 0.Ablations (scripts/ablation-replace.mjs, restored by blob hash)
company.manifest.tscountrytype: 'select'mutated to'text':country-picker.pin.test.ts1 failed / 16 passed (company.country is a select that keeps the iso_3166_alpha2 domain); restored blob0ee79213matches HEAD.OS_FEATURE_FLAGS_AI_ENABLED:settings-help-business-words.pin.test.ts1 failed / 19 passed (feature_flags: the en pack carries no developer-only value); restored blobeaba9945matches HEAD.Gate families (dispatch-gates --commands, reconciled with --ran)
pnpm check:dual-build-cjs-loadsexits 3 (PREREQUISITE NOT MET: needs every package's dist), left to CI.check-plugin-teardown-shape --self-testfirst exited 3 in the shallow clone; after fetching its pinned fixture commit it exits 0 (48 cases).check:i18nexit 0 afternode scripts/check-i18n-bundles.mjs --write(onlyplugin-webhooksen bundle moved).check:dts-closureandcheck:sourcemap-no-sources-contentswept the 62 built packages only; CI sweeps the whole tree.pnpm lintexit 0.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