Subspace Framework
Build desktop dashboard apps in Rust with GPUI Kit.
An app is a thin binary that composes the Framework's shell with a chosen set
of Spaces (the code also calls them boards): dashboard views that
implement Dashboard. The Framework gives every Space a switcher tab,
Settings, in-app help, item and full-text search, notifications, agent tools
for chat, MCP and a CLI, updates, issue reports, themes and the shared UI
components.
Apps depend on one crate, subspace-framework. It re-exports the
Framework's crates as modules named after them without the subspace_
prefix (subspace_framework::dashboard is subspace-dashboard). The
subspace-* crates behind it are published with it; depend on the facade,
not on them.
Status: early (0.1). The API will change between minor versions.
Features
| Feature | Modules | For |
|---|---|---|
space (default) |
core, agent_model, agent_tools, charts, contracts, search, web, github_auth, dashboard, lucide, client_github |
Spaces and clients |
agent |
agent |
Spaces that run the chat runtime directly |
host |
shell, board_command, chat, mcp, search_ui, update (implies space and agent) |
App binaries only |
report-issue |
report_issue, and Report issue in the shell (implies host) |
Apps that take issue reports into their GitHub repository |
search-onnx |
search_onnx |
Local ONNX reranking for full-text search |
component-gallery |
component_gallery |
Apps that include the component catalogue Space |
test-support |
client_test_support, plus each enabled crate's test helpers |
Dev-dependencies only |
capture |
the shell's screenshot capture build (implies host) |
Debug capture builds |
product (the GPUI-free product descriptor types) is always present, so
default-features = false gives a fast build for packaging helpers.
A minimal Space
A Space is a GPUI view that implements Dashboard:
use ;
use ;
A minimal app
The app's binary enables host (here report-issue, which adds Report
issue), describes the product, names its GitHub OAuth App and issue
repository, and registers its Spaces:
# use ;
# use ;
#
#
#
#
#
use ExitCode;
use ;
use OAuthClient;
use ;
Requirements for an app
[]
= { = "0.1.0", = ["report-issue"] }
= "0.9.1"
# Required: Cargo applies no [patch] from a dependency.
[]
= { = "vendor/markdown" }
[]
= "unwind"
[]
= "unwind"
# GPUI is slow unoptimised.
[]
= { = 3 }
= { = 3 }
= { = 3 }
= { = 3 }
= { = 3 }
= { = 3 }
= { = 3 }
- The Markdown patch. The Framework renders Markdown with
markdown1.0.0, which panics on some input. Until upstream releases a fix, every app must patchmarkdownto the fixed copy: take thevendor/markdownfolder from the Framework's source (itsPATCHED.mddescribes the change) into the app's repository and point[patch.crates-io]at it. The Framework guards its own calls, but only the patch removes the panics. - Panics unwind. The shell catches panics in views and background work,
so
panic = "abort"is not supported. - GPUI Kit. Use
gpui-kit0.9.1, the version the Framework is built with; GPUI Kit pins its matching GPUI. Enable the tree-sitter grammar features your code views need. - Rust 1.99 or newer (edition 2024).
- Build-time downloads. With
hostoragent,github-copilot-sdkdownloads the Copilot CLI it bundles; setCOPILOT_SKIP_CLI_DOWNLOAD=1to build without it (chat then needs acopilotonPATH). Withsearch-onnx,ortdownloads the ONNX Runtime; setORT_LIB_LOCATIONto a local build, orORT_SKIP_DOWNLOAD=1, for offline builds. - Platforms. macOS (Apple silicon and Intel), Linux (X11 and Wayland)
and Windows. On Linux GPUI needs
gcc g++ clang libfontconfig-dev libwayland-dev libxkbcommon-x11-dev libx11-xcb-dev libssl-dev libzstd-dev libvulkan-dev(Ubuntu names).search-onnxis not built on Windows. - Product identity. Your descriptor names the app, its bundle id, Spaces,
themes and update source; your build script stamps
BuildInfo; yourProductBuildnames your GitHub OAuth App (github_oauth) and, withreport-issue, the repository Report issue files into (report_issue_repository). The Framework has neither: read them from your build script's environment, not in the Framework. Some text and theSUBSPACE_*environment variables still say Subspace; see what publishing exposes.
More: the documentation index, starting with What the Framework gives a board, publishing and what publishing exposes.
Working on the Framework
This folder is its own Cargo workspace. mise install installs the pinned
tools; make lists the targets.
Layout
src/ subspace-framework the facade crate
services/core subspace-core config file, credentials, HTTP agent, state file, PATH lookup (no GPUI)
services/product subspace-product product descriptors, build info, aliases, paths, metadata (no GPUI)
services/agent-model subspace-agent-model neutral chat context, session-summary and image-draft records
services/agent-tools subspace-agent-tools the agent tool interface boards advertise (no GPUI)
services/charts subspace-charts chart model, Chart.js conversion and the embedded Flint compiler
services/contracts subspace-contracts board-to-board contracts
services/github-auth subspace-github-auth Sign in with GitHub (no GPUI)
services/search subspace-search scoped persistent SQLite FTS5 search
services/search-onnx subspace-search-onnx optional local ONNX reranking
services/web subspace-web bounded web research
board-kit/dashboard subspace-dashboard the Dashboard trait, shared widgets and design tokens
board-kit/lucide subspace-lucide shared interface icons
runtimes/agent subspace-agent Copilot, Pi and ACP chat runtimes
host/app subspace-shell the shared window, toolbar, switcher, palette, help, Settings and themes
host/board-command subspace-board-command headless board commands
host/chat subspace-chat the app-wide chat panel
host/mcp subspace-mcp the MCP server for the boards' agent tools
host/report-issue subspace-report-issue issue reports with explicit diagnostics consent
host/search-ui subspace-search-ui the full-text Search view
host/update subspace-update release checks and installs
clients/github subspace-client-github GitHub REST and GraphQL
clients/test-support subspace-client-test-support offline HTTP fixtures for client tests
spaces/component-gallery subspace-component-gallery-board the catalogue Space: every component in its states
vendor/markdown (patch) markdown 1.0.0 with the panic fix
Dependencies point one way between the layers; AGENTS.md
has the rules and make check enforces them.
The dashboard interface
board-kit/dashboard/src/lib.rs defines Dashboard. A dashboard is
a GPUI view that also
implements EventEmitter<DashboardEvent> and:
| Member | Purpose |
|---|---|
ID, TITLE |
Identifier and switcher label, such as github and PRs |
new |
Create the view; the app creates each dashboard once |
bind_keys |
Bind the dashboard's keys in view_keys(Self::ID) |
activate, deactivate |
The dashboard became visible, or another did |
window_title |
The window title, such as the board's current scope |
render_toolbar |
Controls after the switcher, such as filters |
status, busy |
Toolbar text, and the reload button's busy mark |
badge |
An optional mark on the switcher tab, such as a count of running work |
subject |
The selected row, shown above the palette's commands |
commands |
Palette commands: an action, a callback or a sub-list |
search, open_search_result |
Item search for /, and revealing a result |
modal, dismiss |
An open menu or dialog, and closing it |
keys, help_foot |
Rows and a note for the key help |
reload |
Load the data again (r, Cmd+R) |
A dashboard talks to the shell with DashboardEvent: Toast (info or
error, with an optional https link), OpenPalette, Opened (for the
recent items) and Chat (a ChatRequest the Copilot chat pane answers:
list the saved sessions, or show one in a chat tab). It reads the shell's
choices from globals: Wrap, Density (through Tokens::current),
Services (the config and the credential sources) and
chat_sessions::sessions (the chat pane's saved sessions).
Shared widgets
The UI component catalogue maps components, styles and
their owners. Define reusable button, tab, input and dialog treatments in
board-kit/dashboard; boards compose them rather than add local style variants.
Use the shared native-tab treatment instead of styling buttons as tabs.
Document control exceptions in the catalogue. Direct GPUI Kit layout and event
handling do not need wrappers.
New tabs and action buttons should have an appropriate glyph by default. Give every control an accessible label. Glyphs are decorative unless they communicate status that is not present in the label.
| Module | What it gives a dashboard |
|---|---|
list |
ListState and list::render: grouped rows, folding, selection that scrolls into view, row indent levels, the detail panel, optional right-aligned GroupIndicator marks; ListDashboard hooks on_selection_changed, on_open, on_panel_toggled, on_activate, group_indicators, and row_leading, row_trailing and group_leading for domain marks and lanes; list::update for changes made outside the list's keys |
panel |
The detail panel frame: type and id, previous and next, service link, resizable edge |
menu |
A popover menu: filter as you type, arrows, Enter, digits 1–9, Escape |
composer |
Markdown input with Write and Preview: initial text, submit label, optional text, size limit |
chat_input |
Reusable message input with Enter submission, busy/error state and bounded clipboard capture; shared by IRC and the host chat panel. IRC uses its plain-text and recall-key options |
chat_sessions |
Published saved-session snapshots with open/busy tab state; read by Copilot Agents without a runtime dependency |
action |
Intent-styled native buttons; ActionState::apply adds busy, success or failure feedback, and ActionState::label selects matching text |
row_menu |
The right-click menu of a row, a group header and the detail panel: what a row offers (RowMenu), which entries that earns, and the GPUI Kit PopupMenu it becomes |
context_text |
Labelled plain text for an attached chat reference: ContextText lines and blocks, the 16 KB cap with its truncation marker, a shared Detail rendered as text, and the reference for selected text |
truncated |
One line of text with an ellipsis, and the whole text in a tooltip when the row cuts it; truncated::styled keeps a highlighted title's own styling |
chart |
Chart: a native chart for a subspace_charts::ChartModel - bar (stacked, grouped, horizontal), line, area, pie, doughnut and scatter, with axes, thinned category labels, a legend and a hover tooltip. It takes a fixed height or fills the height its parent flex container has left. Series colours come from the theme tokens unless the model fixes one |
measure |
A probe that reports the width an element was given, for views that lay out by the room they have |
rich and html |
Rich text: Markdown, and service HTML turned into Markdown, with the link and image rules |
code |
Tree-sitter syntax colours (One Dark Pro) for code views |
feedback |
Skeleton, empty and selectable error states with glyph-bearing Retry or caller-supplied recovery actions, and the bar button |
links |
Open a safe URL in the browser, copy to the clipboard |
prefs |
Stored choices under <dashboard>.<name>, and cache files beside the state file |
dates |
Times as every dashboard shows them: a row's compact age, a panel's relative phrase, a full local stamp |
alerts |
The task alert sound and the macOS notification, with their stored settings |
tokens, density, typography |
Theme colours, Tone, exact service colours, density values and heading font |
logger, log_view |
logger::<Self>() gives a board its subspace_core::log::Logger, scoped by its id; log_view is the Framework's log viewer the shell opens with Cmd/Ctrl+Shift+L (see Logging) |
Dashboards with grouped rows and a detail panel implement ListDashboard
and draw with list::render. A dashboard with another layout draws its own
view with the same widgets.
Appearance
The bundled themes and the theme designer share independent heading, body and code font choices. See Themes and fonts.
Checks
mise install installs the pinned tools; make lists the targets.
| Task | Command |
|---|---|
| Build every crate | make build |
| Tests | make test |
| Everything that must pass | make check |
| Format the sources | make format |
| Quality score against the baseline | mise run quality |
| Dependency advisories | mise run audit |
| Verify the packages online before a release | make publish-check |
| Publish (see publishing) | make publish-dry-run, make publish |
| Release a new version | Merge the Release Please pull request (see publishing) |
make check runs the architecture check, the documentation and Space guide
checks, the format check, cargo shear, clippy with warnings denied, the
tests and the README's examples, packages every crate and builds each from
its package, checks what each package ships, and tests the publish scripts. In non-interactive shells run Cargo through mise
(mise exec -- cargo ...) so builds use the Mr Boxington cache.
Licence and notices
The Framework is licensed under the Apache License 2.0 (LICENSE);
every crate ships a copy. Crates that embed third-party material ship a
NOTICE naming it and its licence: subspace-charts (Flint),
subspace-shell (themes), subspace-chat (chat engine marks),
subspace-lucide and subspace-component-gallery-board (Lucide).
make check checks that each ships.
services/charts embeds the published Chart.js build of flint-chart 0.5.1
(MIT) and links QuickJS through rquickjs (MIT), so an agent-authored chart
compiles with no Node.js, no install and no network. See
the notices; scripts/refresh-flint.sh is the
maintainer tool that replaces the vendored build.
Each board's assets/ directory holds its service marks. Host artwork such as
the chat toolbar's Copilot mark stays in host/app/assets/logos.
Each file names its
source and licence in a comment: the GitHub mark comes from simple-icons
(CC0), and the GitHub Copilot mark from
primer/octicons (MIT), file
icons/copilot-16.svg. Board glyphs are unique.
The interface icons are Lucide (ISC), bundled with GPUI Kit and exposed by
subspace-lucide.
On Linux, GPUI needs these packages (Ubuntu names):
gcc g++ clang libfontconfig-dev libwayland-dev libxkbcommon-x11-dev libx11-xcb-dev libssl-dev libzstd-dev libvulkan-dev.