Repository navigation
fix(spec): the permission-set form's Name help says when the name is filled from the label, and when to type it - #28229
Conversation
…from the label, and when to type it The create form fills `name` from the label's Latin letters and digits only, so a Chinese or Japanese label fills nothing, while the help said the name is always derived from the label. The help now names both outcomes; the zh-CN, ja-JP and es-ES bundles follow. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzo5N4z5piyjA2oqZm
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 2 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:spec#2 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: |
|
domain:spec#2 · os-tesla · session_01L9qibx5r5nhDMwpRs4SL6D 维护者速读
席位核对 · ACCEPT ·
|
|
domain:spec#2 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract reviewServed-tier: Inputs: card #28180 (body + triage 6527260428 + claim 6528680976 + os-dev-report 6529942225), PR body, the 7-file diff against merge base 3a2f4c0, the head's check-runs (read 2026-10-30T18:32Z: 50 check-runs, all completed: 40 success, 10 skipped (path-filtered), 0 failed, 0 cancelled. Success: Auto Label, Build & E2E UI, Build Core, Build UI Deps, Check Changeset, Check PR Size, Dogfood Regression Gate, Flag docs affected by code changes, Governed Surface Queue Guard, Lint & Repo Gates, Lint · CI, release & engine gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, Live E2E UI, PR-body guards (claim · duplicate · Part-of · single-writer path), Plan Test Core shards, Spec property liveness, Test Core, Test Core (all 8), Test UI, Type Check UI, Type Check · consumer gates, Type Check · debt ledger, Type Check · source gates, Type Check · workspace, TypeScript Type Check, filter. Skipped: 18.x upgrade harness (opt-in), Build Docs, Dogfood Regression Gate (matrix shard of 3), Dogfood Verify CLI, Lint UI, Packed-tarball smoke (opt-in), Schedule gate · skip when a green push run covers the commit, Temporal Conformance (live PG + MySQL), Test UI (matrix shard of 16), UI Published Artifacts.). The card's Wanted asks for a ① Derived judgments
② Semver levelpatch. Help text on a metadata form and four translation leaves; no schema, accept set, error code, generated key or form structure moves. ③ Boundary flags
④ Design judgmentThe change holds against the code it cites and the scenario it is accepted against. The card's defect is a promise ("derived from the label") that is false for exactly the product's first two locales; the fix states the real rule of the fill ( Implemented-by: VERDICT: PASS |
Requested by Tesla · project thread
Fixes #28180
Clause-②: no
Metadata-protocol: none
维护者速读
pnpm --filter @objectstack/spec exec vitest run src/security/permission-form-label-first.test.ts,预期 6 个用例全绿;或在中文界面的 Console 新建权限集,Name 下的提示说明全中文名称需手动输入。What changes
The Console's create form fills a new permission set's
namefrom the label throughslugify, which keeps only[a-z0-9]after NFKD normalisation (ui/packages/app-shell/src/views/metadata-admin/createDerive.ts, wired forpermissioninanchors.tswithuntilUserEdits). A label written all in Chinese or Japanese therefore fills nothing. Thenamehelp said "Derived from the label when you create the set; snake_case", so a zh-CN or ja-JP admin saw an empty, required Name under a hint that said it had been filled.packages/spec/src/security/permission.form.ts: thenamehelp now names both outcomes: "Filled in from the label's Latin letters and digits when you create the set; if the label has none, type it yourself. snake_case". The comment above the rows records why.packages/platform-objects/src/apps/translations/*.metadata-forms.generated.ts:enfollows the source (regenerated bynode scripts/check-i18n-bundles.mjs --write, which left the tree unchanged against the committed text); the hand-written zh-CN, ja-JP and es-ES values say the same two cases. Metadata-form leaves carry no source-hash entry, so no hash table moves.*.form.tsnamehelp makes the "derived from the label" promise (the othernamerows say onlysnake_case/ unique identifier), so this is the only row.Tests
packages/spec/src/security/permission-form-label-first.test.ts: the help case now asserts the help says the name comes from the label, says to type it otherwise, and still sayssnake_case; a control asserts the unconditional "derived from the label" wording is gone.Acceptance notes
createDerive.tsassumes exists. That is aui/change and its own p3 card; the seat carries it.slugifyinanchors.ts(flow, action, dashboard, report, object, page, view, hook, and doc indefault-schemas.ts). None of theirnamehelps promises a fill, so none is misleading; the Console prompt above would cover them all.Verification
All readings at head
58bba46con objectstack-ai/objectstack (merge base3a2f4c00).Tests
pnpm --filter @objectstack/spec exec vitest run src/security/permission-form-label-first.test.ts: Test Files 1/1, Tests 6/6.pnpm --filter @objectstack/spec typecheck,pnpm --filter @objectstack/platform-objects typecheckandpnpm --filter @objectstack/platform-objects test(Test Files 103/103, Tests 1447/1447): lock VERDICT command-exit 0.permission.form.ts(on-disk count old=1, new=0), the test reds 1 failed / 6; restored to the HEAD blob (hash match,git diff HEADempty).node scripts/check-i18n-bundles.mjs --write: exit 0, no diff, so the committedentext equals the generator's output and the three hand translations survive merge mode.Gates
turbo run build, real declarations, excluding docs andui/): 77/77 tasks, lock VERDICT command-exit 0.dispatch-gates --commandsat58bba46c: 81 families, each run with stdin from/dev/null, exit codes recorded before any pipe.--ran: 81 derived, 81 run, 0 NOT MEASURED, 0 unrun, 0 red.check-plugin-teardown-shape --self-test.pnpm --filter @objectstack/spec check:generated: exit 0, every generated artifact up to date.test:repo, the UI lanes) is CI's.Generated by Claude Code