Skip to content

feat: Add CatchContainer to graph node types #141

@lornakelly

Description

@lornakelly

Description

The SDK currently exposes a single Catch entry in GraphNodeType, however, a catch block in the DSL has two distinct visual shapes depending on its content:

  1. Leaf - when catch.do is absent, the catch is a single handler with no nested flow.
  2. Container - when catch.do is present, the catch wraps a sequence of child tasks that run when the error is caught, and should render as a container with its own internal subgraph.

The current single Catch type can't represent both. We need to extend GraphNodeType to add a CatchContainer variant alongside the existing leaf Catch, and route to the correct one at graph-build time based on the presence of catch.do

Motivation

  • Correct visual representation - a catch with nested tasks is structurally a container (it has an internal flow), and rendering it as a leaf hides that flow from the user. They have to read the YAML to know there's anything inside.

Proposed Implementation

No response

Definition of Done

  • Implementation: Fully implemented according to the Serverless Workflow spec.
  • Unit Tests: Comprehensive unit tests are included and passing.
  • Integration Tests: Verified within the monorepo and target environments (Web/VS Code).
  • Documentation: Updated README.md, ADRs, or official docs.
  • Performance: No significant regression in editor responsiveness.
  • Accessibility: UI changes comply with accessibility standards.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions