fix: correctly identify default switch case edges - #453
Merged
lornakelly merged 2 commits intoSep 29, 2026
Merged
lornakelly merged 2 commits into
lornakelly merged 2 commits into
Conversation
✅ Deploy Preview for openworkflow-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Redirected edges for default cases are not animated and need coverage.
Review effort: Lite
Findings: None
What changed in this PR
Fixes switch default-case edge animation by detecting cases without a when condition instead of relying on case names.
Changes:
- Adds default-case edge detection and animation handling.
- Adds regression tests and updates the Storybook workflow fixture.
- Adds a patch changeset.
| File | Description |
|---|---|
packages/open-workflow-diagram-editor/src/core/graph.ts |
Identifies default switch-case edges. |
packages/open-workflow-diagram-editor/src/react-flow/diagram/diagramBuilder.ts |
Applies animation to detected edges. |
packages/open-workflow-diagram-editor/tests/core/graph.test.ts |
Tests default-case detection. |
packages/open-workflow-diagram-editor/tests/react-flow/diagram/diagramBuilder.test.ts |
Tests rendered edge animation. |
packages/open-workflow-diagram-editor/stories/nested-editing/workflows/switch-locked-cases.yaml |
Uses a non-default case name. |
.changeset/switch-default-edge-fix.md |
Documents the patch release. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
lornakelly
requested review from
fantonangeli,
handreyrc and
kumaradityaraj
September 25, 2026 14:46
Signed-off-by: lornakelly <lornakelly88@gmail.com>
lornakelly
force-pushed
the
450/switch-default-bug
branch
from
September 25, 2026 15:12
8b4a505 to
59aa002
Compare
Signed-off-by: lornakelly <lornakelly88@gmail.com>
fantonangeli
approved these changes
Sep 28, 2026
kumaradityaraj
approved these changes
Sep 29, 2026
lornakelly
merged commit Sep 29, 2026
3fd59a9
into
open-workflow-specification:main
13 checks passed
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.
Closes: #450
Summary
The diagram editor was incorrectly identifying default switch cases. This caused edges to not be animated when default cases (those without a
when) used different names. Fix identifies default case based on missingwhen.Note: Also updated "unicorn/no-thenable" disabled tests to no longer need the lint exception
Verify: Storybook > Nested Editing > Switch Locked Cases