-
Notifications
You must be signed in to change notification settings - Fork 0
Install React Flow and scaffold WorkflowCanvas base component #1095
Copy link
Copy link
Closed
Labels
complexity:mediumMedium scope: <200 lines, 1-2 filesMedium scope: <200 lines, 1-2 filesenhancementNew feature or requestNew feature or requestfrontendFrontend application codeFrontend application codetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementationuiUser interface and frontendUser interface and frontend
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
complexity:mediumMedium scope: <200 lines, 1-2 filesMedium scope: <200 lines, 1-2 filesenhancementNew feature or requestNew feature or requestfrontendFrontend application codeFrontend application codetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementationuiUser interface and frontendUser interface and frontend
Summary
Add
@xyflow/react(React Flow v12) as a dependency and create the foundationalWorkflowCanvascomponent that all subsequent workflow builder features will build upon.Context
The agentd UI currently uses form-based CRUD for workflow management. This issue introduces the base canvas infrastructure for a visual workflow builder. React Flow is a mature, MIT-licensed library for building node-based editors and is the standard choice for workflow visualization in React applications.
Implementation Details
1. Install dependency
React Flow v12 (
@xyflow/react) ships its own TypeScript types and CSS.2. Create base canvas component
Create
ui/src/components/workflows/canvas/WorkflowCanvas.tsx:<ReactFlow>instance with:<Controls />- zoom in/out, fit view<MiniMap />- overview navigation<Background variant="dots" />- visual gridnodes,edges,onNodesChange,onEdgesChange,onConnectprops@xyflow/react/dist/style.css)<ReactFlowProvider>at the appropriate level--th-*CSS custom propertiesfitView,snapToGrid,snapGrid={[16, 16]}3. Create barrel exports
ui/src/components/workflows/canvas/index.ts- exportWorkflowCanvasui/src/components/workflows/index.tsto re-export canvas module4. Add basic test
ui/src/components/workflows/canvas/WorkflowCanvas.test.tsxFiles to Create/Modify
ui/package.json- add@xyflow/reactdependencyui/src/components/workflows/canvas/WorkflowCanvas.tsx- new componentui/src/components/workflows/canvas/index.ts- barrel exportui/src/components/workflows/index.ts- update exportsui/src/components/workflows/canvas/WorkflowCanvas.test.tsx- testsAcceptance Criteria
@xyflow/reactinstalled and importableWorkflowCanvasrenders a React Flow canvas with controls, minimap, and background--th-*variables)snapToGridenabled with 16px gridStack Base
feature/autonomous-pipeline