-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Manage composite fields in step filters #13407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
thomtrp
commented
Jul 24, 2025
- add to step output schema the information that field is a composite sub field
- from output schema, when selecting the variable, copy all info required to stepFilter
- from stepFilter, when selecting a value, display a special component for composites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR implements comprehensive support for composite fields in workflow step filters. Composite fields are complex field types like FullName (firstName/lastName), Address (street/city/country), Currency (amount/currencyCode), and Phones that contain multiple sub-fields.
The implementation follows a three-tier approach:
-
Schema Enhancement: Adds
isCompositeSubField
boolean flag to both frontend (StepOutputSchema.ts
) and backend (output-schema.type.ts
) type definitions, plus enhances the fake field generator to mark composite sub-fields with their parent'sfieldMetadataId
. -
Variable Resolution: Updates
searchVariableThroughOutputSchema.ts
with a newVariableInfo
type and composite field detection logic, trackingparentFieldMetadataId
through the schema traversal to maintain hierarchical relationships. -
UI Components: Creates a specialized
WorkflowStepFilterValueCompositeInput
component that renders appropriate form inputs based on field type (country selectors for addresses, number inputs for currency amounts, etc.), and updates the main filter components to use this specialized handling.
The changes also extend the StepFilter
type to include fieldMetadataId
and compositeFieldSubFieldName
properties, enabling the system to maintain context about which specific sub-field of a composite field is being filtered. This architectural change moves from complex schema-based variable resolution to direct field access, simplifying the component logic while enabling more sophisticated composite field handling.
Confidence score: 4/5
• This PR appears safe to merge with proper composite field support implementation, though some edge cases need attention
• Score reflects solid architecture but potential runtime issues with missing field metadata and phone number input type mismatch
• Files needing more attention: WorkflowStepFilterFieldSelect.tsx
(potential runtime error), WorkflowStepFilterValueCompositeInput.tsx
(phone number input type)
8 files reviewed, 4 comments
...ow-steps/workflow-actions/filter-action/components/WorkflowStepFilterValueCompositeInput.tsx
Show resolved
Hide resolved
...ow-steps/workflow-actions/filter-action/components/WorkflowStepFilterValueCompositeInput.tsx
Show resolved
Hide resolved
...ow/workflow-steps/workflow-actions/filter-action/components/WorkflowStepFilterValueInput.tsx
Show resolved
Hide resolved
...w/workflow-steps/workflow-actions/filter-action/components/WorkflowStepFilterFieldSelect.tsx
Show resolved
Hide resolved
📊 API Changes ReportREST Metadata API Analysis ErrorError Output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! 🫶
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:40066 This environment will automatically shut down when the PR is closed or after 5 hours. |
1ab308b
to
f7af294
Compare
f7af294
to
4e53b87
Compare