Skip to content

UI node reference outputs, resize nodes, and details-view refactor #898#975

Merged
erasta merged 12 commits into
masterfrom
ui-node-autocomp
Jul 5, 2026
Merged

UI node reference outputs, resize nodes, and details-view refactor #898#975
erasta merged 12 commits into
masterfrom
ui-node-autocomp

Conversation

@erasta

@erasta erasta commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Adds a few workflow-graph editing features and refactors the details view they build on.
#898

Features

  • Reference another node's output — right-click an input param → "Reference
    output param" opens cascading submenus (pick a node, then its output). The
    chosen {node.parameters.output} token is inserted at the caret in the
    field, and a dataflow line is drawn automatically.
  • Drag-resizable nodes — select a node and drag its edges/corners (min
    260×80). Size is view-only (not saved with the workflow) and survives graph
    edits.
  • NodeCatalogStore — node catalog now loads once into a shared store
    instead of per-editor.

erasta added 12 commits July 5, 2026 13:07
  Break the branch actions, delete button, and empty-branch placeholder out
  of DetailsViewItem so they can be reused by a future workflow-node variant
  and to slim down the parent.

  - DetailsViewItemBranchActions: add-item / add-sub-structure / edit-as-JSON
    cluster, owns the addSubItem logic
  - DeleteFieldButton: delete control, owns the setItemKey guard so callers
    render it unconditionally
  - EmptyBranchLabel: the "(empty)" placeholder with its indent math

  No behavior change.
  Replace the repeated `{menu?.kind === … && <MenuItem>}` blocks with an
  `actionsFor(menu, handlers)` helper that returns the list of actions for a
  target, and a single render loop that maps them to MenuItems.

  - MenuAction ({ label, run, danger? }) describes one entry; `danger` drives
    the red colour.
  - Adding/reordering items is now one line in actionsFor, with no duplicated
    label/onClick/onClose wiring.
  - The switch is exhaustive over the kind enum, so a new target kind is a
    compile error until handled.

  No behavior change.
…menu

  Right-click a node input param → fly-out node autocomplete → fly-out output
  autocomplete; choosing an output calls onReferenceOutput and closes the
  cascade. Adds NodeOutputOption + referenceOptions/onReferenceOutput props
  and a test for the flow.
  Capture the right-click caret on an input param and thread it through the
  context menu; choosing a node output now splices {node.parameters.output}
  into the value at that caret (via new insertReferenceAt) rather than
  overwriting the whole field. Falls back to end-of-value when the click
  wasn't inside the input.
@erasta erasta merged commit 670c440 into master Jul 5, 2026
1 check passed
@erasta erasta deleted the ui-node-autocomp branch July 5, 2026 17:42
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.

1 participant