Architecture, libraries & engineering
How Setta
worked.
React was a common thread. Almost everything around it changed: Python introspection, web and desktop services, live programs, agent runtimes and a reusable browser library.
Follow the problems behind those changes—and the smaller libraries that made everyday interactions possible.
2020–2021 · Generated forms
Describe Python before running it.
The first boundary was between a Python object and a browser form. A training configuration could contain a model, an optimizer, a dataset and transforms—each with its own constructor and defaults.
A description is different from an instance
Python’s inspect machinery exposed arguments,
defaults and annotations. ClassInfo added UI-type
selection and selective exposure, then serialized the description
as JSON. React could render the controls without constructing the
model represented by those controls. The early environment already
included PyTorch, torchvision and CUDA; the interface machinery
addressed the configuration around that computation.
The frontend was JavaScript and React, built with Create React App. Chakra UI and Emotion supplied presentation, Easy Peasy supplied state, and Monaco supplied an early developer editor. This was a composition of an object model and existing interface tools, not a new programming language.
Source: Python metadata · Python environment · Frontend manifest
Web services and local execution were separate
Django, Django REST Framework, Knox and SQLite supplied the early web backend. A 2021 Graphene-Django branch explored GraphQL. Meanwhile, Electron bridged the frontend to a local machine: January 2021 code wrote generated Python to a file and launched a process. The separate desktop package used node-pty and electron-builder.
Generating configuration, serving a web API and executing Python were different responsibilities from the beginning. The Electron bridge established local execution; the existence of the GraphQL experiment does not make GraphQL the backend of every later version.
Source: Django configuration · GraphQL experiment · Execution bridge · Desktop dependencies
2022–2023, with later changes
Make a workspace behave like one object.
A canvas full of editable panels has more than one coordinate system and more than one kind of state. Resizing, packing, dragging and undo all have to agree about the same sections.
Resize at the scale the user sees
React Flow supplied the pan-and-zoom canvas. dnd-kit handled
composition and reordering within it. re-resizable supplied
resizing for panes and sections, but a canvas needed an adapter:
screen-space pointer movement must become the right canvas-space
size. The current ResizableWithScale captures React
Flow’s zoom at the start of the gesture and passes it to
re-resizable as scale.
The same issue reached into terminals. A January 2024 xterm.js fork changed mouse-coordinate calculation to account for canvas scale. A terminal could look correctly zoomed while still selecting or pointing at the wrong character unless its input math used that scale too. The retained xyflow work likewise involved d3-zoom, d3-drag, d3-selection and d3-interpolate.
Source: Canvas dependencies · Scale-aware resize adapter · Terminal coordinate fix
Pack rectangles without pretending they are a dependency graph
potpack entered in February 2023. Setta read measured node dimensions, added a 50-pixel margin, packed the rectangles and applied their new coordinates relative to the canvas’s existing minimum position. This arranged panels by their sizes; it did not infer an execution order or understand the meaning of an edge.
In December 2025, layout moved to the Python backend through
rectangle-packer, imported as rpack. That
implementation validated and rounded padded dimensions, converted
lower-left coordinates to the canvas’s top-left coordinates, and
preserved the arrangement’s offset. The current library instead
has its own planner, including locked sections as fixed obstacles.
potpack is part of the history, not a current runtime dependency.
Source: potpack integration · Python packing and coordinate conversion · Current planner
Undo one operation across several stores
Zustand and Immer supported the frontend’s state model. zundo arrived in April 2023 as temporal middleware, but independently rewinding several stores would leave a broken project: a restored section could disagree with its parameters or layout. Setta coordinated histories using a shared version, briefly resumed recording around a change, and paused it again. Undo and redo used that version to restore related stores together.
zundo was removed in August 2025 as state ownership changed. The current package has an opt-in bounded structural history, with completed gestures forming entries and a choice of local or host-delegated authority. These are successive designs; the current undo stack is not zundo with a new name.
Source: zundo introduction · Coordinated undo implementation · zundo removal · Current structural history
The surrounding frontend changed in stages
Vite began replacing Create React App in October 2022. Radix UI and Tailwind changed the presentation layer, Zustand replaced Easy Peasy, and TypeScript grew alongside JavaScript and JSX. Downshift, match-sorter and Lodash supported selection, searching and data manipulation. These smaller libraries mattered to everyday editing as much as the canvas renderer did.
Source: Vite migration · Radix migration · Zustand migration · Early 2023 manifest
2022–2025 · Local development
Bring the programming environment behind the canvas.
The browser was only one part of the workbench. Python programs, terminals, language analysis, persistent project state and file watching needed services with lifetimes beyond a React render.
Several servers, then a local Python application
The 2022–2023 archive contains NestJS, AdonisJS, MikroORM/PostgreSQL, a brief Koa experiment, then an Express/Prisma/Passport line. These were distinct checkpoints and experiments, not one universally deployed stack. The retained split backend selected SQLite; its Python CLI used Click, requests, keyring and websockets, with Jedi and mypy for code analysis.
The October 2023 consolidation brought the frontend and a FastAPI/Uvicorn runtime into the local workbench. Python handled project state, generated programs and local execution. By 2025, SQLAlchemy backed the local SQLite database, Pydantic described structured data, and WebSockets connected longer-lived activity to the browser.
Source: NestJS · AdonisJS · Koa · Express backend · Database selection · Python CLI · Local consolidation · Python dependencies
An editor is not its language server—or its terminal
CodeMirror 6 arrived in January 2024 and later served source editors, expressions and text surfaces. Lezer supplied parsing/highlighting components. Completion and diagnostics involved a separately managed language-server process: basedpyright, lsprotocol, file synchronization and response handling. Ruff, docstring_parser and docstring-to-markdown served formatting and documentation tasks.
xterm.js presented a terminal in the browser. On the other side, the Python backend selected a shell, spawned an operating-system PTY, retained bounded output history and sent output to WebSocket clients. ptyprocess handled Unix and pywinpty handled Windows, with psutil supplying process information. The terminal renderer did not itself execute Python.
Source: CodeMirror introduction · Language-server management · PTY and WebSocket implementation · Supporting Python packages
Generate code with identity and scope
Nested callable sections and references became a dependency problem. The 2025 generator walked dependencies before their consumers and mapped generated source positions back to section and parameter identities. Its AST visitor distinguished workspace references from local Python names, including function and comprehension scope. A text replacement alone could not make that distinction.
This connected visual configuration to editor assistance and authored code around generated blocks. The generator recorded cycles in this checkpoint; that should not be confused with the later browser graph executor’s explicit cycle rejection.
Source: Dependency traversal · Generated source mapping · Python AST scope analysis
2024–2026 · Live computation
Keep the process alive while its inputs change.
Loading a model, reacting to a slider and editing the callback are three different operations. The live Python APIs progressively separated their lifetimes.
Subscribe to the inputs that matter
SettaListener used asyncio and WebSockets to receive workspace changes, select affected callbacks and emit artifacts. It supported dependency selection and debounce/throttle behavior, including leading and trailing edges. Scheduling had to account for callbacks already running and pending work made obsolete by newer input.
This made an image, chart or chat response more than a static output at the end of a script. A long-lived process could hold expensive resources while smaller callbacks responded to relevant changes. The earlier interactive-function proof of concept and the later listener API were related milestones, not identical implementations.
Replace callbacks without rebuilding the model
The hot-reload design put resource construction outside a named callback-builder function. watchfiles observed edits; the loader rebuilt callbacks under a lock, kept the WebSocket session and replayed the latest project snapshot. If rebuilding failed, it restored the earlier callbacks and scheduler state.
The intended distinction was concrete: change how existing inputs produce an output while preserving the running program’s resources. Watch Code served a different purpose—it discovered Python definitions and synchronized their visual representation. Seeing a card appear after saving a file demonstrates Watch Code, not callback hot reload.
Source: Callback replacement and recovery · Resource-lifetime contract · Callable discovery
The computation came from the application
StreamDiffusion supplied drawing-to-image inference; Diffusers and Transformers supplied FLUX inpainting. TRL, Datasets, Transformers and Evaluate supported language-model and classification examples. PyTorch Metric Learning, torchvision, record-keeper and TensorBoard supported metric-learning experiments. SapientML powered the AutoML example; the Groq SDK powered a Python chat example.
These integrations made the workspace useful in different domains. Their models, GPU requirements and service credentials belonged to those applications. Setta supplied controls, composition and communication with the running program; it did not implement those learning algorithms.
Source: StreamDiffusion · FLUX requirements · Finetuning · Classification · Metric learning · SapientML · Groq chat
2025–May 2026 · The project workbench
Give tools a shared model of the project.
As assistant tools and direct manipulation operated on the same canvas, section identities, access rules and execution state became part of the interface’s architecture.
Three kinds of edge, three different meanings
Python dependency edges described values and generated code. Agent access edges described which sections a conversation could read or write. Workflow edges described dispatch after completion, failure or signals, with AND/OR/XOR gates, activation counts and limits. A similar-looking line did not imply the same semantics.
MCP exposed project operations as tools. The workbench presented arguments, partial progress and results alongside conversation history. A less visible dependency, bm25s, indexed and searched tool descriptions. Gonja rendered prompt templates in the Go workbench. Tool discovery, prompt rendering and model inference were separate jobs.
Source: Agent access semantics · Workflow validation and dispatch · Lexical tool search · Prompt templates
Move the server to Go without moving Python programs to Go
The March 2026 migration changed server responsibilities. By May, chi and Huma supplied HTTP/API structure, coder/websocket and PTY packages handled live connections and processes, and Tree-sitter handled Python expression references and callable discovery. OpenAI, Anthropic, Google GenAI and MCP SDKs supplied provider and tool integrations.
Python remained part of user computation, SDKs and plugins or sidecars. The May Python manifest was much smaller than the 2025 workbench’s, with claude-agent-sdk and Ruff among its direct runtime dependencies. This was a division of responsibilities, not evidence that all user computations were rewritten or that a particular speedup occurred.
Source: Go migration · Go dependencies · Python boundary · Tree-sitter callable analysis
Hosted projects were a separate companion
setta-saas combined a React/Vite frontend and Clerk identity integration with FastAPI, SQLAlchemy, PostgreSQL/psycopg2, httpx and JWT tooling. Deployment work targeted Fly.io Machines. It coexisted with the local application; its service dependencies were not requirements of every local project or of the eventual browser library.
Source: Hosted frontend · Hosted backend · Deployment implementation
Summer 2026 · Separate experiments
Organize agent work and its evidence.
Setta 3 and Setta 4 explored different interfaces alongside the Setta 2 line. The reusable library later came from Setta 2, not from a linear succession through all three experiments.
Setta 3: long conversations, a spatial graph and durable records
The desktop shell combined React, Electron, electron-vite, Tailwind and Zustand. PixiJS and pixi-viewport rendered the research graph; react-virtuoso handled long scrolling content, highlight.js presented syntax, and xterm.js presented terminals.
The Go workflow store used modernc.org/sqlite for definitions, versions, execution transitions and events. Explicit persistence and corruption errors mattered because a visual graph alone could not establish which work had actually run or what survived a restart.
Source: Desktop stack · PixiJS renderer · Durable workflow store · Go module
Setta 4: a different renderer and artifact interface
Setta 4 used a custom WebGL2 renderer and GLSL shaders for the Director graph. Base UI, OpenUI and Recharts supported artifact interfaces, while Go and SQLite served the application behind the desktop shell.
The technical interest lies in representing workstreams, events, artifacts and model-attributed interpretations without treating every displayed item as proof of execution. The retrospective’s authored graphs, drafts and built-in replays show those interfaces; they do not establish successful live orchestration.
Source: Director renderer · GLSL shaders · Artifact renderer · Desktop dependencies · Go module
August–November 2026
Draw a smaller boundary around the reusable parts.
Extraction separated workspace interactions from application runtimes. The host would own computation and domain data; the package would own reusable editing behavior.
Remove application assumptions from the workspace
The library retained typed controls, sections and groups, nested layouts, a controlled graph, saved views, structural history and managed windows. TypeScript and a React host formed the API boundary. Upstream xyflow 12 replaced the vendored renderer in August; dnd-kit, Zustand, re-resizable and selected Radix controls remained useful building blocks.
Python and the example applications were removed in October, and the unused Go backend followed in November. A host importing the final package did not automatically receive SettaListener, the language server, local terminals, AI-provider credentials or the old server. CodeMirror and React Icons were bundled from development dependencies, so the runtime-dependency list alone does not describe everything shipped.
Source: Upstream xyflow cutover · Package boundary · Python/application removal · Go removal
Reject stale output without discarding useful output
The browser pipeline client allows one active request and retains only the latest pending input. Monotonic revisions distinguish the newest requested state from the last successful output. Old progress and results cannot overwrite newer input, while a previous successful result can remain visible during loading or failure. Cancellation and timeout terminate the worker.
The graph executor validates dependencies, rejects cycles and memoizes stage promises so a shared dependency executes once per request. Independent asynchronous branches can progress concurrently, but one Web Worker is not a pool of CPU threads. The host supplies every computation.
This problem also appeared in Realtime’s separate application-owned Go/Python scheduler, with bounded concurrency and lineage-matched joins. Similar scheduling requirements do not make the earlier runtime and the later generic browser helper the same implementation.
Source: Revision and worker lifecycle · Graph execution · Realtime scheduler
Consumers bring their own tools
Realtime used Fabric.js for drawing and Ajv for structured inputs. Experiment Lens used ECharts and TanStack Table/Virtual for linked analysis surfaces. Review used @pierre/diffs and Ajv. The current audio demo uses Three.js and Web Audio: its synthesis and scenery belong to that application, while Setta supplies the workspace.
Source: Realtime · Experiment Lens · Review · Shared package
Library index
The tools behind the interfaces.
A visible, searchable index of notable direct dependencies and language facilities—not just the largest frameworks. Periods and roles matter: a package used by one experiment is not necessarily part of every Setta version. Source manifests record the exact versions.
Languages and browser facilities
Early interface
Early form helpers
Formik, Yup, chakra-ui-autocomplete, react-measure
Declared by the 2022 frontend for its form and measurement toolkit; not a current-package inventory.
Source: Source
State and history
Panel layout
Canvas and drag
Selection and search
Components and styles
Code editor
Python understanding
Formatting and help
Ruff, docstring_parser, docstring-to-markdown
Backend formatting and conversion of Python documentation into editor help.
Source: Source