Skip to main content

Crate subspace_dashboard

Crate subspace_dashboard 

Source
Expand description

The dashboard interface. Every dashboard is a crate that implements Dashboard for one GPUI view; the app lists each dashboard once, in framework/host/app/src/registry.rs, and drives it through DashboardHandle.

The app shell owns the window, the dashboard switcher, the ⌘K palette, help, toasts, wrap, the density jig and reload; a dashboard owns its view, its toolbar controls, its commands, its item search and its keys. A dashboard talks to the shell with DashboardEvents and reads the shell’s choices from globals (Wrap, Density, Services).

Dashboards that show grouped rows with a detail panel implement ListDashboard too and render with list::render.

Re-exports§

pub use artwork::BoardArtwork;
pub use chat_input::ChatInput;
pub use chat_input::ChatInputEvent;
pub use density::Density;
pub use density::DensityPreview;
pub use list::Body;
pub use list::Detail;
pub use list::Glyph;
pub use list::Group;
pub use list::ListDashboard;
pub use list::ListState;
pub use list::Row;
pub use list::Section;
pub use row_menu::RowMenu;
pub use tokens::ThemeId;
pub use tokens::ThemeTones;
pub use tokens::Tokens;
pub use tokens::Tone;
pub use typography::Typography;
pub use typography::heading_font;
pub use subspace_search as full_text;

Modules§

