Repository navigation
fix(platform-objects): name each Setup settings entry as the hub does; label notification and audit options - #28062
Conversation
…ation and audit options Claude-Session: https://claude.ai/code/session_016WV4cxh364AJYtdpWoPiHV Co-authored-by: Claude <noreply@anthropic.com>
…; label notification and audit options The Setup sidebar now carries each settings page's hub title in every shipped locale and lists SMS Delivery and Data Lifecycle, pinned against the registered manifests in service-settings. Notification severity reads Info / Warning / Critical, Source Object is drawn as the object's label, and every audit action option carries a label; stored values are unchanged. Claude-Session: https://claude.ai/code/session_016WV4cxh364AJYtdpWoPiHV Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 11 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 ab8dc9a9e54a8515b84d2cde4f2e9329660c2f3b && git checkout ab8dc9a9e54a8515b84d2cde4f2e9329660c2f3b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2e955dde6c058e629a439714695667184f5cb783 8037b1c346eb35e4e6b367e1b9b8a8aca43d1fe5 && git checkout -B drift-repro 2e955dde6c058e629a439714695667184f5cb783 && git merge --no-ff 8037b1c346eb35e4e6b367e1b9b8a8aca43d1fe5
node scripts/docs-audit/affected-docs.mjs --json 2e955dde6c058e629a439714695667184f5cb783
|
…-Agent wire pin Claude-Session: https://claude.ai/code/session_016WV4cxh364AJYtdpWoPiHV Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#4 · os-elon-musk · session_016WV4d1Np3hU7RQnA13YZcL 维护者速读
席位意见:ACCEPT。 席位核对Head-sha:
|
Requested by Elon · project thread
domain:server#4 · os-elon-musk · session_016WV4cxh364AJYtdpWoPiHV
Fixes #27854
Refs #27855
Clause-②: no
Metadata-protocol: none
维护者速读
sys_approval_request;审计日志的动作(含 System Overview 的 "Audit Events by Action")在英文下显示 "Config Change" 而非config_change。manage_platform_settings,与对应设置页的读权限一致。回滚即 revert 本 PR。packages/platform-objects/src/apps/setup-nav.contributions.ts、packages/services/service-settings/src/setup-nav-hub-parity.test.ts(侧栏对总览页的防漂移测试)、packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts。pnpm --filter @objectstack/service-settings exec vitest run src/setup-nav-hub-parity.test.ts,预期 9 passed(在 main 上 6 个红)。What changes
Setup sidebar ↔ settings hub (#27854). One name per settings page, one set of pages.
setup-nav.contributions.ts:nav_settings_mailis labelled "Mail Delivery" (was "Email"). New entriesnav_settings_sms("SMS Delivery", after mail) andnav_settings_lifecycle("Data Lifecycle", after Knowledge), bothrequiredPermissions: ['manage_platform_settings'], the read permission of their namespaces.apps/translations/{en,zh-CN,ja-JP,es-ES}.ts): each settings entry takes the hub card's title in that locale. zh-CN / ja-JP: company 公司信息 / 会社情報 → 公司 / 会社, mail 邮件 / メール → 邮件投递 / メール配信. es-ES: mail Correo → Envío de correo, storage and feature flags take the hub's wording. The two new entries are translated; the lifecycle wording reuses the object form's existing "Data Lifecycle" term in each locale. The mail entry's recorded source hashes are refreshed with its re-translation (the en source changed), and the two new entries record theirs.packages/services/service-settings/src/setup-nav-hub-parity.test.ts(it lives there because service-settings depends on platform-objects, so the reverse import would be a cycle). It bootsSettingsServicePluginwith the bundled manifests, registerslifecycleSettingsManifestthe wayObjectQLPlugindoes, folds the Setup tree through the real registry (so the Branding entry this package contributes counts), and asserts: every hub namespace has exactly one sidebar entry and no entry opens an unlisted page; the en label equals the hub title; each translated locale's label equals the hub's translated title wherever the hub has one; and the namespaces with no translated hub title are exactly['lifecycle'].Notification Events and the audit action (#27855, partly).
audit/sys-notification.object.ts:severityoptions are labelled Info / Warning / Critical over the sameinfo/warning/criticalvalues.source_objectdeclareswidget: 'object-ref'(the sharing-rule pattern), so the console draws the object's label; the field stays text and nothing butNotificationServicewrites it (apiMethods: ['get', 'list']).plugin-audit/src/objects/sys-audit-log.object.ts: everyactionoption carries a label ("Config Change", "Login Failed", …), stored values unchanged. The "Audit Events by Action" chart reads these:resolveDimensionLabels(@objectstack/service-analytics) resolves a dimension through the field's options whatever the dimension'stype, sosystem.datasets.tsneeds no change. The bare-arrayField.selectshorthand had made each label the code; zh-CN / ja-JP / es-ES already carried words, only en showed codes.platform-objects/src/apps/translations/en.objects.generated.ts(severity),plugin-audit/src/translations/en.objects.generated.ts(action), bynode scripts/check-i18n-bundles.mjs --write; no translated-locale value moved.Not in this PR.
topicis an open vocabulary (a flow's notify step names any topic; about 30 distinct topics are emitted) and no topic catalog with labels exists. Aselectwould refuse unknown topics, a narrowing. Left out by the seat's ruling; Setup: System Overview and Notifications show raw values (config_change, approval.requested, lowercase severity) (#27521 row 4) #27855 stays open for it.identity/sys-user.object.ts(env_nativeidentity-source label, the third bullet of Setup: System Overview and Notifications show raw values (config_change, approval.requested, lowercase severity) (#27521 row 4) #27855): belongs with thesys_userrows (Setup → Create User with a typed password still shows "If a temporary password was generated, copy it now" (#27521 row 12) #27858) and is not touched.Why
Every administrator in Setup saw one page under two names, could not reach SMS Delivery or Data Lifecycle from the sidebar, and read raw codes on System Overview and Notification Events.
Verification
Measured on
main5aee2065(sidebar vs hub, all four locales): en mail "Email" vs "Mail Delivery";smsandlifecyclehad no sidebar entry; zh-CN and ja-JP company and mail, and es-ES mail, storage and feature flags, differed from the hub.severityoptions were{ label: 'info', value: 'info' }…;sys_audit_log.actionlabels equalled their values.Pins, red first on
mainand green on this head:service-settings/src/setup-nav-hub-parity.test.ts: 6 of 9 red onmain(non-vacuity, set equalitymissing: [sms, lifecycle], en, zh-CN, ja-JP, es-ES label drift), 9/9 green.platform-objects/src/audit/sys-notification-display-labels.test.ts: object file restored frommain→ 2 red; restored → green.plugin-audit/src/objects/sys-audit-log-action-labels.test.ts: object file restored frommain→ the label case red, the stored-values case green (the values never moved); restored → green.Suites:
@objectstack/platform-objects101 files / 1434 tests,@objectstack/plugin-audit66 files / 1053 tests,@objectstack/service-settings63 files / 1025 tests pass; typecheck of all three passes;pnpm check:i18n,check:i18n-coverage,check:i18n-stale-fillpass.dispatch-gates --commandsderived 61 families atf3487c44: 60 exit 0,check:dual-build-cjs-loadsNOT MEASURED (exit 3, needs every package's dist);pnpm lintexit 0.Skills-docs: none — the docs name these pages as "Setup → Settings → SMS Delivery", which still holds.
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cxh364AJYtdpWoPiHV