From bd7a315c2c38ea805ddfee189f5a147cc3d08060 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Fri, 13 Mar 2026 15:01:47 +0300 Subject: [PATCH] Add visual graph editor for entity interconnections SVG-based node graph with ELK.js autolayout showing all 13 entity types and their relationships. Features include: - Pan/zoom canvas with bounds clamping and dead-zone click detection - Interactive minimap with viewport rectangle, click-to-pan, drag-to-move, and dual resize handles (bottom-left/bottom-right) - Movable toolbar with drag handle and inline zoom percentage indicator - Entity-type SVG icons from Lucide icon set with subtype-specific overrides - Command palette search (/) with keyboard navigation and fly-to - Node selection with upstream/downstream chain highlighting - Double-click to zoom-to-card, edit/delete overlay on hover - Legend panel, orphan node detection, running state indicators - Full i18n support with languageChanged re-render - Catmull-Rom-to-cubic bezier edge routing for smooth curves Co-Authored-By: Claude Opus 4.6 --- contexts/frontend.md | 12 + .../static/css/graph-editor.css | 606 ++++++++++++++++ server/src/wled_controller/static/js/app.js | 20 +- .../static/js/core/graph-canvas.js | 233 +++++++ .../static/js/core/graph-edges.js | 169 +++++ .../static/js/core/graph-layout.js | 320 +++++++++ .../static/js/core/graph-nodes.js | 255 +++++++ .../static/js/core/tab-indicator.js | 1 + .../static/js/features/graph-editor.js | 656 ++++++++++++++++++ .../static/js/features/tabs.js | 2 + .../wled_controller/static/locales/en.json | 13 +- .../wled_controller/static/locales/ru.json | 13 +- .../wled_controller/static/locales/zh.json | 13 +- .../src/wled_controller/templates/index.html | 11 + 14 files changed, 2320 insertions(+), 4 deletions(-) create mode 100644 server/src/wled_controller/static/css/graph-editor.css create mode 100644 server/src/wled_controller/static/js/core/graph-canvas.js create mode 100644 server/src/wled_controller/static/js/core/graph-edges.js create mode 100644 server/src/wled_controller/static/js/core/graph-layout.js create mode 100644 server/src/wled_controller/static/js/core/graph-nodes.js create mode 100644 server/src/wled_controller/static/js/features/graph-editor.js diff --git a/contexts/frontend.md b/contexts/frontend.md index 11eadf1..e79b54e 100644 --- a/contexts/frontend.md +++ b/contexts/frontend.md @@ -144,3 +144,15 @@ When adding **new tabs, sections, or major UI elements**, update the correspondi - In inline ` + @@ -51,6 +53,7 @@ +
API @@ -139,6 +142,12 @@
+
+
+
+
+
+