Skip to content

Conversation

Assem-Uber
Copy link
Contributor

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
Screenshot 2025-09-09 at 18 10 15
Screenshot 2025-09-09 at 18 11 03
Screenshot 2025-09-09 at 18 11 28

Copy link
Contributor

@Copilot Copilot AI left a 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.

for (let i = 0; i < inputArray.length; i++) {
const val = inputArray[i];
try {
JSON.parse(val); // TODO: consider using losslessJsonParse
Copy link

Copilot AI Sep 12, 2025

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.

Suggested change
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>
@Assem-Uber Assem-Uber merged commit dbe6b9f into cadence-workflow:master Sep 12, 2025
4 checks passed
@Assem-Uber Assem-Uber deleted the feature/15220/start-workflow-required-fields branch September 12, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants