Overview
WGPUI is the GPU-accelerated UI rendering library used across OpenAgents. It provides a cross-platform rendering stack built onwgpu, a component
system, a layout engine, and testing utilities for high-performance UI
surfaces (chat threads, tool call cards, streaming markdown, etc).
WGPUI is inspired by GPUI (the GPU-accelerated UI framework built for
the Zed editor) and borrows the same entity-driven, render-tree approach to
building immediate-mode views on top of a retained state model.
Effuse is the Effect-native TypeScript UI stack used by the Autopilot
Web MVP. The former desktop stack (Tauri + Effuse) has been removed; WGPUI is
the canonical UI layer for Autopilot Desktop.
Where it lives in the repo
crates/wgpui/- core GPU UI library (renderer, layout, components, testing)crates/autopilot_ui/- shared WGPUI surfaces for Autopilotcrates/autopilot_app/- app core consumed by both CLI and desktopapps/autopilot-desktop/- native desktop shell using WGPUI + winit- Examples and demos:
crates/wgpui/examples/storybook/crates/wgpui/examples/component_showcase.rscrates/wgpui/examples/first_light.rs
Core architecture
WGPUI is organized around an entity-driven UI model and an element tree pipeline:- App + Entity system: typed state containers and reactive notifications
(
crates/wgpui/src/app/*). - Element tree: layout, prepaint, and paint phases for UI elements
(
crates/wgpui/src/element/*). - Scene: accumulated draw commands (quads, text runs, images, lines).
- Renderer: wgpu pipelines, GPU buffers, and shaders
(
crates/wgpui/src/renderer.rsandcrates/wgpui/src/shaders/*). - Layout: Taffy-based flexbox layout engine
(
crates/wgpui/src/layout.rs). - Text: cosmic-text shaping and glyph atlas
(
crates/wgpui/src/text.rs,crates/wgpui/src/text_system/*). - Input + actions: platform-agnostic events and a keymap/action system
(
crates/wgpui/src/input.rs,crates/wgpui/src/action/*,crates/wgpui/src/keymap/*).
crates/wgpui/docs/README.md and
crates/wgpui/docs/phase1-foundation.md in the OpenAgents repo.
Component system
WGPUI ships a rich UI kit organized by level:- Atoms: badges, indicators, icons, status pills, etc.
- Molecules: cards, rows, headers, input clusters.
- Organisms: complex UI blocks like tool call cards and message rows.
- Sections: higher-order panes like thread views and editors.
- HUD: overlays, command palette, status bars, modals.
Div, Text, Button, TextInput, ScrollView,
VirtualList, Modal, Dropdown, and Tabs
(crates/wgpui/src/components/*).
Platform support
- Desktop:
winit+ native wgpu swapchain. - Web:
wasm-bindgen+ WebGPU.
crates/wgpui/src/platform.rs.
Testing
WGPUI includes a dedicated test harness and snapshot tooling incrates/wgpui/src/testing/. This is the foundation for UI regression
tests and layout inspection in the WGPUI migration plan.
Autopilot Desktop (WGPU)
The native WGPU desktop app lives in:apps/autopilot-desktop/src/main.rs
autopilot_app(core app state and event flow)autopilot_ui::MinimalRoot(WGPUI view root)- WGPUI renderer + text system
winitevent loop and window lifecycle
Migration status
Seeapps/autopilot-desktop/docs/migration/EFFUSE_TO_WGPUI_PLAN.md in the
OpenAgents repo for the full migration plan and architectural decisions.