Skip to content

v0.6.0

Latest

Choose a tag to compare

@huacnlee huacnlee released this 03 Sep 14:30
· 4 commits to main since this release
94a313a

GPUI Kit v0.6.0

v0.6.0 is a major expansion of the project since v0.5.0. The project is now GPUI Kit: a layered toolkit for building desktop applications with GPUI. This release introduces an unstyled foundation crate, a single-dependency facade, a scriptable application runtime, a substantially expanded component set, richer text editing and rendering, motion, accessibility, and new developer tooling.

This release note focuses on user-visible additions, improvements, API changes, and deprecations. It intentionally omits fixes made while the new v0.6.0 features were being developed.

GPUI Kit and the new crate architecture

The repository and ecosystem are now named GPUI Kit, and the documentation has moved to gpui-kit.com. GPUI Component remains the styled component layer within the toolkit. (#2927)

The new architecture separates reusable behavior from presentation:

  • gpui-kit is the recommended facade for applications. It re-exports GPUI and the enabled Kit layers, provides application(), init(), and an actions! macro, and keeps matching GPUI dependencies together.
  • gpui-base provides unstyled behavior, state, interaction, and infrastructure primitives. It includes text editing and rich text, selection, dock layout, virtual lists, dialogs, popovers, controls, motion, history, and navigation foundations.
  • gpui-component remains the complete styled UI system and builds on gpui-base.
  • gpui-shell is a new scriptable application runtime that lets a Rust host expose GPUI capabilities to JavaScript. (#2821)
  • gpui-fps adds a real-time FPS and resource HUD, including CPU, memory, GPU, and frame-tail reporting. (#2704)
  • gpui-wry is now the standalone WebView integration crate.

Applications may continue depending directly on gpui-component, or adopt the new facade:

[dependencies]
gpui-kit = "0.6"
use gpui_kit::*;
use gpui_kit::component::Root;

fn main() {
    gpui_kit::application().run(|cx| {
        gpui_kit::init(cx);
        // Open windows and build the application here.
    });
}

New components and application building blocks

The styled component library has grown well beyond the v0.5.0 surface:

  • Application structure: Command palette, NativeMenu, StatusBar, Pagination, Stepper, HoverCard, AlertDialog, FocusTrap, and a redesigned declarative Dialog API.
  • Data entry and display: Combobox, Rating, ProgressCircle, a new lightweight declarative Table, and multi-row headers, cell selection, custom row heights, resizing constraints, and batched export for DataTable.
  • Communication UI: composable Message, MessageScroller, Bubble, Attachment, and Marker components for chat and assistant-style interfaces. (#2832)
  • Loading and feedback: Shimmer, animated progress states, configurable notification placement and width, dismiss callbacks, and optional OS notification-center delivery.
  • Navigation: NavStack provides browser-style push, back, and forward navigation with animated transitions. (#2922)

Existing controls received broader composition and interaction APIs, including context menus for sidebar and tree items, async submenus, collapsible sidebar modes, animated tabs and tooltips, programmatic resizable panels, reverse sliders, configurable calendar week starts, accessible labels and control IDs, and drag-and-drop support for list items.

Text editing, rich text, and selection

Text editing is now split into purpose-built controls:

  • Input / InputState for single-line text, masks, validation, and number entry.
  • Textarea / TextareaState for multiline text, rows, soft wrapping, auto-grow, and chat-style submit behavior.
  • Editor / EditorState for code editing, highlighting, line numbers, folding, decorations, diagnostics, search, replacement, and LSP integration. (#2691)

The editor adds transaction-based undo, code folding, inline completions, semantic tokens, document colors, configurable wrapping indent, selection APIs, readonly mode, replace/replace-all actions, and broader syntax highlighting. Tree-sitter language support is now split into per-language Cargo features, so applications can select only the grammars they need.

TextView now lives in gpui-base, with the existing gpui_component::text API retained as a compatibility facade. Rich text gains incremental Markdown parsing, inline and local images, Markdown extensions/plugins, math blocks, table actions and horizontal scrolling, source-preserving copy, link-click handling, multi-click selection, drag auto-scroll, and max_lines. A new SelectableText element participates in window-level selection without requiring a rich-text document. (#2881)

Window-level TextSelection can combine selection across multiple TextView and SelectableText regions, enabling document-like selection and copying across independently rendered elements.

Docking, layout, and scrolling

Docking now has a reusable pure-data layout foundation in gpui-base. It supports serializable tiles, tab groups, split resizing, drag/drop placement reporting, undo/redo, animated drop placeholders, snapping neighboring panel edges, and LayoutChanged events. This makes dock layout state usable independently of the styled dock UI.

Scrolling behavior has been revised for better interoperability between nested scroll containers. Highlights include explicit Scrollable identity, axis locking for trackpad gestures, improved scrollbar visibility transitions, responsive Markdown tables, and width-aware virtual-list measurement.

Motion and visual system

gpui-base::motion introduces a layered animation system with keyframes, timing functions, spring motion, presence transitions, staggered animation, reveal helpers, and interpolation. Components now use spring transitions where targets can change during an active animation. (#2866)

The theme system adds gradient backgrounds, global radius consistency, configurable focus rings, selection and Markdown-table semantic colors, custom primary-button and switch colors, and improved dark-mode syntax highlighting. Form controls, popovers, tabs, sliders, and scrollbars have been visually refined for clearer interaction states.

Charts and visualization

Charts gain:

  • SankeyChart and RadarChart.
  • Candlestick charts.
  • Interactive hover tooltips.
  • Negative bar values and a value axis.
  • Arbitrary fills such as gradients, per-bar corner radii, grid and x-axis options.
  • Pie-chart leader-line labels and Radar-chart element labels.
  • More efficient Sankey topology and deduplicated, value-indexed band scales.

Accessibility and platform integration

Accessibility information is now exposed across the component set, including roles, labels, values, toggle state, and stable control IDs. Buttons and checkboxes support role overrides and presentational roles, while editable controls expose their values to accessibility clients.

Native integration expands with OS-native application and context menus, menu item images, improved Linux client-side decorations, window-manager-aware title-bar controls, notification-center bridging, and an owned raw Wry WebView handle.

Performance and developer experience

  • Large editor documents now use a SumTree-based wrapping cache, incremental foreground parsing, bounded syntax injections, and cheaper rewrapping and outdent paths.
  • Large TextView replacements are parsed off the UI thread, while Markdown blocks are shared instead of cloned each frame.
  • Dock, input, notification, color-picker, chart tooltip, and shell rendering paths avoid redundant work and unnecessary rerenders.
  • The new gpui-fps HUD reports presented frames and process resource use for profiling live applications.
  • The documentation site now includes English and Chinese references for GPUI Base, GPUI Shell, the component library, design guidance, coding guidance, and runnable examples.
  • A distributable GPUI Kit skill bundles the design and coding guides for coding agents.

Breaking API changes and migration

Input, Textarea, and Editor are separate APIs

InputState is now single-line only. Migrate multiline inputs to TextareaState and code editors to EditorState:

- use gpui_component::input::{Input, InputState};
+ use gpui_component::input::{Textarea, TextareaState};

- InputState::new(window, cx).multi_line(true).auto_grow(3, 8)
+ TextareaState::new(window, cx).auto_grow(3, 8)
- InputState::new(window, cx).code_editor("rust")
- Input::new(&state)
+ EditorState::new("rust", window, cx)
+ Editor::new(&state)

Input-only adornments such as prefix, suffix, the mask toggle, and the clear button are not properties of Textarea or Editor; compose those actions around the control instead.

Table names

The former stateful Table is now DataTable. Table names the new declarative table element. (#2075)

- use gpui_component::table::Table;
+ use gpui_component::table::DataTable;

The selector-column option was renamed from row_selector to row_header. (#2366)

Divider is now Separator

The module, types, and DescriptionList method were renamed. (#2335)

- gpui_component::divider::Divider
+ gpui_component::separator::Separator

- DescriptionList::divider()
+ DescriptionList::separator()

List and table pagination delegates

ListDelegate::is_eof and TableDelegate::is_eof were renamed to has_more, with the semantics made explicit and the default set to false. (#1757)

WebView moved to gpui-wry

The gpui-component webview feature was removed. Depend on the standalone gpui-wry crate instead. (#1759)

History is split by purpose

The former undo-oriented History<T: HistoryItem> API and HistoryItem trait were removed. Use:

  • History<T> for browser-style navigation with back/forward semantics.
  • UndoHistory<T> for grouped undo/redo transactions. (#2923)

Dock construction and extension APIs were redesigned

Dock persistence keeps the v0.5.0 JSON shape, but the Rust construction and extension APIs changed as the dock was split into an unstyled data/behavior layer and a styled renderer. (#2772)

  • DockItem was replaced by the pure-data DockLayout builder.
  • Styled applications should wrap panels with panel_handle and use the panel_view, tile_view, add_panel_view, and add_tile_view entry points.
  • The old Panel trait is split between gpui_base::dock::Panel for behavior and gpui_component::dock::Panel for presentation.
  • The entity formerly named TabPanel is now gpui_base::dock::TabGroup; styled TabPanel is a renderer.
  • The tiles entity is now TilesState; Tiles is its renderer.
  • StackPanel and the public Dock entity were removed. Manage layouts through DockArea and DockPlacement.
  • Placement-specific accessors such as left_dock() and setters such as set_left_dock() were replaced by layout(placement), set_dock, set_dock_size, is_dock_open, and remove_dock.
  • DockEvent::DragDrop(item) is now DockEvent::DragDrop { item, target }, exposing where a host drag item landed. (#2661)

Dialog and chart tooltip construction

  • Dialog::new(window, cx) is now Dialog::new(cx). The declarative dialog API uses trigger, content, DialogHeader, DialogTitle, DialogDescription, and DialogFooter. (#2067)
  • Low-level chart tooltip construction now uses Tooltip::new(cursor, bounds); Tooltip::position() and TooltipPosition were removed. TooltipState::new no longer takes a position argument, and CrossLine is dashed by default. (#2500)

Smaller source-level changes

  • popover_style moved from the StyledExt trait to ThemeStyled. (#2726)
  • ScaleBand categorical domains now require Eq + Hash rather than PartialEq; the bound also applies to the band type used by BarChart and CandlestickChart. (#2885)
  • Boolean readers were normalized: can_go_to_definition() is now has_definition(), while dock readers such as can_zoom() and can_close() are now is_zoomable() and is_closable(). (#2810)
  • The default wrapping indent for multiline editors is now WrappingIndent::Same.
  • Editor now defaults to the theme's monospace font and derives row height from its configured font size. Explicit .font_family() and .text_size() overrides still take precedence. (#2794)

Public seam structs now use builders and accessors

Several public context and snapshot structs now have private fields so they can evolve compatibly. Replace struct literals and direct field reads with their constructors, builders, and accessors. (#2706)

Affected APIs include:

  • InputContextMenuCapabilities
  • InputPresentation
  • CalendarItemState
  • ComboboxTriggerCtx, renamed to ComboboxTriggerContext
  • setting::RenderOptions

For example:

- capabilities.disabled
- capabilities.selection
+ capabilities.is_disabled()
+ capabilities.has_selection()

- CalendarItemState { kind, active, .. }
+ CalendarItemState::new(kind).active(active)

GPUI and package names

  • The workspace now targets the gpui-pre 0.3.x family rather than GPUI 0.2.x, bringing the corresponding upstream GPUI API changes.
  • The assets package is now gpui-kit-assets (Rust path gpui_kit_assets) instead of gpui-component-assets.
  • The project uses Rust edition 2024.

Deprecated APIs

  • animation::Transition is retained as a deprecated alias; use animation::EffectTransition. This is distinct from the new motion::Transition timing policy.
  • EasingError::InvalidBezierX is retained for source compatibility; use EasingError::InvalidBezierControlPoint.
  • AlertDialog::overlay_closable is deprecated because alert dialogs intentionally cannot be dismissed by pressing the backdrop.
  • Root::clear_text_selection and the window text-selection extension methods selected_text, has_text_selection, clear_text_selection, and end_text_selection are deprecated; use the corresponding gpui_base::TextSelection APIs.
  • SearchableListDelegate::section is deprecated; implement render_section_header to receive Window and App access.

Thanks to all contributors

@zanmato @FlyingYu-Z @duanebester @stayhydated @CherryWorm @Moulberry @stippi

And thanks to all our first-time contributors:

Thank you for helping make GPUI Kit better! ❤️