andreahlert opened a new pull request, #687: URL: https://github.com/apache/burr/pull/687
Building on #667 (Graph Builder by @skrawcz), this adds a workspace mode and significantly enhanced builder that turns Burr's UI into a development environment. ## What's new **Visual Builder (enhanced)** - 9 node types: Action, Input, Result, LLM Call, API Call, Code, Streaming, Loop, Router - Each type has specialized property editors (LLM: provider/model, API: url/method, Code: inline editor, Router: branch conditions) - Inline + button on edges (Activepieces-style) with searchable type picker - Recursive layout algorithm (replaces dagre) supporting loop arcs and router fan-out/fan-in - Node type picker with search bar and categories (I/O, Logic, Integrations) **Monaco Editor (split view)** - Builder canvas on the left, VS Code-style editor on the right - Multi-file code generation: actions.py, app.py, run.py, requirements.txt - File explorer sidebar with tabs (open/close files) - Bidirectional sync: edit code and the graph updates, edit graph and the code updates - Full Ctrl+C/V/Z support in both canvas and editor **Project save/load** - File menu (New, Save, Open, Download .py) - Projects persisted server-side in ~/.burr/builder_projects/ - Ctrl+S to save **Workspace integration** - Backend workspace router with file browsing, code viewing, and script execution (SSE streaming) - Link workspace directories to projects - Path traversal protection with workspace validation **Other improvements** - Undo/redo with 50-state history - Keyboard shortcuts (Delete to remove nodes, Ctrl+C/V to copy/paste nodes) - Code generation includes proper imports, sanitized identifiers, and with_tracker() ## Screenshots **Builder with nodes and generated code**  **Node editor with LLM Call configuration**  **Searchable node type picker**  > Note: screenshot image URLs are placeholders, will update with real uploads. ## Technical details **Backend** (Python) - `burr/tracking/server/workspace.py`: new APIRouter with endpoints for file tree, file content, script execution (SSE), process management, workspace links, and builder project persistence - Modified `run.py` to mount workspace router, `schema.py` to add `supports_workspace` **Frontend** (~6,700 new lines) - `utils/`: builderTypes, codeGenerator (9 node types + multi-file), codeParser (bidirectional sync), flowLayout (recursive layout), treeUtils (immutable tree ops), stateFlow - `hooks/useBuilderState.ts`: tree-based state with undo/redo, keyboard shortcuts, save/load - `builder/`: BuilderView (split layout), BuilderGraph (ReactFlow with custom node/edge types), NodeEditor, NodeTypePicker (portal-based), 4 node components, 5 edge components with inline + buttons - `workspace/`: FileExplorer, CodeViewer, RunTerminal, WorkspaceSelector - `project/`: ProjectWorkspaceView, ActivityBar, SidePanel, TabBar, TrackingSidePanel ## Dependencies added - `@monaco-editor/react` (MIT) - `@tanstack/react-query` (MIT) - `@xyflow/react` (MIT) - `react-joyride` (MIT) All MIT license, ASF Category A compatible. ## How I tested - `npx tsc --noEmit` zero errors - Backend endpoints tested with curl - Manual E2E: create flow, add nodes via toolbar and inline +, edit properties, see code update, save/load projects ## Checklist - [x] PR has an informative and human-readable title - [x] Changes are limited to a single goal - [x] Code passed the pre-commit check - [x] New functions are documented - [x] Placeholder code is flagged / future TODOs are captured in comments -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
