feat: Add support for raise task - #443
lornakelly wants to merge 2 commits into
Conversation
✅ Deploy Preview for openworkflow-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the critical nested-selector state issue and moderate scalar-to-inline reconciliation issue.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds support for raise.error reference and inline-definition variants, including nested one-of tracking, cleanup, improved labels, and placeholders.
Changes:
- Refactors hierarchical one-of sentinel tracking.
- Improves ancestor-path handling and label/placeholder generation.
- Adds fixtures, tests, Storybook coverage, and release notes.
Two unresolved findings remain: a critical issue (2 votes) with nested selector state restoration in FormField.tsx, and a moderate issue (1 vote) with scalar-to-inline reconciliation in taskDraft.ts.
| File | Summary |
|---|---|
packages/open-workflow-diagram-editor/tests/side-panel/forms/FormFields.test.tsx |
Tests sentinel tree and default handling. |
packages/open-workflow-diagram-editor/tests/side-panel/EditFormFooter.raiseTask.test.tsx |
Tests raise-task variant commits. |
packages/open-workflow-diagram-editor/tests/side-panel/EditFormFooter.emitTask.test.tsx |
Updates sentinel path expectations. |
packages/open-workflow-diagram-editor/tests/fixtures/workflows.ts |
Adds raise-error fixtures. |
packages/open-workflow-diagram-editor/tests/core/taskDraft.test.ts |
Tests ancestor-aware dirty-value application. |
packages/open-workflow-diagram-editor/tests/core/schemaToFormFields.test.ts |
Tests labels and placeholders. |
packages/open-workflow-diagram-editor/stories/nested-editing/workflows/raise-error-shapes.yaml |
Adds raise-error story data. |
packages/open-workflow-diagram-editor/stories/nested-editing/NestedEditing.stories.tsx |
Registers nested-editing coverage. |
packages/open-workflow-diagram-editor/stories/nested-editing/index.ts |
Exports workflow data. |
packages/open-workflow-diagram-editor/src/side-panel/forms/TaskForm.tsx |
Integrates hierarchical sentinel defaults. |
packages/open-workflow-diagram-editor/src/side-panel/forms/FormField.tsx |
Handles nested one-of tracking; critical selector-state restoration issue remains. |
packages/open-workflow-diagram-editor/src/side-panel/EditFormFooter.tsx |
Extracts and applies sentinel paths. |
packages/open-workflow-diagram-editor/src/core/taskDraft.ts |
Applies ancestor-aware dirty values; moderate scalar-to-inline reconciliation issue remains. |
packages/open-workflow-diagram-editor/src/core/schemaToFormFields.ts |
Improves label and placeholder generation. |
.changeset/raiseTask-form.md |
Documents the release. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
7b8b8ac to
de58d33
Compare
Signed-off-by: lornakelly <lornakelly88@gmail.com>
de58d33 to
b00041b
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the URI placeholder regression and incorrect nested one-of dirty sentinel behavior, then apply formatting fixes.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Resolved since last review (1)
Signed-off-by: lornakelly <lornakelly88@gmail.com>


Summary
Closes: #405
Enhances the form editor's handling of oneOf fields, specifically improving support for the raise task's error field which can be either a named reference or an inline definition. The changes improve variant tracking and field cleanup.
To verify go to Nested Workflows > Raise Error States story
Changes
__oneof__.<path>.__self__structure for more reliable dirty state management. Added constants and replaces stringsderiveLabel()- was producingConfigurationfor every task type, now checks if last word matches the property keyNotes