Python: feat(devui): enable manual workflow triggers with comprehensive type support - Replat on main#4273
Open
alliscode wants to merge 1 commit intomicrosoft:mainfrom
Open
Python: feat(devui): enable manual workflow triggers with comprehensive type support - Replat on main#4273alliscode wants to merge 1 commit intomicrosoft:mainfrom
alliscode wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables manual workflow triggers in the DevUI by adding comprehensive JSON Schema type support for various primitive types (null, integer, number, boolean, array) in addition to the existing string and object types. The changes span both the Python backend (schema generation and input parsing) and the TypeScript/React frontend (UI rendering and form validation).
Changes:
- Added None/null type support for workflows with no inputs, allowing direct execution
- Implemented Union/Optional type handling (X | None) in schema generation with
default: None - Extended primitive type support to integer, number, boolean, and array types with dedicated UI components
- Enhanced form validation and submission logic to handle all new input types
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/devui/agent_framework_devui/_utils.py |
Extended generate_input_schema to handle None type, Union types (X | None), and list/array types; added Union handling in parse_input_for_type and _parse_dict_input |
python/packages/devui/tests/devui/test_schema_generation.py |
Added tests for None type and Optional type schema generation (str | None, int | None) |
python/packages/devui/frontend/src/types/index.ts |
Made type field optional and added "null" to type union; added anyOf field for Union type support |
python/packages/devui/frontend/src/components/features/workflow/workflow-input-form.tsx |
Added dedicated renderers for integer, number, boolean, and array inputs; extended validation and submission logic; added null type handling |
python/packages/devui/frontend/src/components/features/workflow/run-workflow-button.tsx |
Extended input analysis to detect null, integer, number, boolean, and array types; updated default data building and UI labels for new types |
Comments suppressed due to low confidence (1)
python/packages/devui/agent_framework_devui/_utils.py:462
- The inline comments have duplicate numbering: both Pydantic models (line 450) and SerializationMixin classes (line 454) are labeled as "3". The subsequent sections should be renumbered to maintain consistent sequential numbering:
- Line 439: "2. Generic types" ✓
- Line 450: "3. Pydantic models" ✓
- Line 454: Should be "4. SerializationMixin classes"
- Line 458: Should be "5. Dataclasses"
- Line 462: Should be "6. Fallback to string"
# 3. Pydantic models (legacy support)
if hasattr(input_type, "model_json_schema"):
return input_type.model_json_schema() # type: ignore
# 3. SerializationMixin classes (Message, etc.)
if is_serialization_mixin(input_type):
return generate_schema_from_serialization_mixin(input_type)
# 4. Dataclasses
if is_dataclass(input_type):
return generate_schema_from_dataclass(input_type)
# 5. Fallback to string
python/packages/devui/frontend/src/components/features/workflow/workflow-input-form.tsx
Outdated
Show resolved
Hide resolved
python/packages/devui/frontend/src/components/features/workflow/workflow-input-form.tsx
Outdated
Show resolved
Hide resolved
python/packages/devui/frontend/src/components/features/workflow/run-workflow-button.tsx
Outdated
Show resolved
Hide resolved
python/packages/devui/frontend/src/components/features/workflow/run-workflow-button.tsx
Outdated
Show resolved
Hide resolved
python/packages/devui/frontend/src/components/features/workflow/workflow-input-form.tsx
Outdated
Show resolved
Hide resolved
python/packages/devui/frontend/src/components/features/workflow/workflow-input-form.tsx
Outdated
Show resolved
Hide resolved
b47741d to
6d9bb4d
Compare
Member
…ve type support Enable manual triggering of workflows in DevUI by adding full JSON Schema type support, including Union types and None/null handling for workflows with optional or no inputs. Key changes: - generate_input_schema: support None type, Union/Optional, generic list types - parse_input_for_type: handle None type, guard isinstance for special types - _parse_dict_input: handle Union types by extracting non-None base type - JSONSchema TypeScript interface: add null type, anyOf, make type optional - RunWorkflowButton: handle null/integer/number/boolean/array in analysis, defaults, icons, and type labels - WorkflowInputForm: add canSubmit/submit/init/renderers for all primitive types at top-level schema - Tests: add test_none_type_schema_generation, test_optional_type_schema_generation Reimplements microsoft#1693 onto current main after significant codebase refactoring. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6d9bb4d to
63fa9de
Compare
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.
This PR replaces the out-of-date PR here: #1693. The old PR has been re-implemented on the current main after many breaking changes for RC/GA.
Original PR description:
Enable manual triggering of workflows in DevUI by adding full JSON Schema type support, including Union types and None/null handling for workflows with optional or no inputs.
Key Feature - Manual Workflow Triggers
Type System Enhancements
UX Improvements
Technical Implementation