feat(sharing): pick-not-type Sharing Rule form via field widget hints#2878
Merged
Conversation
Make the Setup "New Sharing Rule" form select data instead of asking admins to hand-type machine identifiers. - spec: add a first-class `FieldSchema.widget` override — names a registered form component (resolved as `field:<widget>`) to render a field with, overriding the `type` default and degrading back to it when unregistered. The generic object form already honored the hint (`widget || type`); this promotes it to an authored, liveness-classified property (field.json). - plugin-sharing: sys_sharing_rule declares widgets + dependsOn — object_name → object-ref, criteria_json → filter-condition (dependsOn object_name), recipient_id → recipient-picker (dependsOn recipient_type). - plugin-sharing: drop the `queue` recipient type — declared-but-unenforced (the evaluator expands no users for it), so it authored a silently-inert rule (ADR-0078); i18n bundles regenerated. Widgets ship in objectui; fields degrade to their `type` renderer where the widgets aren't loaded, so the two repos land independently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wGu7aa1YXhHseojW9CBRf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 96 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The Setup New Sharing Rule form made admins hand-type machine data — the object's machine name, a raw FilterCondition JSON, and a recipient id/name — where the platform should let them select. This makes those fields pickers.
The enabling mechanism is a new, first-class
FieldSchema.widgetoverride: it names a registered form component (resolved asfield:<widget>) to render a field with, overriding the default widget derived fromtypeand degrading back to thetyperenderer when unregistered. The generic object form already honored the hint (widget || type); this promotes it to an authored, liveness-classified property so any config object can request a picker instead of a raw input.The matching widgets ship in objectui (
objectstack-ai/objectui#<pending>, same branch). Because the fields degrade to theirtyperenderer where the widgets aren't loaded, the two repos land independently.Changes
FieldSchema.widget(+ liveness classification infield.json;check:livenessgate green).sys_sharing_ruledeclares widgets +dependsOn:object_name→object-ref(object picker)criteria_json→filter-condition(visual criteria builder,dependsOn: object_name)recipient_id→recipient-picker(record picker,dependsOn: recipient_type)queuerecipient type — it is declared-but-unenforced (the evaluator expands no users for it), so offering it authored a silently-inert rule (ADR-0078). i18n bundles regenerated.Verification
@objectstack/specbuild ✅ ·check:livenessgate ✅ (field fully classified)@objectstack/plugin-sharingbuild ✅ · tests 79/79 ✅queueremoval touches only the object's select options + regenerated i18n; the unrelatedexpandPrincipalqueue path is untouched.Notes
criteria_jsonstill round-trips the MongoDB-style FilterCondition the evaluator spreads intoengine.find;recipient_idstill stores a record id (or the position name forposition).🤖 Generated with Claude Code
Generated by Claude Code