Repository navigation
fix(spec): the permission-set form asks for the label first, and requires it - #28152
Conversation
…ires it The Identity section listed name (the API name) before an optional label, so an administrator typed a machine name first and could save a set with no human label while the Console derives name from the label. Label now comes first and is required; name follows, and its help says it derives from the label. The form's required flag is layout only: PermissionSetSchema still accepts a set with no label. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
… label-first permission form The permission form's label row now precedes name in every locale's bundle, the English name help is the new source text, and the zh-CN, ja-JP and es-ES name help is re-translated by hand to say the name derives from the label. Adds the changeset for both moved packages. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
…rmission-set-label-first
📓 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#4 · marchtian · session_017ihL2fi9zfJhUTubyJYb6V 席位核对 · ACCEPT (lane part) · card #27864 · 2026-10-30T14:20Z
Contract-review-handoff: triage — CONTRACT_REVIEW_TIER unavailable (HTTP 429 "You've reached your Fable limit", 2026-10-30T04:26Z) · head 634b6c8 |
|
triage#1 · os-sales · session_01L6bhgV4fMGJHSdSdx3u9mK Contract-review-claim: Generated by Claude Code |
|
triage#1 · os-sales · session_01L6bhgV4fMGJHSdSdx3u9mK Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Holds. The section reorder is the change that moves Label before Name on the real screen (① third bullet: Attempts to break it, and what each found:
Verdict on the file: no must-fix; two should-fixes (1 and 2 above), neither blocking. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:spec#4 · marchtian · session_017ihL2fi9zfJhUTubyJYb6V Landing stroke · 2026-10-30T15:37Z · head
|
🤖 Generated with Claude Code
https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
Fixes #27864
Clause-②: no
Metadata-protocol: none
维护者速读
pnpm --filter @objectstack/spec exec vitest run src/security/permission-form-label-first.test.ts,预期 6 个用例全绿;或在 Console 新建权限集,首个输入框是带必填星号的 Label,输入后 Name 自动填好。What changes
packages/spec/src/security/permission.form.ts: the Identity section listslabelfirst withrequired: true, thenname(still required). Thenamehelp now reads "Derived from the label when you create the set; snake_case". A code comment records thatrequiredon a form row is a layout flag and thatPermissionSetSchemastill accepts a set with no label.packages/spec/src/security/permission-form-label-first.test.ts(new): pins that the form is the oneMETADATA_FORM_REGISTRY.permissionserves, that the Identity section opens onlabelthenname, thatlabelprecedesnameacross the whole form, that both rows are required (with a control thatdescriptionis not), that thenamehelp names the derivation, and that the schema still parses a set with no label.packages/platform-objects/src/apps/translations/*.metadata-forms.generated.ts: regenerated withnode scripts/check-i18n-bundles.mjs --write --filter=platform-objects(thepermission.fieldskeys now comelabelfirst, and the Englishnamehelp is the new source text). The zh-CN, ja-JP and es-ESnamehelp leaves are re-translated by hand to say the same thing, since merge mode keeps a stale translated leaf as it is..changeset/27864-permission-set-form-label-first.md:@objectstack/specpatch and@objectstack/platform-objectspatch, carrying the two declaration lines.Tests
origin/mainform (ablation: form restored from549203d040, test unchanged) it is red on four of six (order, whole-form order, required flag, help text), the two that stay green being the registry identity and the accept-set control. Form restored fromHEADand byte-compared afterwards.@objectstack/spec: build,check:generated(exit 0),typecheck(exit 0), fullvitest run: Test Files 844 passed (844), Tests 23964 passed, 1 todo.@objectstack/platform-objects: fullvitest run: Test Files 101 passed (101), Tests 1434 passed.node scripts/check-i18n-bundles.mjs: every bundle set in sync, platform-objects 11 bundles.Acceptance notes
*.form.tsinpackages/spec/srcthat carries both rows listsnamebeforelabel(agent, skill, tool, flow, field, hook, object, position, email-template, action, app, dashboard, dataset, page, report, view), and none words itsnamehelp as derived from the label. This form follows the card's Wanted, not that pattern; whether the others should follow is not this card's scope.permission(ui/packages/app-shell/src/views/metadata-admin/anchors.ts) already declarescreateFields: ['label', 'name']and the label-to-name slugify rule; the served form's section order is what put Name first on screen. Noui/change here.requiredon a form row is read only by the renderer:/meta/typesserves the form as layout beside the Zod-derived schema, and the save path validates withPermissionSetSchema, wherelabelstays optional. No API accept set moves, which is whyClause-②: no.Verification
Independent review: none run (quota); the seat reviews the diff (no contract-review face is expected unless
packages/spec/srccounts as a published schema here — the seat decides).