You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Flow provides a reusable interaction model for node-based interfaces, including workflow editors, visual programming environments and interactive diagrams.
Rune already provides much of the necessary infrastructure through Canvas / ZoomPan (#720), El::virtual_items (#997), canvas input handlers and vector shapes.
Would a first-party interactive node graph component fit within Rune Kit's intended scope?
Core capabilities
Arbitrary Rune elements as custom nodes, including interactive controls.
Draggable nodes with stable identities.
Configurable connection handles.
Interactive connection creation, validation and removal.
Custom edge rendering, styles and labels.
Single, multiple and marquee selection.
Application-owned graph state and interaction callbacks.
Efficient viewport culling and partial updates.
Integration with the existing canvas, theming and motion systems.
An initial implementation could focus on nodes, edges, dragging and selection, reusing the existing viewport infrastructure.
Additional functionality such as snapping, minimaps, grouping and automatic layout could follow independently.
no node graph component or earlier request exists in the repo today. most of the core pieces are already on dev: El::virtual_items (#997, crates/rune/src/el/items.rs) for zero-view-run culling, El::live_offset / El::live_scale for camera transforms, Path::cubic_to + Shape::stroke_path (crates/rune-core/src/shape.rs) for bezier edges, and drag/wheel/magnify/key handlers.
one notable mismatch with the existing kit canvas: rune_kit::Canvas / ZoomPan (crates/rune-kit/src/zoom_pan/) models a bounded [w, h] content box with clamped pan and rebuilds via El::scale, whereas an infinite node graph using El::virtual_items needs an unbounded Live-driven camera so panning, zooming and culling stay off the view path.
two product and design questions before building anything:
scope and placement: should a first-party interactive node graph editor live in rune-kit (default or behind an opt-in cargo feature like markdown / mermaid in crates/rune-kit/Cargo.toml), or in a separate companion crate beside rune-mermaid?
camera and state api: should it introduce an unbounded Live-backed camera (or add an unbounded mode to ZoomPan) paired with El::virtual_items, and should graph mutations follow react flow's change-event callbacks (on_nodes_change / on_edges_change / on_connect) or rune-kit's lens-based state pattern (TableState / TreeModel) for an initial slice (nodes, handles, edges, drag, selection, connection creation)?
Scope and placement: I think there is a useful distinction between a general-purpose interactive canvas and a node graph editor.
Positioning arbitrary elements, dragging, selection, coordinate transformations and efficient viewport culling are useful for whiteboards, design tools, diagram editors and many other applications, independently of node graphs.
Ideally, these capabilities would be available as general-purpose canvas primitives in Rune or Rune Kit, with graph-specific functionality such as connection handles and edges implemented as a higher-level component. An optional Cargo feature for the graph component makes sense.
Camera: An unbounded Live-backed camera paired with El::virtual_items sounds like the right approach. Panning, zooming, dragging and viewport culling should remain independent of full view rebuilds where possible. Whether this extends ZoomPan or introduces a separate camera abstraction is less important than preserving those properties.
State API: I'd prefer React Flow-style typed change events and callbacks, with application-owned graph state. A lens-based convenience API could coexist with this if appropriate.
It would also be useful to distinguish interaction lifecycle events (begin, update, commit, cancel). For example, dragging multiple nodes should provide continuous visual feedback but be representable as a single undoable operation.
Stable node and edge identifiers, programmatic graph manipulation, and the ability to capture and restore viewport state would make undo/redo, persistence and collaborative editing easier without requiring the framework to implement those application-specific systems itself.
The proposed initial scope of nodes, handles, edges, dragging, selection and connection creation sounds good. The main consideration is ensuring that the underlying canvas abstractions remain reusable outside node graphs.
that split makes sense: reusable unbounded canvas primitives (camera, coordinate transforms, viewport culling, dragging, selection, viewport snapshot/restore) underneath an optional feature-gated node graph layer with typed change events and begin / update / commit / cancel interaction phases.
one technical detail from the code on avoiding full view rebuilds during interaction: El::live_offset, El::live_scale and El::live_rect with Tx::live_only() already keep camera moves, per-node drags and marquee boxes off view, and El::virtual_items handles culling on the remount path. Shape has no Live binding today (only El::live_trim on stroke span), so updating edges attached to a dragged node mid-drag would either swap only the affected edge keys inside El::virtual_items (still without rebuilding view) or need a live-shape primitive in rune.
leaving this under needs-design for a maintainer call on scope and crate placement.
Activity
opencodejr commentedon Nov 27, 2026
no node graph component or earlier request exists in the repo today. most of the core pieces are already on
dev:El::virtual_items(#997,crates/rune/src/el/items.rs) for zero-view-run culling,El::live_offset/El::live_scalefor camera transforms,Path::cubic_to+Shape::stroke_path(crates/rune-core/src/shape.rs) for bezier edges, and drag/wheel/magnify/key handlers.one notable mismatch with the existing kit canvas:
rune_kit::Canvas/ZoomPan(crates/rune-kit/src/zoom_pan/) models a bounded[w, h]content box with clamped pan and rebuilds viaEl::scale, whereas an infinite node graph usingEl::virtual_itemsneeds an unboundedLive-driven camera so panning, zooming and culling stay off theviewpath.two product and design questions before building anything:
rune-kit(default or behind an opt-in cargo feature likemarkdown/mermaidincrates/rune-kit/Cargo.toml), or in a separate companion crate besiderune-mermaid?Live-backed camera (or add an unbounded mode toZoomPan) paired withEl::virtual_items, and should graph mutations follow react flow's change-event callbacks (on_nodes_change/on_edges_change/on_connect) orrune-kit's lens-based state pattern (TableState/TreeModel) for an initial slice (nodes, handles, edges, drag, selection, connection creation)?Vricken commentedon Nov 27, 2026
Positioning arbitrary elements, dragging, selection, coordinate transformations and efficient viewport culling are useful for whiteboards, design tools, diagram editors and many other applications, independently of node graphs.
Ideally, these capabilities would be available as general-purpose canvas primitives in Rune or Rune Kit, with graph-specific functionality such as connection handles and edges implemented as a higher-level component. An optional Cargo feature for the graph component makes sense.
Camera: An unbounded
Live-backed camera paired withEl::virtual_itemssounds like the right approach. Panning, zooming, dragging and viewport culling should remain independent of full view rebuilds where possible. Whether this extendsZoomPanor introduces a separate camera abstraction is less important than preserving those properties.State API: I'd prefer React Flow-style typed change events and callbacks, with application-owned graph state. A lens-based convenience API could coexist with this if appropriate.
It would also be useful to distinguish interaction lifecycle events (begin, update, commit, cancel). For example, dragging multiple nodes should provide continuous visual feedback but be representable as a single undoable operation.
Stable node and edge identifiers, programmatic graph manipulation, and the ability to capture and restore viewport state would make undo/redo, persistence and collaborative editing easier without requiring the framework to implement those application-specific systems itself.
The proposed initial scope of nodes, handles, edges, dragging, selection and connection creation sounds good. The main consideration is ensuring that the underlying canvas abstractions remain reusable outside node graphs.
opencodejr commentedon Nov 27, 2026
that split makes sense: reusable unbounded canvas primitives (camera, coordinate transforms, viewport culling, dragging, selection, viewport snapshot/restore) underneath an optional feature-gated node graph layer with typed change events and
begin/update/commit/cancelinteraction phases.one technical detail from the code on avoiding full view rebuilds during interaction:
El::live_offset,El::live_scaleandEl::live_rectwithTx::live_only()already keep camera moves, per-node drags and marquee boxes offview, andEl::virtual_itemshandles culling on the remount path.Shapehas noLivebinding today (onlyEl::live_trimon stroke span), so updating edges attached to a dragged node mid-drag would either swap only the affected edge keys insideEl::virtual_items(still without rebuildingview) or need a live-shape primitive inrune.leaving this under
needs-designfor a maintainer call on scope and crate placement.