[PR #67] [MERGED] feat: add viz by generating svg image #76

Closed
opened 2026-02-16 03:16:06 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-ts/pull/67
Author: @marcusschiesser
Created: 4/22/2025
Status: Merged
Merged: 8/26/2025
Merged by: @marcusschiesser

Base: mainHead: ms/add-viz


📝 Commits (10+)

📊 Changes

26 files changed (+1605 additions, -2 deletions)

View changed files

.changeset/tiny-fishes-grow.md (+5 -0)
demo/visualization/.gitignore (+24 -0)
demo/visualization/index.html (+14 -0)
demo/visualization/package.json (+28 -0)
demo/visualization/public/llamaindex.svg (+18 -0)
demo/visualization/src/main.ts (+28 -0)
demo/visualization/src/style.css (+9 -0)
demo/visualization/src/vite-env.d.ts (+1 -0)
demo/visualization/src/workflow.ts (+60 -0)
demo/visualization/tsconfig.app.json (+27 -0)
demo/visualization/tsconfig.json (+12 -0)
demo/visualization/tsconfig.node.json (+25 -0)
demo/visualization/vite.config.ts (+7 -0)
packages/viz/examples/basic.ts (+72 -0)
packages/viz/package.json (+59 -0)
packages/viz/src/graph.ts (+70 -0)
packages/viz/src/index.ts (+2 -0)
packages/viz/src/parser.ts (+229 -0)
packages/viz/src/sigma.ts (+31 -0)
packages/viz/src/tests/graph.test.ts (+181 -0)

...and 6 more files

📄 Description

  1. adds an interceptor to handle to create a graph of the workflow (using graphology as data structure)
  2. graph can be returned using getGraph on a workflow generated with const workflow = withGraph(createWorkflow());
  3. toSigma converts the graph into a graph that is renderable by https://www.sigmajs.org/
  4. demo/visualization is an example to render a complex workflow (with sendEvent and filter) using sigma.js, result looks like:
image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-ts/pull/67 **Author:** [@marcusschiesser](https://github.com/marcusschiesser) **Created:** 4/22/2025 **Status:** ✅ Merged **Merged:** 8/26/2025 **Merged by:** [@marcusschiesser](https://github.com/marcusschiesser) **Base:** `main` ← **Head:** `ms/add-viz` --- ### 📝 Commits (10+) - [`c9277f1`](https://github.com/run-llama/workflows-ts/commit/c9277f1e195746aa7703ad12429641fe6820d63d) add pre-commit hook - [`c624228`](https://github.com/run-llama/workflows-ts/commit/c624228c3c62abaceb9b2174fbd166fd93007587) programmatically generate dot file - [`d58478e`](https://github.com/run-llama/workflows-ts/commit/d58478e5f8a80537983b87e53264735652ebeed1) generate static graph with graphology - [`68a1801`](https://github.com/run-llama/workflows-ts/commit/68a180139603db0d43dfe6ff55645b60f39309e9) add browser viz using sigma - [`46179ca`](https://github.com/run-llama/workflows-ts/commit/46179cabaed103e8175c208cefb7c841a060630b) fix lint - [`8c64791`](https://github.com/run-llama/workflows-ts/commit/8c6479165f238ca7bc2dc99ca816a229a5c4f327) add send events - [`7b34078`](https://github.com/run-llama/workflows-ts/commit/7b340786e76ac864a831ca2480f747c3afeb810f) add awaited events - [`5f46ed3`](https://github.com/run-llama/workflows-ts/commit/5f46ed330649bf93bc12bdc09000bb7adb1af23e) clean up parser - [`20d14a6`](https://github.com/run-llama/workflows-ts/commit/20d14a68348b5ebf5da3ae8ac271d1e3cf4bcd9f) Merge branch 'main' into ms/add-viz - [`922b47a`](https://github.com/run-llama/workflows-ts/commit/922b47a212ab17ae19f9ac54d535a8b8bda6fb87) Merge branch 'main' into ms/add-viz ### 📊 Changes **26 files changed** (+1605 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/tiny-fishes-grow.md` (+5 -0) ➕ `demo/visualization/.gitignore` (+24 -0) ➕ `demo/visualization/index.html` (+14 -0) ➕ `demo/visualization/package.json` (+28 -0) ➕ `demo/visualization/public/llamaindex.svg` (+18 -0) ➕ `demo/visualization/src/main.ts` (+28 -0) ➕ `demo/visualization/src/style.css` (+9 -0) ➕ `demo/visualization/src/vite-env.d.ts` (+1 -0) ➕ `demo/visualization/src/workflow.ts` (+60 -0) ➕ `demo/visualization/tsconfig.app.json` (+27 -0) ➕ `demo/visualization/tsconfig.json` (+12 -0) ➕ `demo/visualization/tsconfig.node.json` (+25 -0) ➕ `demo/visualization/vite.config.ts` (+7 -0) ➕ `packages/viz/examples/basic.ts` (+72 -0) ➕ `packages/viz/package.json` (+59 -0) ➕ `packages/viz/src/graph.ts` (+70 -0) ➕ `packages/viz/src/index.ts` (+2 -0) ➕ `packages/viz/src/parser.ts` (+229 -0) ➕ `packages/viz/src/sigma.ts` (+31 -0) ➕ `packages/viz/src/tests/graph.test.ts` (+181 -0) _...and 6 more files_ </details> ### 📄 Description 1. adds an interceptor to `handle` to create a graph of the workflow (using `graphology` as data structure) 2. graph can be returned using `getGraph` on a workflow generated with `const workflow = withGraph(createWorkflow());` 3. `toSigma` converts the graph into a graph that is renderable by https://www.sigmajs.org/ 4. `demo/visualization` is an example to render a complex workflow (with `sendEvent` and `filter`) using sigma.js, result looks like: <img width="1109" alt="image" src="https://github.com/user-attachments/assets/4c04b423-8dac-47ed-b811-4368370d7fe3" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 03:16:06 -05:00
yindo closed this issue 2026-02-16 03:16:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-ts#76