action
Canonical application action constructors. Each one takes the theme’s geometry for its ButtonRole: height, padding, text size and radius. Boards must not restyle colour or typography.
activity_mark
Subspace’s stationary mark with two moving highlights for indeterminate activity.
alerts
Alerts for monitored agent tasks: a system sound and a macOS notification. Both start a process on a thread of their own, so a caller on the UI thread never waits for one. On other platforms they do nothing.
anchored
The shared boundary for trigger-anchored controls and native popup adapters.
animated_collapsible
A measured disclosure with a reversible, owner-controlled transition. The owner retains Disclosure and invalidates virtual row measurements via on_resize. Standard GPUI layout measures the unconstrained content.
artwork
Board-owned embedded assets, independent of the product’s switcher order.
avatar
Compact, theme-aware profile photos and initials for dashboard rows, and the circles that mark a fleet agent by rank.
badge
Shared geometry for compact count and key-hint badges.
chart
The shared native chart: a ChartModel drawn with GPUI (REQ-44).
chat_bubble
The message bubble shared by Copilot and messaging boards.
chat_input
The chat input: a GPUI Kit [InputGroup] around a [Textarea] with submit_on_enter, so Enter sends and Shift+Enter inserts a new line. Kit reports Shift+Enter as a PressEnter too, after the line break, so only a plain Enter sends. Option+Enter inserts a new line too, through the alt-enter binding in this component’s key context.
chat_sessions
What the chat panel publishes about its saved sessions, so a dashboard can list them without owning the runtime.
code
Syntax colours for code from GPUI Kit’s active highlight theme. The GitHub diff view uses it.
composer
The Markdown composer for comments, reviews and Markdown fields: a text area with Write and Preview, secondary-enter submits, and Escape asks once before it discards changed text.
context_text
Labelled plain text for an attached chat reference.
contracts
Board-to-board communication through contracts. Boards never reference each other: a board declares, in Dashboard::contracts, which messages of which contracts (subspace_contracts) it publishes, subscribes to, requests and answers, and the broker routes them between the running boards.
contrast
WCAG contrast for text, focus indicators and control outlines after sRGB alpha compositing. The theme designer and the switch track rule use it.
copy_details
Shared error actions and the error-free About diagnostics command.
dates
Service times as the lists and panels show them: the compact age a row carries, the relative phrase a panel reads, and a full local stamp.
density
The density jig’s tokens (REQ-10): the controls with their limits, and the Density global that holds the values the user changed. Rows, panels and the toolbar read the values through crate::Tokens::current.
dialog
Shared frame treatment for dashboard-owned modal dialogs.
dock_panel
One product-composed panel that the shell docks beside every Space, such as the terminal. The panel owns its content and its header; the shell owns whether it shows, where it docks, its size and whether it fills the workspace, and tells the panel through PanelLayout. The panel asks the shell for changes with DockPanelEvents.
feedback
Loading, empty and error states (REQ-13), including the list skeleton.
fields
Canonical dashboard treatments for native text inputs and code editors.
find_in_page
Find within one Space. Native text keeps selection and paints its own matches.
github_sign_in
Sign in with GitHub, shared by Settings and chat: the one sign-in in progress (GitHubSignIn) and the component that shows it (status). The flow itself is headless (subspace-github-auth); the token goes straight from it into the shared credentials’ store, never into UI state. Sign-in and sign-out apply at once: they are not Settings drafts.
glass
Liquid Glass navigation capsules. The shell’s horizontal board tabs and the vertical board rail draw each destination as a capsule; the current one is a glass lozenge (a translucent fill brighter at the top, a specular rim and a soft lifting shadow), the others are bare until hovered. Themes that set --liquid-glass also put outlined toolbar buttons on glass with control, and quiet glyph buttons take glass for the finishes the --toolbar-button-rest and --toolbar-button-hover tokens choose.
help
Bundled help images are resolved only in the board-help document.
html
Service HTML to the Markdown that crate::rich shows.
icon_button
Icon-bearing application actions. One global relative scale, normal text, native Button behavior, and one explicit compact preset for approved inline uses.
images
Bounded raster decoding.
links
Open in browser and copy (REQ-15). Only http, https and mailto links leave the app.
list
The shared list view: group header rows, item rows and the detail panel.
log_view
The Framework’s log viewer: the records in subspace_core::log’s buffer, filtered by level, target and text, following the tail while asked to. The app opens it in place of the board, as it opens the Search view; its header’s Close and Escape return to the board.
markdown_editor
A formatted Markdown field and a highlighted source view of its draft.
measure
Elements that report the room they were given, so a view can lay out by the width it actually has rather than guessing.
media
Shared media surfaces. Owners supply private decoded pixels and native actions.
menu
The searchable menu body (REQ-14): type to filter, arrows to move, Enter to pick, Escape, Tab or a click outside to close.
native_grid
Retained, bounded native result grid. Exploration never calls a data provider.
notifications
Generic process notifications. Service targets remain private to each board.
overflow_toolbar
A measured, source-ordered toolbar row with a native overflow menu.
panel
The detail panel frame (REQ-11): a title bar (back, type and id, previous and next, the service link, close), a scrolling body, and a left edge that resizes the panel by dragging, by the arrow keys when it has focus (16 px, Shift for 64 px), and resets on a double click. The width is the density jig’s --panel-w, clamped to 320 px and 75 % of the window, and is stored.
prefetch
Automatic detail fetching for a snapshot of an already loaded list. Keep the returned handle on the board. Drop/cancel it on deactivate, scope change or list replacement. Blocking calls run only on the background executor.
prefs
Stored UI choices (REQ-08): the state file behind a GPUI global. Keys are <dashboard>.<name>. A change stays in memory until save writes the file; the app saves shortly after changes and when it quits. Without init (in tests), choices last for the run only.
reference_card
Shared reference surfaces, composed from the native outline Button and Kit avatars.
refresh
Shared preferences and timing for automatic board reads, not manual refresh.
repositories
Favourite repositories: the config file’s repos, the one list that the GitHub, Copilot Agents and Actions boards and the agent tools share.
retained
Lifecycle polling for board-owned retained-content permits.
reveal
Show a local file in the system file manager: Finder, File Explorer or the desktop’s file browser.
reveal_focus
Keeps a keyboard-focused control inside its scrollable viewport.
rich
Rich text: service HTML and Markdown, shown with GPUI Kit’s TextView:
row_menu
The right-click menu: every context menu is built from the same seven groups in the same order (MenuGroup), with a separator between groups that have commands. A board fills groups in with MenuCommands; it never orders them, and a group with nothing in it is left out. build turns a GroupedMenu into GPUI Kit’s PopupMenu.
search_adapter
Board-agnostic helpers for persistent-search adapters.
secret
A saved credential’s field. The input never shows the saved value: while a secret is saved the input is read-only, Clear makes it editable again, and text entered after Clear replaces the secret on Save. Used by the shell’s Settings pages and by board-owned settings editors.
segmented
Compact exclusive choices that remain one atomic toolbar unit.
settings
Static settings metadata supplied by a dashboard registration, and the run-time fields a configured board can add.
slider
Labelled native slider backed by an integer tick domain.
surface_header
The title bar of a Framework view that the shell shows in place of the board, such as Logs and Search. It names the view, carries the view’s own actions and always shows Close, so the view never depends on a toolbar’s overflow menu or a hidden shortcut to leave.
tabs
Canonical dashboard treatment for native GPUI Kit tabs.
toggle
Shared switches and the layout for independent boolean options.
tokens
Design tokens: One Dark with the herdr accent, plus the row and panel sizes. The app’s One Dark theme file (framework/host/app/themes/one-dark.json) uses the same colours; a test in the app checks that they agree.
toolbar_label
A toolbar fact with nothing to choose, such as the only signed-in account. It sits on the toolbar band like a button but is plain text: no hover, focus or caret promises an action.
truncated
Single-line text that is cut with an ellipsis when it does not fit, and shows the whole text in a tooltip when it is.
typography
Typography roles shared by the app shell and dashboard widgets.
workspace
The workspace shell every Space shares: a navigator dock on the leading side, a pane with a tab strip and a toolbar above its content, and an inspector dock on the trailing side.

