fix(studio): approver Type dropdown drops deprecated role, membership-tier picker (framework #3133)#2643
Merged
Merged
Conversation
…ip-tier picker (framework #3133)
Two objectui-side gaps that let the ADR-0090 D3 approver `role` trap survive in
the Studio flow designer, both found by dogfooding the running console.
1. `FlowObjectListField` had no `select` branch. An objectList column of kind
`select` — which the approver `Type` is, derived from the spec enum — fell
through to a plain `<Input>`. So the Type field was FREE TEXT: the options
(and framework's ADR-0090 D3 `xEnumDeprecated` filtering that drops `role`)
were computed and thrown away, and the author got no guidance at all.
Added the branch: a real dropdown from `col.options`, honoring
`xEnumDeprecated`. A STORED value no longer in the options (a 15.x `role`
row) still renders, flagged `(deprecated)`, so editing a legacy row can't
silently blank it — mirroring the framework runtime's keep-authored-spelling
decision.
2. The `role`/`org-membership-level` reference picker called
`client.list('role')` — a metadata type ADR-0090 D3 DELETED. It returned
nothing, so the Value box degraded to free text. Replaced with a fixed
owner/admin/member enum; `role` and `org_membership_level` both map to the
new `org-membership-level` picker kind so a stored legacy row still renders.
`json-schema-to-fields` now threads `xEnumDeprecated` from the schema into
`enumOptions` (both the top-level and objectList-column paths). The hardcoded
fallback config and the `ReferenceKind` union follow the rename.
Verified end to end in the browser against a framework backend on the #3133
branch: the live approver Type dropdown shows
[User, Org Membership Level, Position, Team, Department, Manager, Field, Queue]
— no "Role".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
added a commit
to objectstack-ai/framework
that referenced
this pull request
Jul 17, 2026
…l` (#3137) Closes #3133. Renames the last platform surface projecting the ADR-0090 D3 reserved word: `ApproverType.role` → `org_membership_level`, with `role` kept as a deprecated alias for one window (resolves identically, warns). Publishes `xEnumDeprecated` on the node configSchema so Studio drops the deprecated spelling from the approver-type picker. Supersedes #3120/#3122. objectui half: objectstack-ai/objectui#2643 (merged). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
The objectui half of framework #3133 (framework PR objectstack-ai/framework#3137). Both gaps were found by dogfooding the running console, not by reading code — and the first one is exactly the kind of thing static reading misses.
Context
Framework #3137 renames the
roleapprover type toorg_membership_level(rolekept as a deprecated alias) and, crucially, publishes anxEnumDeprecatedannotation on the node configSchema so pickers can drop the deprecated spelling. This PR makes Studio honor it — and fixes a second, older gap along the way.1. The approver
Typewas silently free text (the real bug)FlowObjectListFieldhandledboolean,reference,expression, and else → plain<Input>. There was noselectbranch. The approverTypecolumn iskind: 'select'(derived from the spec enum byjson-schema-to-fields), so it fell through to a free-text input: the computedoptions— including framework'sxEnumDeprecatedfiltering — were thrown away, and the author got no dropdown and no guidance at all.This is why the rename alone wasn't enough: I'd wired
xEnumDeprecatedthroughenumOptions, and it was inert, because nothing rendered the options. Only driving the real designer in a browser revealed it.Fix: added the
selectbranch — a real dropdown fromcol.options. A stored value no longer in the options (a 15.xrolerow) still renders, flagged(deprecated), so editing a legacy row can't silently blank it. That mirrors the framework runtime's keep-the-authored-spelling decision.2. The membership-tier picker called a deleted metadata type
KIND_TO_META_TYPE.role = 'role'→client.list('role'), but ADR-0090 D3 deleted therolemetadata type. The call returned nothing, so the Value box degraded to free text — the picker was already dead. Replaced with a fixedowner/admin/memberenum (org-membership-levelkind). Bothroleandorg_membership_levelmap to it, so a stored legacy row still renders its picker.Also
json-schema-to-fieldsthreadsxEnumDeprecatedfrom the schema intoenumOptionson both the top-level and objectList-column paths.flow-node-config.ts) and theReferenceKindunion follow the rename (the fallback objectList also renders free text until a backend is present, so this is belt-and-suspenders).Verification — driven in the browser against a live backend
Ran the console against a framework backend on the #3133 branch, created a writable package + flow + approval node, and opened the real approver Type dropdown:
Roleis gone, through the entire stack: framework spec → published configSchema over HTTP → objectui's converter → the rendered dropdown.FlowObjectListField.select.test.tsx(3): renders a select column as a combobox, offers norole, and keeps a stored deprecated value visible+flagged.json-schema-to-fields.test.tsupdated to the new contract (options excluderole; picker map keepsrole → org-membership-level).Merge order
Framework #3137 should land (or at least be published to the version objectui resolves) so the backend actually emits
xEnumDeprecated. Until then this PR is inert-but-safe: noxEnumDeprecated→ dropdown simply shows all enum members, exactly as before, and gap #2 (the dead picker) is fixed regardless.🤖 Generated with Claude Code