Fix UserTypeResolver to return meta for the SDK UI rendering#1106
Fix UserTypeResolver to return meta for the SDK UI rendering#1106ThaminduDilshan merged 3 commits intoasgardeo:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes the UserTypeResolver executor to return meta for SDK UI rendering and introduces dynamic meta generation capabilities for flow executors.
Changes:
- Introduces a MetaBuilder in the flow core package for dynamically constructing UI metadata structures
- Updates UserTypeResolver to return meta when prompting user type selection using the new MetaBuilder
- Modifies task execution nodes to prefer executor-returned meta over node-configured meta in verbose mode
- Updates default registration flow definition with PROMPT nodes containing meta elements
- Updates frontend dependencies (@asgardeo/react from 0.6.27 to 0.6.31) and sample app SDK to support the new meta structure
- Adds i18n translations for user type selection (label and placeholder)
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/internal/flow/core/meta_builder.go | New MetaBuilder implementation for dynamic meta construction with fluent API |
| backend/internal/flow/core/meta_builder_test.go | Comprehensive unit tests for MetaBuilder functionality |
| backend/internal/flow/executor/user_type_resolver.go | Updated to use MetaBuilder for generating user type selection meta |
| backend/internal/flow/executor/user_type_resolver_test.go | Updated tests to verify meta structure is returned |
| backend/internal/flow/core/task_execution_node.go | Modified to prefer executor meta over node meta in verbose mode |
| backend/internal/flow/core/task_execution_node_test.go | Added tests for executor meta precedence logic |
| backend/internal/flow/common/model.go | Added Meta field to ExecutorResponse |
| backend/cmd/server/bootstrap/flows/registration/registration_flow_basic.json | Updated with PROMPT nodes containing structured meta for credentials and user info |
| frontend/apps/thunder-gate/src/components/SignUp/SignUpBox.tsx | Enhanced SELECT component handling to support both string and object options |
| frontend/packages/thunder-i18n/src/locales/en-US.ts | Added usertype label and placeholder translations |
| frontend/pnpm-workspace.yaml | Updated @asgardeo/react catalog version to 0.6.31 |
| frontend/pnpm-lock.yaml | Updated dependency lockfile |
| samples/apps/react-sdk-sample/package.json | Updated @asgardeo/react to 0.6.31 |
| samples/apps/react-sdk-sample/pnpm-lock.yaml | Updated sample app dependency lockfile |
Files not reviewed (2)
- frontend/pnpm-lock.yaml: Language not supported
- samples/apps/react-sdk-sample/pnpm-lock.yaml: Language not supported
fa92a50 to
c21d367
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1106 +/- ##
==========================================
+ Coverage 87.09% 87.27% +0.17%
==========================================
Files 535 536 +1
Lines 36152 36240 +88
Branches 1611 1611
==========================================
+ Hits 31488 31627 +139
+ Misses 3012 2976 -36
+ Partials 1652 1637 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c21d367 to
2d34e38
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- frontend/pnpm-lock.yaml: Language not supported
- samples/apps/react-sdk-sample/pnpm-lock.yaml: Language not supported
|
Hope we are planning to add meta for ProvisioningExecutor too and improve it to dynamically get schema attributes as inputs in future efforts |
2d34e38 to
5390130
Compare
5390130 to
e76bcf3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- frontend/pnpm-lock.yaml: Language not supported
- samples/apps/react-sdk-sample/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
frontend/apps/thunder-gate/src/components/SignUp/SignUpBox.tsx:252
- The type definition for
optionsisstring[]but the code at lines 419-441 handles bothstringand{ value: string; label: string }types. The type definition should be updated to match the actual implementation:options?: (string | { value: string; label: string })[]to provide accurate type information for consumers of this component.
options?: string[];
frontend/apps/thunder-gate/src/components/SignUp/SignUpBox.tsx:262
- Similar to the previous type definition issue on line 252, this
optionstype declaration should also be updated to(string | { value: string; label: string })[]to accurately reflect the handling logic used later in the component.
options?: string[];
356ee98 to
b2b356d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 27 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- frontend/pnpm-lock.yaml: Language not supported
- samples/apps/react-sdk-sample/pnpm-lock.yaml: Language not supported
Purpose
This pull request fixes returning meta for the UserTypeResolver dynamic inputs. Additionally this PR introduces prompt nodes with meta for the default registration flow definition.
Approach
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks