-
Notifications
You must be signed in to change notification settings - Fork 121
Add start workflow form with required fields #1016
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
Add start workflow form with required fields #1016
Conversation
…t-workflow-required-fields
…st-body-schema.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…art-workflow-required-fields
…into feature/15220/start-workflow-required-fields
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.
Pull Request Overview
This PR introduces a new start workflow form component with required fields and conditional scheduling options. The form allows users to start workflows with different scheduling types (immediate, later, or cron-based) and provides a clean interface for inputting workflow parameters.
Key Changes
- Added a new workflow start form component with required fields like task list, workflow type, and timeout settings
- Implemented conditional form fields that show/hide based on selected schedule type (Now, Later, Cron)
- Created comprehensive form validation schema using Zod with custom validation for JSON inputs and schedule-specific requirements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
workflow-action-start-form.types.ts | Type definitions for form data and submission data |
workflow-action-start-form.tsx | Main form component with conditional fields and validation |
start-workflow-form-schema.ts | Zod validation schema with custom refinements for schedule types |
workflow-action-start-form.test.tsx | Comprehensive test suite covering form interactions and validation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/views/workflow-actions/workflow-action-start-form/workflow-action-start-form.tsx
Outdated
Show resolved
Hide resolved
for (let i = 0; i < inputArray.length; i++) { | ||
const val = inputArray[i]; | ||
try { | ||
JSON.parse(val); // TODO: consider using losslessJsonParse |
Copilot
AI
Sep 12, 2025
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.
[nitpick] The TODO comment suggests using losslessJsonParse but doesn't provide context about why or when this should be done. Consider expanding this comment to explain the benefits of lossless parsing or create a proper issue to track this improvement.
JSON.parse(val); // TODO: consider using losslessJsonParse | |
JSON.parse(val); // TODO: consider using losslessJsonParse for improved number precision and to avoid type coercion issues that can occur with JSON.parse. Use losslessJsonParse if workflow input values require exact numeric representation or if input types may not be handled correctly by JSON.parse. See https://github.com/temporalio/lossless-json for more details. (Consider creating a tracking issue for this improvement.) |
Copilot uses AI. Check for mistakes.
…-action-start-form.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Start workflow form with minimal required fields. The form makes it easy to provide schedule time by showing only fields for the schedule type. Also it allows user to add input in a single format while picking the SDK language, which allows the server to handle the formatting.
Screenshots


