feat: add visual builder + workspace mode to Burr UI
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
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.pyto mount workspace router,schema.pyto addsupports_workspace
Frontend (~6,700 new lines)
utils/: builderTypes, codeGenerator (9 node types + multi-file), codeParser (bidirectional sync), flowLayout (recursive layout), treeUtils (immutable tree ops), stateFlowhooks/useBuilderState.ts: tree-based state with undo/redo, keyboard shortcuts, save/loadbuilder/: BuilderView (split layout), BuilderGraph (ReactFlow with custom node/edge types), NodeEditor, NodeTypePicker (portal-based), 4 node components, 5 edge components with inline + buttonsworkspace/: FileExplorer, CodeViewer, RunTerminal, WorkspaceSelectorproject/: 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 --noEmitzero 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
@andreahlert I can't get this to run locally -- did you commit everything? otherwise see the CI failures.
Also need some example to load to help someone get started.
Thanks for reviewing. Didn't have the time to check it properly, I'll do it as soon as possible. Target: 03-30-2026
Thanks for trying it out. Two things:
-
Missing pieces: This PR is meant to be applied on top of #667 (your graph builder). On main alone, the builder route works but some of the other UI improvements (HomeView, SearchView, etc.) won't be there. The builder itself at
/buildershould load fine since all its deps are self-contained. I'll add a note about this in the PR description. -
Example graphs: Good call. I'll add a few pre-loaded examples (chatbot flow, data pipeline, agent with tools) that load from the File > Open menu so someone can see the builder in action without building from scratch.
Working on both now.
validated things load locally at least.
All review feedback addressed. Rebased clean on main, no conflicts.
@JiwaniZakir your three points: cleanup_processes() is wrapped in try/finally now so backend shutdown always runs, supports_workspace is derived from workspace.is_available() instead of hardcoded, and _read_links() has an in-process cache with invalidation on write.
@skrawcz docstrings on every function/class in workspace.py, including the inner ones. Examples were already in from the graph-builder merge.
@elijahbenizzy opened #735 to track the node type implementations as a follow-up. Agreed it's fine for the initial merge.
Ready for re-review whenever you get a chance.
This PR has been inactive for 17 days after receiving review feedback. Converting to draft.
Please mark it as ready for review when you have addressed the comments. If no activity occurs within 90 days, it will be closed automatically.