feat: Use search attributes in start form#1055
Merged
Assem-Uber merged 24 commits intocadence-workflow:masterfrom Oct 29, 2025
Merged
Conversation
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
* Create hook for fetching search attributes Signed-off-by: Assem Hafez <assem.hafez@uber.com> * use stringifyUrl Signed-off-by: Assem Hafez <assem.hafez@uber.com> --------- Signed-off-by: Assem Hafez <assem.hafez@uber.com>
…rkflow#1049) * propagate user headers from server renders * fix tests * dynamically import headers * log propagated header keys * add test cases * import headers inline
*Add import/named rule to .eslintrc to enable detecting import issues * Use deep imports for Lodash * Fix other misc lint issues (unused imports/variables) Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
…ture/15450/use-search-attributes-in-start-form
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the JSON text field for search attributes with a dedicated search attributes component in the workflow start form. The change improves the user experience by providing a structured input method with type-aware fields instead of raw JSON editing.
Key Changes:
- Replaced JSON textarea with
WorkflowActionsSearchAttributescomponent for structured input - Updated schema validation to handle array of key-value pairs instead of JSON strings
- Added helper function to extract and format search attribute validation errors
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| workflow-actions-search-attributes.types.ts | Removed optional label prop from component interface |
| workflow-actions-search-attributes.tsx | Removed FormControl wrapper and label prop usage |
| workflow-actions-search-attributes.test.tsx | Removed tests for label customization |
| workflow-action-start-optional-section.types.ts | Added cluster prop to support fetching search attributes |
| workflow-action-start-optional-section.tsx | Integrated WorkflowActionsSearchAttributes component with search attributes fetching |
| workflow-action-start-optional-section.test.tsx | Updated tests to mock new component and verify error handling |
| workflow-action-start-form.tsx | Passed cluster prop to optional section |
| start-workflow-form-schema.ts | Changed validation from JSON string to array of key-value objects |
| transform-start-workflow-form-to-submission.ts | Converted array format to object for API submission |
| get-search-attributes-error-message.ts | Added helper to extract error messages from nested field errors |
| get-search-attributes-error-message.test.ts | Added comprehensive tests for error message extraction |
| start-workflow-request-body-schema.ts | Strengthened validation to allow only string, number, or boolean values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adhityamamallan
approved these changes
Oct 28, 2025
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.
Summary
Replace json field used for search attributes with the new search attributes field.
Screenshots


Form
Search attributes in start event