Repository navigation
fix(platform-objects): Setup's user screens show a user's real state, and the copy-password line only when one was generated - #28065
Conversation
…o copy a password only when one was generated The result dialog's description showed on both outcomes, so after a typed password it still read "If a temporary password was generated, copy it now". The instruction moves to the temporaryPassword field's own label, which the dialog draws only when the server returns a generated password. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwXFwjU2YZW2dRuZZt
…e ban state The details grid draws only its authored sections, and none named locale, while banned, ban_reason and ban_expires were hidden, so a banned user read as active. Locale joins Identity, and an Account Status section carries the ban state and reason. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwXFwjU2YZW2dRuZZt
…columns The default all_users view listed name, email, phone, email verified, identity source and created, so a banned user or an admin could only be found by opening each record. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwXFwjU2YZW2dRuZZt
…guage The console applies sys_user.locale to the whole interface, but the help read "Preferred language for this user's notifications". The source and all four shipped packs now say it sets the interface language as well as notifications. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwXFwjU2YZW2dRuZZt
📓 Docs Drift CheckThis PR changes 1 package(s): 17 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 3 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 2 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 8971c36e034b15126979535d9f6678f912d36607 && git checkout 8971c36e034b15126979535d9f6678f912d36607
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a 476454f599e6c35bdc0d7580a9ef81a27f527177 && git checkout -B drift-repro 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a && git merge --no-ff 476454f599e6c35bdc0d7580a9ef81a27f527177
node scripts/docs-audit/affected-docs.mjs --json 8cb8c7f461eb5302aa0bea7205a3fc5ef7bd443a
|
|
domain:server#1 · os-elon-musk · session_016WV4czVnUdQQCVKSW5J2uk Seat ACCEPT · PR #28065 · head
|
Requested by Elon · project thread
Fixes #27858
Fixes #27859
Fixes #27863
Part of #27869
Clause-②: no
Metadata-protocol: none
Skills-docs: none —
git grepofskills/**andcontent/docs/**for the four touched strings ("temporary password was generated", "copy it now", "Preferred language for this user",all_users) has zero hits.维护者速读
platform-objects的 sys_user 元数据、详情页定义和翻译包,无契约、无存储、无接口变化;回滚即还原本 PR。packages/platform-objects/src/identity/sys-user.object.ts(结果框与列表列)、packages/platform-objects/src/pages/sys-user.page.ts(Details 分区)、packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts。pnpm --filter @objectstack/platform-objects exec vitest run --maxWorkers=2 src/identity/create-user-result-dialog-copy.test.ts src/pages/sys-user-details-tab.test.ts src/identity/sys-user-list-status-role-columns.test.ts src/identity/sys-user-locale-help.test.ts,预期 4 个文件全绿。What changes
One commit per card, all on the platform's own
sys_usermetadata in@objectstack/platform-objects:description("If a temporary password was generated, copy it now — it is shown only once and never stored.").ActionSchema.resultDialoghas no per-outcome copy, so that sentence showed on both outcomes, including a typed password, where nothing was generated. The instruction is now the label of thetemporaryPasswordfield ("Temporary password: copy it now, it is shown only once and never stored"). The dialog skips a field whose path is absent from the response, and the endpoint returnstemporaryPasswordonly when it minted one, so the line shows exactly when there is a password to copy. The zh-CN, ja-JP and es-ES packs carry the same change (description leaves dropped bypnpm i18n:extract, field labels translated by hand).locale, whilebanned,ban_reasonandban_expireswere inhideFields.localejoins the Identity section, and a new Account Status section (inline labels in all four locales) carriesbanned,ban_reasonandban_expires.all_usersgainsbannedandrolecolumns afteremail_verified.sys_user.locale's help now says it is the language the user sees the interface in as well as their notifications (the console applies it to the whole UI throughuseUserLocale). Source and all four shipped packs.What this PR does not carry, and who does
Part of). Seat ruling in the seat-1 thread: (a) the English "Invalid password" refusal is aplugin-authrefusal, and it goes with Create User with Email empty says "Either email or phoneNumber is required" and the dialog marks nothing required (#27521 row 10) #27857's PR; (b) Frenchsys_userlabels need French as a fifth platform locale (platform-objects ships en / zh-CN / ja-JP / es-ES only, and HotCRM declares the same four), and the silent fallback isservice-i18n's. Both are reported as findings for the seat to file.sys_user.rolestaysField.text, so the highlight and the new Role column show the stored value (user,admin). A label needsField.select, which changes the column the SQL driver emits (textgives TEXT;selectfalls to the defaultvarchar(255)), andschema-driftwould read existing deployments as anarrow_varchar. Seat ruling A: this half is carried by its own card, which the seat files at ACCEPT.Tests
sys-user-list-status-role-columns.test.ts(Setup → Users list has no Status (banned) or Role column, so a banned user or an admin cannot be spotted from the list (#27521 row 15) #27863),sys-user-locale-help.test.ts(French user sees English: "Invalid password", untranslated sys_user labels in Home feed, misleading Locale help (#27521 row 22) #27869). Rewritten:create-user-result-dialog-copy.test.ts(Setup → Create User with a typed password still shows "If a temporary password was generated, copy it now" (#27521 row 12) #27858, both actions, all four packs). Extended:sys-user-details-tab.test.ts(Setup → user record: Details hides the saved Locale and ban state, and Platform Role reads lowercase "user" (#27521 row 13) #27859).pnpm --filter @objectstack/platform-objects test: Test Files 102 passed (102), Tests 1445 passed (1445).typecheck: exit 0.scripts/ablation-replace.mjs, restored to the HEAD blob,git diff HEADempty afterwards):set_user_passwordregains adescription→set_user_password: no dialog-level descriptionred (1 failed / 8 passed).localedropped from the Identity section → 2 failed / 3 passed.banned,roledropped fromall_users→pins the default list columnsred (1 failed / 1 passed).the source description names the interfacered (1 failed / 4 passed).Acceptance notes
rolein the new list column reads the raw stored value until the role-label card lands.Verification
All local readings are on head
24220933.Derived gate families: 58 of 59 exit 0, 1 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commandsderived 59 families from the 11 changed paths (merge basebc496bf7d). Each ran after the build closureturbo run build --filter=@objectstack/cli --filter=@objectstack/platform-objectsplus the nine other i18n-bundle packagescheck:i18nnames (exit 0).check:i18n,check:i18n-stale-fill,check:page-declaration-shape,check:published-files,check:closing-keyword-parity,check:nul-bytesandcheck-plugin-teardown-shape --self-test(pinned commit fetched).check:dual-build-cjs-loadsexit 3 (PREREQUISITE NOT MET: it needs every package's dist; CI builds the whole tree).check:dts-closureandcheck:sourcemap-no-sources-contentswept the 62 built packages only; CI sweeps the whole tree.dispatch-gates --ran: "59 derived famil(ies) accounted for — 58 run, 1 NOT-MEASURED", exit 0.pnpm lint(eslint . --no-inline-config): exit 0.CI check-runs on this PR are the authority for every family CI runs.
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses.main, one pull request. (a seat fold: one card per commit)packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwXFwjU2YZW2dRuZZt
Generated by Claude Code