Skip to content

Orchestrator

One-Liner

The Orchestrator is a visual workflow template editor with React Flow, featuring drag-drop node palette, property panel, and template library for designing automation flows.


Pain Points Solved

Pain PointCurrent StateOrchestrator Solution
No visual workflow designManual configuration file editingDrag-and-drop canvas interface
Hard to understand flowsText-based configurationVisual node graphs with connections
No template reuseRecreate flows from scratchTemplate library for quick start
Complex node configurationRemember all optionsContextual property panel
Accidental edits during executionCan modify while runningCanvas lock during execution

Page Overview

Location: ccw/frontend/src/pages/orchestrator/OrchestratorPage.tsx

Purpose: Visual workflow template editor for creating, editing, and managing automation flows.

Access: Navigation → Orchestrator

Layout

+--------------------------------------------------------------------------+
|  Flow Toolbar (save, load, template library, execution controls)             |
+--------------------------------------------------------------------------+
|  +-------+------------------------------------------------------+-------+  |
|  | Node  |  Flow Canvas (React Flow)                     | Prop  |  |
|  | Palet |  +----+    +----+    +----+                     | Panel |  |
|  | (coll)|  | N1 | -->| N2 | -->| N3 |                     | (cond)|  |
|  |       |  +----+    +----+    +----+                     |       |  |
|  |       |                                                |       |  |
|  +-------+------------------------------------------------------+-------+  |
+--------------------------------------------------------------------------+

Core Features

FeatureDescription
Node Palette (Left Sidebar)Collapsible panel with categorized nodes (templates, nodes tabs)
Flow Canvas (Center)ReactFlow graph with zoom/pan, minimap, controls, grid background
Property Panel (Right Overlay)Contextual property editor that appears when node is selected
Template LibraryDialog for browsing and loading saved templates
Drag-and-DropDrag nodes from palette to canvas to add them
Connection HandlesConnect nodes by dragging from output to input handles
Interaction ModesToggle between pan and selection modes (Ctrl to temporarily reverse)
Execution LockCanvas is read-only during flow execution
Layout PersistenceSidebar width persists in local storage
Snap to GridNodes align to 15px grid for neat layouts

Usage Guide

Basic Workflow

  1. Open Orchestrator: Navigate to Orchestrator page (flows auto-load)
  2. Add Nodes: Drag nodes from palette OR double-click palette items
  3. Connect Nodes: Drag from output handle to input handle
  4. Configure Nodes: Click node to open property panel, edit properties
  5. Save Flow: Click save button in toolbar
  6. Use Templates: Open template library to browse/load templates

Key Interactions

InteractionHow to Use
Add node (drag)Drag node from palette to canvas
Add node (double-click)Double-click palette item
Connect nodesDrag from source output handle to target input handle
Select nodeClick node (opens property panel)
DeselectClick canvas background
Move nodeDrag node (when not executing)
Delete node/edgeSelect and press Backspace/Delete (when not executing)
Zoom in/outUse zoom controls or mouse wheel
Fit viewClick fit view button
Pan canvasDrag canvas (pan mode) or use middle mouse button
Toggle interaction modeClick mode toggle button or hold Ctrl (temporarily reverse)
Collapse paletteClick collapse button (or click expand button when collapsed)
Open template libraryClick template library button in toolbar

Node Categories

The node palette organizes nodes into categories:

  • Prompt Templates - Pre-built prompt templates with variables
  • Commands - Slash command invocations
  • Tools - External tool integrations
  • Custom - User-defined nodes

Canvas Controls

ControlLocationFunction
Zoom In/OutControls (bottom-right)Zoom canvas in/out
Fit ViewControls (bottom-right)Fit all nodes in view
Interactive ModeControls (bottom-right)Toggle pan/selection mode
Mini MapBottom-rightOverview of entire flow
Grid BackgroundCanvasVisual reference for alignment

Property Panel

The property panel appears as an overlay when a node is selected. It provides:

Common Properties

PropertyDescription
Node NameDisplay name for the node
Node IDUnique identifier (auto-generated)
Execution ModeHow node executes (sync/async/etc.)
InstructionsPrompt instructions with template support
VariablesInput/output variable definitions
TagsCustom tags for organization
CommandsAssociated slash commands

Template Editor Features

  • Built-in Templates: Pre-defined instruction templates
  • Custom Tags: Tag-based instruction system (e.g., )
  • Variable Inputs: Template variables with custom values
  • Preview: Live preview of rendered instructions

Components Reference

Main Components

ComponentLocationPurpose
OrchestratorPage@/pages/orchestrator/OrchestratorPage.tsxMain orchestrator page
FlowToolbar@/pages/orchestrator/FlowToolbar.tsxTop toolbar with actions
LeftSidebar@/pages/orchestrator/LeftSidebar.tsxCollapsible node palette
FlowCanvas@/pages/orchestrator/FlowCanvas.tsxReactFlow graph canvas
PropertyPanel@/pages/orchestrator/PropertyPanel.tsxNode property editor overlay
TemplateLibrary@/pages/orchestrator/TemplateLibrary.tsxTemplate browser dialog
NodeLibrary@/pages/orchestrator/NodeLibrary.tsxNode palette content
InlineTemplatePanel@/pages/orchestrator/InlineTemplatePanel.tsxTemplate palette content
InteractionModeToggle@/pages/orchestrator/InteractionModeToggle.tsxPan/selection mode toggle

Node Types

Node TypePurpose
PromptTemplateNodeUnified prompt template node with instructions
Custom nodesExtended from base node types

State Management

  • Local state (OrchestratorPage):

    • isTemplateLibraryOpen: boolean
  • Zustand stores (useFlowStore):

    • nodes - Flow nodes array
    • edges - Flow edges array
    • selectedNodeId - Currently selected node
    • isPaletteOpen - Palette expanded state
    • isPropertyPanelOpen - Property panel visibility
    • leftPanelTab - Active palette tab ('templates' | 'nodes')
    • interactionMode - Pan or selection mode
  • Execution store (useExecutionStore):

    • isExecuting - Whether flow is currently executing (locks canvas)

Configuration

Keyboard Shortcuts

KeyAction
Backspace/DeleteDelete selected node/edge (when not executing)
Ctrl/Cmd (hold)Temporarily reverse interaction mode
Mouse wheelZoom in/out
Middle mouse dragPan canvas

Canvas Settings

typescript
{
  snapToGrid: true,
  snapGrid: [15, 15],  // 15px grid alignment
  nodesDraggable: !isExecuting,
  nodesConnectable: !isExecuting,
  elementsSelectable: !isExecuting
}

Released under the MIT License.