Uh oh!
There was an error while loading. Please reload this page.
feat(fields,plugin-form,plugin-detail): Setup system_permissions → capability multi-select (ADR-0056 P2) - #2400
feat(fields,plugin-form,plugin-detail): Setup system_permissions → capability multi-select (ADR-0056 P2)#2400os-zhuang wants to merge 1 commit into
Conversation
…pability multi-select (ADR-0056 P2) Replace the raw JSON textarea for sys_permission_set.system_permissions with a structured capability picker over the live sys_capability registry — scope-grouped, labelled chips with the capability description on hover. - New CapabilityMultiSelectField, registered field:capability-multiselect (@object-ui/fields). Value round-trips BYTE-EQUIVALENT to the JSON-string-array storage (parse on load, JSON.stringify(names) on save); unknown/legacy names are preserved. - Stamped onto the field at the single getObjectSchema choke point (ObjectStackAdapter) so BOTH the record form (ObjectForm) and the detail-page inline edit (DetailView/DetailSection) show the picker. Field storage type unchanged. ObjectForm auto-gen now carries field.widget; DetailSection enriches + honors widget in its inline-edit switch. ADR-0056 P2 / epic #2398. First step toward retiring Setup's permission JSON textareas for structured Studio editors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
commented
Jul 12, 2026
Re-scoped per design discussion (pure model: Studio designs, Setup assigns). Capabilities are part of permission design → they belong in the Studio access editor, not inline in Setup. So this PR's Setup-side capability-picker placement is superseded:
Marking draft pending rework. Superseded by the reworked plan (ADR-0056 update incoming). |
os-zhuang
commented
Jul 12, 2026
Parked — superseded in placement by the pure model (epic #2398, rewritten). This PR put the capability multi-select in Setup. Under the reset design, Setup is read-only for every permission facet and The code is not wasted — the epic re-homes it:
Keeping the branch ( |
os-zhuang
commented
Jul 12, 2026
Superseded by #2403 (pure model). The capability picker's placement (in Setup) was overruled — capabilities are now designed in Studio like every other facet. The reusable groundwork ( |
What
sys_permission_set.system_permissionsin the Setup app is now a structured capability multi-select instead of a raw JSON textarea.ADR-0056 P2 (#2399) — first step of the epic #2398 (consolidate permission-set editing into Studio).
How
CapabilityMultiSelectField→ registeredfield:capability-multiselect(@object-ui/fields). Renders the livesys_capabilityregistry (active only) as chips grouped byscope(Platform / Organization), labelled, with the capabilitydescriptionon hover.security-plugin.tswritesJSON.stringify, readsparseJson). The widget parses on load and emitsJSON.stringify(names)on change — the on-disk shape never changes. Unknown/legacy names are preserved.widgethint is stamped onto the field inObjectStackAdapter.getObjectSchema— the one method both the record form (ObjectForm) and the detail inline-edit (DetailView/DetailSection) read the schema through. The field'stype(storage contract) is untouched.ObjectFormauto-gen now carriesfield.widget;DetailSectionenriches + honorswidgetin its inline-edit switch.Verified
CapabilityMultiSelectField.test.tsx, 9/9: parse tolerance (JSON string / array / empty / comma-legacy), scope grouping, JSON-string emit on toggle on & off, legacy-name preservation, readonly badges.admin_full_access:system_permissionsrenders as the grouped picker (5 Platform chips selected + an Organization group). Toggled a capability and saved through the UI; confirmed the record persisted["…","manage_org_users"]as a JSON string (byte-equal shape), then restored the original.row_level_security/tab_permissionscorrectly remain JSON (they are P3/P4).tscclean for the touched files.Not in scope
admin_scope/row_level_security/tab_permissionsstructured editors are P3/P4 (tracked in #2398).🤖 Generated with Claude Code