Macros§

secondary
The keystrokes keys with the secondary modifier: cmd on macOS and ctrl elsewhere. KeyBinding::new takes only explicit modifiers, so secondary!("shift-c") stands for the secondary-shift-c keymap form.

Structs§

Activate
Open the selected row’s details, or fold or unfold the selected group.
AddSelectionToChat
Add the text selected in a detail pane to the Copilot chat.
AddToChat
Add the selected row and its open details to the Copilot chat.
AgentContext
BoardNavigation
Catalog
The tools of the selected boards, in product order.
CloseDetail
Close the detail panel.
CloudSession
A cloud agent task to replay in a chat tab. The dashboard that lists the tasks knows the id, the name and the page; the chat pane connects.
ConfigureBoard
Open connection settings for the visible dashboard.
CurrentProduct
Set by the product shell before constructing dashboard entities. Boards use the same context for their additional configuration directories.
DashboardHandle
A created dashboard, with its type erased so the app can hold a list.
HelpImage
A board-owned image compiled into the binary with include_bytes!.
ItemSearch
A dashboard’s loaded items, indexed for the palette (REQ-05). Build it again when the items change; searching makes no request.
KeyHelp
One row of the help overlay: a key and what it does.
PaletteCommand
A palette command a dashboard offers.
PaletteOption
One choice in a command’s sub-list.
ReturnLocation
A place in a board that a later Back can return to.
ReturnPoint
A view the person was on: a board and, optionally, a place in it that the board restores itself. The shell records one each time it changes the current board, the last view, and gives it to the board it shows with Dashboard::arrived_from.
Search
What / searches in a dashboard.
SearchDoc
One searchable thing. Dashboards map their items to documents.
SearchNavigation
Internal search citations are routed in-app and never sent to the OS URL opener.
SelectFirst
Select the first line.
SelectLast
Select the last line.
SelectNext
Select the next visible row or group header.
SelectPrevious
Select the previous visible row or group header.
Selection
Text selected in a detail pane, held between the pane’s context menu and the shell’s AddSelectionToChat handler, which takes it.
Services
The config file and the credential sources, loaded once at startup. Clients take Arc clones into background tasks. tools is the catalog of the selected dashboards, which Copilot chat registers.
SubList
A second step, such as the sprint or team list, shown in place of the palette’s root list. Picking an option closes the palette and calls on_pick with the option’s value.
Toast
A short message at the bottom left (REQ-12).
ToastLink
A link in a toast. Only https links show.
ToolEnvironment
What a board needs to build its tools: the loaded configuration and the credential sources, as the dashboards receive them.
Wrap
The app’s wrap toggle (REQ-09): wrapped titles when true, else one line.

Enums§

ChatRequest
What a dashboard asks of the Copilot chat pane the shell owns. The chat pane holds the one agent runtime, so a dashboard never touches it directly; it reads chat_sessions::sessions and asks with this.
CommandRun
What a palette command does.
DashboardEvent
What a dashboard asks of the shell. Emit with cx.emit(...).
Modal
While a dashboard shows a menu, keys go to the menu and ⌘K closes it first; while it shows a dialog, keys go to the dialog only (REQ-06).
PaletteMode
Which palette to open: commands then items (⌘K), or items only (/).
ToastTone

Constants§

DASHBOARD_CONTEXT
Key context of a dashboard’s view.
LIST_KEYS
Help rows for the list keys, before a dashboard’s own keys.
MODAL_CONTEXT
Key context of menus and dialogs: shell and dashboard keys stay off while one has focus (REQ-06).
RAW_KEYS_CONTEXT
Context owned by a dashboard that routes raw keys to its focused view.

Traits§

AgentTool
One tool a board advertises.
Dashboard
A dashboard: one view in the app’s switcher.

Functions§

app_keys
App keys remain available unless a dashboard owns raw-key input.
back_label
Back to destination, shortened with an ellipsis when it is long.
bind_keys
The list keys every ListDashboard shares and the keys of the shared components. The app binds them once.
full_text_service
The shared persistent search service, without owning a board’s data model.
services
set_selection
take_selection
The held selection, leaving none behind.
view_keys
The key context predicate for keys without secondary, ctrl or alt in the view named context: they do not act while a text field, a menu or a dialog has focus (REQ-06), nor while a view that owns raw keys has it, because a plain key belongs to that view instead. Dashboards bind their own plain keys with Some(&view_keys(Self::ID)).
wrap

Type Aliases§

Callback
EventSink
Receives a dashboard’s events in the app.
PickCallback