Skip to content

feat(ai-editor): graph-scoped subgraph nodes + explorer DnD + export pruning - #12

Merged
TheCrabe merged 3 commits into
mainfrom
feat/explorer-reorder
May 5, 2026
Merged

feat(ai-editor): graph-scoped subgraph nodes + explorer DnD + export pruning#12
TheCrabe merged 3 commits into
mainfrom
feat/explorer-reorder

Conversation

@TheCrabe

@TheCrabe TheCrabe commented May 3, 2026

Copy link
Copy Markdown
Member

Stack

main
└── this PR — graph-scoped subgraph nodes + explorer DnD + export pruning
    └── #13 feat(ai-editor): polymorphic enum slot + closed-choice combo widgets

Parallel (independent): #10 ll-app-initializer.

Changes

  • Graph-scoped entry/exit nodes with signature-driven slot sync
  • Drag-and-drop reordering of explorer entries
  • Export-time canonicalization and pruning of invalid graph data

TheCrabe added 3 commits May 3, 2026 00:57
…t sync

The entry node inside a subgraph now exposes the signature's value_inputs
as value_outputs, and the symmetric exit node receives flow_outputs and
value_outputs as inputs. Both are registered per-graph under stable type
names (graph:entry, graph:exit) matching the runtime in evo-hl-library
feat/subgraphes.

Editing a graph signature applies a slot diff in place: added/removed
slots are reflected on the entry/exit nodes and (on next reopen) on
every AISubGraphNode consumer in other graphs. Renaming/type-change
loses links (no stable id v1).

export_omnissiah now produces the {value_inputs, value_outputs,
flow_outputs, nodes} shape consumed by GraphLoader.partially_load_graph.
…t fixes

Explorer DnD:
- Native HTML5 drag-and-drop on entries with a custom MIME
  (application/x-explorer-entry) so stray drags from outside the app
  don't get interpreted as reorder.
- New graph_reordered_event on Project; explorer subscribes and
  rerenders entries in the new order.
- reorder_subgraph_types on AINodeTypes: replaces the subgraph slice
  while preserving atomic node types from node_types.json5.
- Numeric slot connections accepted across float/int variants
  (NUMERIC_SLOT_TYPES override of LiteGraph.isValidConnection).
- Hide widgets on inputs that get connected
  (AIGraphNode.onConnectionsChange).
- Apply signature to entry/exit nodes when refreshing subgraph nodes.

Export fixes (orthogonal but shipping in the same commit):
- Don't recurse signature on re-export of a closed graph: omnissiah_data
  is already the full {value_inputs, value_outputs, flow_outputs, nodes}
  blob, only the .nodes map belongs in the new export's nodes.
- Map subgraph/<name> to graph:call:<name> at export time. The editor
  uses subgraph/ as a menu category; the lib registers call nodes as
  graph:call:<name>. AISubGraphNode.export() does the translation so
  the in-editor type stays for menu grouping.
…raph data

Editor data drifts away from the lib-canonical export shape over the
course of normal editing: deleted nodes leave dangling links, wired
inputs leave widget values null, slot replugs leave flow↔value
mismatches, and the in-editor 'subgraph/<name>' / ':in' conventions
diverge from the lib's 'graph:call:<name>' / ':flow'. Exporting any
of these tripped the omnissiah-side ConfigValidationError.

Add a single export-time pass that:
- maps subgraph/<name> → graph:call:<name> on both opened and unopened
  graphs (canonicalize the omnissiah_data re-export path symmetrically),
- remaps subgraph flow input 'in' → 'flow' on links,
- omits null/undefined value inputs so the lib falls back to type defaults,
- drops links pointing to non-existent nodes (with console.warn),
- drops cross-type slot links (flow→value or vice-versa), with the
  validation living in prune_invalid_node_data so opened and unopened
  graphs are checked uniformly via a slot-type resolver that knows static
  node types, graph signatures, and graph:call: subgraph signatures.
@TheCrabe
TheCrabe force-pushed the feat/explorer-reorder branch from 598dcb9 to 832d059 Compare May 3, 2026 15:14
@TheCrabe
TheCrabe requested a review from kolte200 May 4, 2026 22:20
@TheCrabe
TheCrabe marked this pull request as ready for review May 4, 2026 22:20
@TheCrabe
TheCrabe merged commit 172ae1b into main May 5, 2026
@TheCrabe
TheCrabe deleted the feat/explorer-reorder branch May 5, 2026 17:32
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.

2 participants