Skip to content

Add extended graph and dummy auto-layout #59#77

Open
handreyrc wants to merge 1 commit intoserverlessworkflow:mainfrom
handreyrc:add-graph
Open

Add extended graph and dummy auto-layout #59#77
handreyrc wants to merge 1 commit intoserverlessworkflow:mainfrom
handreyrc:add-graph

Conversation

@handreyrc
Copy link
Copy Markdown
Contributor

@handreyrc handreyrc commented Apr 13, 2026

Closes #59

Summary

This PR adds dummy auto-layout and extended graph types.

Changes

  • Added custom graph implementation with extended types to support:
    • Node size
    • Node position
    • Edge types (DEFAULT, ERROR and CONDITION)
    • Edge waypoints
  • Added buildGraph function to sdk wrapper
  • Added dummy auto-layout with fixed coordinates
  • Tests for extended graph types
  • Test for dummy auto-layout

Copilot AI review requested due to automatic review settings April 13, 2026 22:59
@handreyrc handreyrc changed the title Add extendended graph and dummy auto-layout #59 Add extended graph and dummy auto-layout #59 Apr 13, 2026
Copy link
Copy Markdown
Contributor

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

Adds SDK graph generation support to the diagram editor core by introducing extended graph types (node size/position, edge types/waypoints), exposing a buildGraph wrapper, and providing a dummy auto-layout implementation with accompanying tests/snapshots.

Changes:

  • Added extended graph type definitions and edge-type enrichment (solveEdgeTypes).
  • Exposed buildGraph via the core SDK wrapper and re-exported core modules.
  • Added a dummy applyAutoLayout implementation plus integration/unit tests and snapshots.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
packages/serverless-workflow-diagram-editor/tests/fixtures/workflows.ts Added new JSON/YAML workflow fixtures used by graph + auto-layout tests.
packages/serverless-workflow-diagram-editor/tests/core/workflowSdk.integration.test.ts Added integration coverage for buildGraph and extended graph typing/snapshot.
packages/serverless-workflow-diagram-editor/tests/core/graph.test.ts New unit tests for edge type enrichment across default/error/condition/nested cases.
packages/serverless-workflow-diagram-editor/tests/core/autoLayout.integration.test.ts New integration test verifying dummy auto-layout positions/sizes and snapshot.
packages/serverless-workflow-diagram-editor/tests/core/snapshots/workflowSdk.integration.test.ts.snap Snapshot for buildGraph result.
packages/serverless-workflow-diagram-editor/tests/core/snapshots/autoLayout.integration.test.ts.snap Snapshot for applyAutoLayout result.
packages/serverless-workflow-diagram-editor/src/core/workflowSdk.ts Switched to SDK namespace import; added buildGraph wrapper returning extended graph.
packages/serverless-workflow-diagram-editor/src/core/index.ts Re-exported graph and autoLayout modules.
packages/serverless-workflow-diagram-editor/src/core/graph.ts Added extended graph types and solveEdgeTypes.
packages/serverless-workflow-diagram-editor/src/core/autoLayout.ts Added dummy applyAutoLayout implementation to set size/position.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/core/graph.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/tests/fixtures/workflows.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/tests/core/graph.test.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/core/graph.ts
Comment thread packages/serverless-workflow-diagram-editor/src/core/autoLayout.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/tests/core/graph.test.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/tests/fixtures/workflows.ts Outdated
Comment thread packages/serverless-workflow-diagram-editor/tests/fixtures/workflows.ts Outdated
Copy link
Copy Markdown
Contributor

@lornakelly lornakelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR Handrey, nice work. Just a few comments

Comment thread packages/serverless-workflow-diagram-editor/src/core/workflowSdk.ts
Comment thread packages/serverless-workflow-diagram-editor/tests/core/graph.test.ts Outdated
Copilot AI review requested due to automatic review settings April 14, 2026 20:42
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/core/README.md Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/core/graph.ts
Comment thread packages/serverless-workflow-diagram-editor/src/core/graph.ts
Comment thread packages/serverless-workflow-diagram-editor/src/core/autoLayout.ts Outdated
Copilot AI review requested due to automatic review settings April 14, 2026 21:03
@handreyrc handreyrc requested a review from lornakelly April 14, 2026 21:06
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: handreyrc <handrey.cunha@gmail.com>
Copy link
Copy Markdown
Contributor

@lornakelly lornakelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@handreyrc handreyrc requested a review from ricardozanini April 15, 2026 17:24
@handreyrc
Copy link
Copy Markdown
Contributor Author

@fantonangeli,

Could you review this PR, please?

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.

feat: Set up model to extendended graph structure generation and dummy auto-layout

4 participants