Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from "@/pages";
import { AgentDetail } from "@/pages/agents/AgentDetail";
import { QuestionDetail } from "@/pages/questions/QuestionDetail";
import { WorkflowBuilder } from "@/pages/workflows/WorkflowBuilder";
import { WorkflowDetail } from "@/pages/workflows/WorkflowDetail";

function App() {
Expand All @@ -34,7 +35,9 @@ function App() {
<Route path="/questions" element={<QuestionsPage />} />
<Route path="/questions/:id" element={<QuestionDetail />} />
<Route path="/workflows" element={<WorkflowsPage />} />
<Route path="/workflows/builder" element={<WorkflowBuilder />} />
<Route path="/workflows/:id" element={<WorkflowDetail />} />
<Route path="/workflows/:id/edit" element={<WorkflowBuilder />} />
<Route path="/monitoring" element={<MonitoringPage />} />
<Route path="/hooks" element={<HooksPage />} />
<Route path="/settings" element={<SettingsPage />} />
Expand Down
5 changes: 5 additions & 0 deletions ui/src/components/workflows/canvas/WorkflowCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
type OnConnect,
type OnEdgesChange,
type OnNodesChange,
type ReactFlowInstance,
} from "@xyflow/react";

// ---------------------------------------------------------------------------
Expand All @@ -48,6 +49,8 @@ export interface WorkflowCanvasProps {
edgeTypes?: EdgeTypes;
/** Optional CSS class applied to the outer wrapper */
className?: string;
/** Called with the ReactFlowInstance once the canvas is ready */
onInit?: (instance: ReactFlowInstance) => void;
}

// ---------------------------------------------------------------------------
Expand All @@ -63,6 +66,7 @@ function Canvas({
nodeTypes,
edgeTypes,
className = "",
onInit,
}: WorkflowCanvasProps) {
return (
<div
Expand All @@ -77,6 +81,7 @@ function Canvas({
onConnect={onConnect}
nodeTypes={nodeTypes}
edgeTypes={edgeTypes}
onInit={onInit}
fitView
snapToGrid
snapGrid={[16, 16]}
Expand Down
Loading