Skip to content

Commit ad4984f

Browse files
fix: runtime messages and help text name the Setup paths Setup shows (#39330)
Fixes #39305 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:作者看到的拒收提示、管理员看到的启动提示、登录报错和字段帮助说明,改为指向设置里现在真实存在的分组和入口(例如"审计与数据 → 文件存储")。 - 为什么做:属于"设置重新分组"这项大工作的收尾,替作者和管理员解决按提示找不到入口的问题。 - 出错会怎样:只改提示文字,不改任何取值或行为;某条路径写错时,读者只会再次找不到入口,可直接撤回。 - 要你做什么:无 ## What changes Each runtime message and help text the card lists now names the group and entry Setup shows on `main`, derived from `setup.app.ts`, the contributing package's nav contribution (`setup-nav.contributions.ts`, `connector-credentials-ui.ts` through `renamedFrom`) and `translations/en.ts`: | Location | Was | Now | |:--|:--|:--| | spec `stack.zod.ts` storage guidance, `authoring-key-lint.ts`, cli `serve.ts` local-driver warning, docs `validating-metadata.mdx` quote | Setup → Settings → Storage / Setup → Settings | Setup → Audit & Data → File Storage | | spec `stack.zod.ts` `sms` describe, plugin-auth phone-code refusal | Setup → Settings → SMS Delivery | Setup → Notifications → SMS Channel | | formula template refusal, objectql validation-message warning | Setup → Localization | Setup → Company Settings → Language & Region | | platform-objects API key / user expiry help text (+ regenerated en bundle) | Setup → Authentication → API keys | Setup → Login & Security → Sign-in Methods → API keys | | organizations membership boot refusal | Setup → Authentication → Membership | Setup → Login & Security → Sign-in Methods → Membership | | lint stdio-credential finding, driver-odata README | Setup → Connector credentials | Setup → Integrations & Developer → Connector Credentials | Two in-file comments that named a retired path were corrected in the same files (`sys-user.object.ts` "People & Organization", `serve.ts` "Setup → Datasources"). The API key lifetime path differs from the card's suggestion (`nav_api_keys`): the Default/Maximum key lifetime settings are the "API keys" section of the auth settings page (`auth.manifest.ts`, group `api_keys`), which Setup shows as Sign-in Methods, not the API Keys object list. ## Tests - New pin `packages/spec/src/ui/setup-paths-in-runtime-text.pin.test.ts` (spec `repo` project; spec already reads `packages/**` and `content/**` as text, so no import edge and no new radius declaration). It lists every location, asserts each names its expected `Setup → group → entry` (group resolved from the contributor through `renamedFrom`, labels from `en.ts`), and asserts every `Setup → …` path in a location starts with a live group label and a live entry label. A control case proves it flags every retired group name (group `keywords`), every former entry name (entry `keywords`), the retired settings hub and a dangling path. - Updated assertions: `template-currency-tenant-default.test.ts`, `membership-policy-gate.test.ts`. ## Acceptance notes Further runtime and help-text hits outside the card's files were found by the sweep and are not changed here (named for a follow-up): `packages/spec/src/system/sms-config.zod.ts` (refusal + describe, also `packages/spec/docs/references/system/sms-config.md`), `packages/spec/src/integration/connector.zod.ts` (two refusals), `packages/spec/src/migrations/entries/semantic/18.*` (three), `packages/services/service-automation/src/connector-credentials.ts` (runtime message), `packages/services/service-storage/src/multi-replica-local-root.ts`, `packages/plugins/plugin-auth/src/auth-plugin.ts`, `auth-settings-declared-defaults.ts`, `organization-default-currency.ts`, `packages/platform-objects` organization and business-unit timezone help ("Settings → Localization → Default timezone"), `ui/packages/i18n/src/locales/en.ts` (two-factor message), `examples/app-showcase/.env`, `docs/HARDENING.md`, and many `content/docs/**` and `skills/**` pages. ## Verification <details><summary>Pin, ablation and package tests (head 5dfd1fd)</summary> - Pin: `pnpm --filter @objectstack/spec exec vitest run --project repo src/ui/setup-paths-in-runtime-text.pin.test.ts` → 14 passed. - Ablation: with the 13 changed source files restored to the merge base, the same pin → 13 failed (every location), restored → green. - `pnpm --filter` test: formula 2289 passed, organizations 356 passed, lint 10355 passed, platform-objects 2352 passed; focused: objectql `src/validation` 1615 passed, plugin-auth phone-SMS 18 passed, spec `src/stack` + `authoring-key-lint` 1157 passed. - typecheck: spec, formula, organizations, platform-objects (turbo, 63 tasks) green. - `pnpm --filter @objectstack/spec check:generated` → all 14 artifacts up to date; `node scripts/check-i18n-bundles.mjs --write` regenerated the en objects bundle. - `dispatch-gates --ran`: 131 derived, 124 run green, 7 NOT MEASURED (exit 3 prerequisite: plugin-teardown-shape self-test needs a deeper clone, spec check:skill-examples, check:dual-build-cjs-loads and check:i18n-coverage need unbuilt dists; local timeout: check:query-options-erasure, check:slot-lookup, check:type-check-debt). CI runs them. </details> Read first: the pin (its location table and the two rules), then `membership-policy-gate.ts` (reflowed banner lines). Two-minute check: run the pin command above; expect 14 passed. --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CbFgiyGToVRBFwedwF --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 170f9f8 commit ad4984f

18 files changed

Lines changed: 217 additions & 28 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/formula': patch
4+
'@objectstack/objectql': patch
5+
'@objectstack/platform-objects': patch
6+
'@objectstack/plugin-auth': patch
7+
'@objectstack/organizations': patch
8+
'@objectstack/lint': patch
9+
'@objectstack/cli': patch
10+
'@objectstack/driver-odata': patch
11+
---
12+
13+
fix: runtime messages and help text name the Setup path Setup shows
14+
15+
Clause-②: no
16+
Metadata-protocol: none
17+
18+
Who sees it: an author reading a refusal or a lint finding, and an administrator reading a boot banner, a sign-in error or a field's help text. Setup was regrouped, and these messages still sent the reader to paths that no longer exist. Each now names the group and entry Setup shows:
19+
20+
- **File storage** (`@objectstack/spec` stack-key guidance for a top-level `storage` key, the `os serve` local-driver warning): Setup → Audit & Data → File Storage, was Setup → Settings → Storage.
21+
- **SMS provider** (`@objectstack/spec` `sms` description, the phone-code refusal in `@objectstack/plugin-auth`): Setup → Notifications → SMS Channel, was Setup → Settings → SMS Delivery.
22+
- **Default currency** (`@objectstack/formula` template refusal, `@objectstack/objectql` validation-message warning): Setup → Company Settings → Language & Region, was Setup → Localization.
23+
- **API key lifetime** (help text on the API key and user expiry fields in `@objectstack/platform-objects`): Setup → Login & Security → Sign-in Methods → API keys, was Setup → Authentication → API keys.
24+
- **Membership policy** (the `@objectstack/organizations` boot refusal): Setup → Login & Security → Sign-in Methods → Membership, was Setup → Authentication → Membership.
25+
- **Connector credentials** (the `@objectstack/lint` stdio-credential finding, the `@objectstack/driver-odata` README): Setup → Integrations & Developer → Connector Credentials, was Setup → Connector credentials.
26+
27+
Only message text changes; no accepted value, code or status moves.

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export default defineStack({
392392
stack.storage: 'storage' is not a declared stack key, so its value is dropped at
393393
load — the file-storage backend is a deployment concern, not an application
394394
declaration. Configure it with the OS_STORAGE_* environment variables, or
395-
per-deployment in Setup → Settings → Storage.
395+
per-deployment in Setup → Audit & Data → File Storage.
396396
```
397397

398398
This is **advisory** — the stack still loads. Strict rejection is where these

‎packages/cli/src/commands/serve.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,8 +3592,9 @@ export default class Serve extends Command {
35923592
// DefaultDatasourcePlugin connect it at boot through the shared
35933593
// DatasourceConnectionService (one connect path, one failure
35943594
// verdict incl. OS_ALLOW_DRIVER_CONNECT_FAILURE, retained status in
3595-
// Setup → Datasources). URL→config translation stays host-side in
3596-
// resolveStorageDefinition. The dev sqlite step-down (#2229) and
3595+
// Setup → Integrations & Developer → Datasources). URL→config
3596+
// translation stays host-side in resolveStorageDefinition. The
3597+
// dev sqlite step-down (#2229) and
35973598
// the loosen-only self-heal (#2186, via config.autoMigrate) now run
35983599
// inside the factory at connect.
35993600
const { DefaultDatasourcePlugin } = await import('@objectstack/runtime');
@@ -5649,7 +5650,7 @@ export default class Serve extends Command {
56495650
// actually work — `config.storage` was in this sentence and was
56505651
// never read (framework#4167).
56515652
console.warn(chalk.yellow(
5652-
` ⚠ StorageServicePlugin using local driver (${resolved.localStorageRoot}) — switch to S3/GCS/Azure for production (set OS_STORAGE_* or configure storage in Setup → Settings).`,
5653+
` ⚠ StorageServicePlugin using local driver (${resolved.localStorageRoot}) — switch to S3/GCS/Azure for production (set OS_STORAGE_* or configure storage in Setup → Audit & Data → File Storage).`,
56535654
));
56545655
}
56555656
// The default settings service seals its encrypted settings with the

‎packages/drivers/driver-odata/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ export default defineStack({
7777

7878
When a connector instance already authorizes the vendor, the datasource can name it in
7979
`external.connector` instead of binding a secret of its own (ADR-0015 amendment D7): one
80-
credential, set under Setup → Connector credentials, serves the connector's flow actions and
81-
the datasource's records.
80+
credential, set under Setup → Integrations & Developer → Connector Credentials, serves the
81+
connector's flow actions and the datasource's records.
8282

8383
```typescript
8484
connectors: [{

‎packages/formula/src/template-currency-tenant-default.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe('currencyDefaultRefusal', () => {
117117
expect(currencyDefaultRefusal('{{ x | currency }}', 'CNY')).toBeNull();
118118
const refusal = currencyDefaultRefusal('{{ x | currency }}', undefined);
119119
expect(refusal).toContain('{{ x | currency }}');
120-
expect(refusal).toContain('Setup → Localization');
120+
expect(refusal).toContain('Setup → Company Settings → Language & Region');
121121
expect(refusal).not.toContain('@');
122122
});
123123

‎packages/formula/src/template-engine.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export function currencyDefaultRefusal(
394394
`the hole ${hole} has no currency argument, so it formats in the tenant default currency (the `
395395
+ '`localization.currency` setting), and no tenant default currency reached this render: the '
396396
+ 'organization has none set, or the caller did not supply it. The amount is not formatted in any '
397-
+ `currency. Set the default currency in Setup → Localization, or ${remedy}`
397+
+ `currency. Set the default currency in Setup → Company Settings → Language & Region, or ${remedy}`
398398
);
399399
}
400400

‎packages/lint/src/lint-connector-credential-literals.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const STDIO_AUTH_UNPLACED_ROUTE =
133133
const CREDENTIAL_ENV_ROUTE =
134134
'`transport.credentialEnv` takes the NAME of the environment variable the stdio server reads, never the ' +
135135
"credential: set the secret where `auth: { type: 'bearer', credentialRef }` resolves (an environment variable " +
136-
'or Setup → Connector credentials) and write the variable name here';
136+
'or Setup → Integrations & Developer → Connector Credentials) and write the variable name here';
137137

138138
/** One judged map: where it sits under the entry, what an entry of it is called, and its route. */
139139
interface JudgedMap {

‎packages/objectql/src/validation/rule-message-render.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ function tenantCurrencyHole(hole: string, subject: string, warn: ((message: stri
142142
warn?.(
143143
`${subject}: the hole ${hole} formats in the tenant default currency, and none reached this write (the `
144144
+ 'organization has none set, or the write carried none): the hole renders empty. Set the default currency '
145-
+ 'in Setup → Localization (`localization.currency`), or name the currency in the hole (`currency:EUR`).',
145+
+ 'in Setup → Company Settings → Language & Region (`localization.currency`), or name the currency in the '
146+
+ 'hole (`currency:EUR`).',
146147
);
147148
return '';
148149
}

‎packages/platform-objects/src/apps/translations/en.objects.generated.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
374374
},
375375
expires_at: {
376376
label: "Expires At",
377-
helpText: "Leave empty for the default lifetime set under Setup → Authentication → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused."
377+
helpText: "Leave empty for the default lifetime set under Setup → Login & Security → Sign-in Methods → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused."
378378
}
379379
},
380380
resultDialog: {
@@ -1378,7 +1378,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
13781378
description: "Create a key for a script or integration. The key acts as you, with your access, in the organization you are working in now.",
13791379
params: {
13801380
expires_at: {
1381-
helpText: "Leave empty for the default lifetime set under Setup → Authentication → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused."
1381+
helpText: "Leave empty for the default lifetime set under Setup → Login & Security → Sign-in Methods → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused."
13821382
}
13831383
},
13841384
resultDialog: {

‎packages/platform-objects/src/identity/sys-api-key.object.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const SysApiKey = ObjectSchema.create({
126126
{ field: 'name', required: true },
127127
{
128128
field: 'expires_at',
129-
helpText: 'Leave empty for the default lifetime set under Setup → Authentication → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused.',
129+
helpText: 'Leave empty for the default lifetime set under Setup → Login & Security → Sign-in Methods → API keys (Default key lifetime, 90 days unless changed). A date later than the Maximum key lifetime there is refused.',
130130
},
131131
],
132132
resultDialog: {

0 commit comments

Comments
 (0)