Expand description
The frame every app shares (Shell): an app hands it its registry, its workspaces, its
menus and its Settings sections (ShellSpec), and the frame draws them the same way in
every app (Design System, “The frame”):
- Title bar, left to right: the app’s mark, the general menus (File · Edit · View · Help),
a divider, then the app’s views in one switcher (Explore, Sorting, Curation, Analysis…).
At the right: search, the project, who works, where the app runs, the shared workspaces as
icons (Pipeline, Code: the same in every app,
Placement::Shared), the layout toggles and the theme. While a shared workspace is open the switcher shows no view as current. - File keeps its usual items: Open… (the file picker,
crate::picker_view, only when the app says what it opens:OpenSpec), the app’s own (Open recent, Save, Export…), Settings and Quit. - Menu row: the current workspace’s menus, built from the registry.
- Body: the current workspace’s view, a card on the chrome.
- Status bar: a status line, the running jobs (
crate::jobs) with a cancel button each, and this computer’s load (CPU, memory). - Settings (Ctrl+,): sections on the left (Appearance, built in, then the app’s), the section’s settings on the right.
- Search (Ctrl+K, F3) over the registry.
- Window frame: where the app draws its own frame (client-side decorations on Linux), the window has rounded corners while it floats and resizes from its own edge; no shadow margin (compositors that do not draw it showed what was behind the window there).
- Overlay: one view of the app’s over everything (
Shell::set_overlay: a help sheet, a dialog).
The frame adapts to the window’s own width (TitleFit): under TITLE_COMPACT_W the
views show as icons; under PANELS_W a workspace’s side panes move into the Panels drawer
(WorkspaceSpec::drawer; the app asks fit and leaves them out of its own layout); under
TITLE_NARROW_W the four general menus fold into one menu button, and the layout toggles and
the theme into a “More” menu.
The frame adds its own commands to the registry (shell.search, shell.settings,
shell.theme, shell.open, shell.quit, shell.panels, shell.workspace.<id>), so they are
in the search and an agent’s tools too. Keys: Ctrl/⌘+1…9 the views in order, Ctrl/⌘+Alt+P
Pipeline, Ctrl/⌘+Alt+C Code, Ctrl/⌘+O Open…, Ctrl/⌘+\ the Panels drawer.
Structs§
- Open
Spec - What File → Open… opens: the kinds the app reads, where to start, and what to do with the file picked.
- Remote
Spec - Where the app runs, at the right of the title bar (as VS Code’s remote indicator): this computer, or a server. Its menu lists the places.
- Settings
Section - A section of Settings an app registers (Compute, Models, Plugins…).
- Shell
- The frame.
- Shell
Spec - What an app hands the frame.
- Workspace
Spec - A workspace of the app (Explore, Pipeline, Analyze; Sorting…).
Enums§
- Placement
- Where a workspace sits in the title bar.
- Shell
Event - What the frame tells the app.
- Title
Fit - How much of the frame fits a window
widthpx wide (seeTITLE_COMPACT_W,PANELS_W,TITLE_NARROW_W). Ordered:Narrow < Medium < Compact < Full.
Constants§
- CODE_ID
- The shared Code workspace’s id.
- CODE_
KEY - Code’s key: Ctrl/⌘+Alt+C.
- MENU_
ROW_ H - Height of the menu row (px).
- PANELS_
W - Below this window width (px) a workspace’s side panes move into the Panels drawer.
- PIPELINE_
ID - The shared Pipeline workspace’s id.
- PIPELINE_
KEY - Pipeline’s key: Ctrl/⌘+Alt+P.
- RESIZE_
BAND - The band at the window’s own edge that resizes it while it floats (px).
- STATUS_
BAR_ H - Height of the status bar (px): one 24 px target.
- TITLE_
BAR_ H - Height of the title bar (px).
- TITLE_
COMPACT_ W - Below this window width (px) the views show only their icons, the title bar drops the project name and shows the remote as an icon (a small laptop window, a tablet held upright).
- TITLE_
NARROW_ W - Below this window width (px) the general menus fold into one menu button, and the layout toggles and the theme button into one “More” menu (a phone held upright).
- WINDOW_
RADIUS - Rounded corners of the window while it floats (px).
Functions§
- fit
- The fit of
window(TitleFit::ofits width): a workspace’s view asks it to leave its side panes out (they are in the drawer) and to stack its panes when narrow. - frame_
rounded - Whether the window draws its own rounded frame: client-side decorations on a floating window (square when maximised, full screen or tiled).
- resize_
edge - The edge a press at
p(window px) resizes, withinRESIZE_BANDof asizewindow’s edge.
Type Aliases§
- Section
Body - Draws a Settings section’s body.
- Status
Items - Draws the app’s readings in the status bar.