Skip to content

feat: add visual builder + workspace mode to Burr UI#687

Open
andreahlert wants to merge 1 commit intoapache:mainfrom
andreahlert:feat/workspace-builder-lowcode
Open

feat: add visual builder + workspace mode to Burr UI#687
andreahlert wants to merge 1 commit intoapache:mainfrom
andreahlert:feat/workspace-builder-lowcode

Conversation

@andreahlert
Copy link
Contributor

@andreahlert andreahlert commented Mar 23, 2026

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
02-builder-with-nodes

Node editor with LLM Call configuration
03-builder-node-editor

Searchable node type picker
04-builder-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.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

  • PR has an informative and human-readable title
  • Changes are limited to a single goal
  • Code passed the pre-commit check
  • New functions are documented
  • Placeholder code is flagged / future TODOs are captured in comments

Adds a low-code visual builder with split-view Monaco editor,
workspace file browsing, and project persistence.

Builder features:
- 9 node types (Action, Input, Result, LLM Call, API Call, Code,
  Streaming, Loop, Router) with specialized property editors
- Inline + buttons on edges for inserting nodes (Activepieces-style)
- Recursive layout algorithm supporting loop arcs and router fan-out
- Monaco Editor with multi-file code generation (actions.py, app.py,
  run.py, requirements.txt)
- Bidirectional sync between graph and code
- Searchable node type picker with categories
- File menu with save/load projects, Ctrl+S support
- Undo/redo (50-state history), copy/paste, delete shortcuts
- Code generation with sanitized identifiers and proper imports

Workspace features:
- Backend router for file browsing, code viewing, script execution
  (SSE streaming), process management, and workspace-project linking
- Builder project persistence in ~/.burr/builder_projects/
- Path traversal protection with workspace validation

New dependencies (all MIT, ASF Category A):
- @monaco-editor/react
- @tanstack/react-query
- @xyflow/react
- react-joyride
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant