fix(app-shell): propagate action-param 'visible' through resolveActionParams (finish create-user phone fix)#2419
Merged
Conversation
…solveActionParams The create-user phone fix (#2406) gated the phoneNumber param with visible: 'features.phoneNumber == true', but resolveActionParam dropped visible when flattening raw spec params into ActionParamDef — so ActionParamDialog's filterVisibleParams never saw the predicate and the phone field kept rendering even with the phoneNumber auth plugin off. Propagate visible in all three resolve branches (inline / field-backed / missing-field), unwrapping the spec's { dialect, source } ExpressionInput envelope to a plain CEL string. Adds RawActionParam.visible + a resolver test. Completes the create-user phone fix end to end. 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
|
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 bug
Creating a user still shows a Phone Number field even though the default
backend has no
phoneNumberauth plugin — so submitting a phone fails withPhone numbers require the phoneNumber auth plugin. The prior two-part fix wassupposed to hide it:
ActionParamDialog.filterVisibleParamshides a param whosevisibleCEL predicate is false.create_user'sphoneNumberparam withvisible: 'features.phoneNumber == true'.Both landed, the backend serves the predicate,
features.phoneNumberisfalse— yet the field kept rendering.Root cause
The predicate never reached the dialog.
create_user→paramCollectionHandler→
resolveActionParams→ActionParamDialog.resolveActionParamflattenseach raw spec param into
ActionParamDeffield-by-field and did not copyvisible(in any of its three return branches). Soparam.visiblewasundefinedat the dialog,filterVisibleParamssaw no predicate, and the phonefield always rendered.
RawActionParamdidn't even declarevisible.This is the missing plumbing between #2406 (the filter) and #2871 (the served
predicate).
Fix
RawActionParamgainsvisible?: string | { dialect?: string; source?: string }.resolveActionParampropagatesvisiblein all three branches (inline /field-backed / missing-field), unwrapping the spec's normalized
{ dialect, source }ExpressionInputenvelope to a plain CEL string via asmall
normaliseVisiblehelper.Tests
resolveActionParams.test.ts(6 cases): raw-string +{dialect,source}envelope propagation, inline / field-backed / missing-field branches, absent
and empty predicates.
ActionParamDialog.test.tsx(6) still green — 12 passing.turbo run build --filter=@object-ui/app-shell(29 pkgs) green.Rollout note
The Setup console is built from a pinned objectui SHA (
framework/.objectui-sha→
scripts/build-console.sh). To reach a running deployment this needs: mergehere → bump
framework/.objectui-shato the new objectui commit → rebuild theconsole (
scripts/build-console.sh) → restart. A follow-up framework PR willbump the pin.
Closes the create-user phone issue end to end.
🤖 Generated with Claude Code