Skip to content

Update Rust crate gpui-kit to 0.8.1 - #93

Merged
kauri-off merged 1 commit into
masterfrom
renovate/gpui-kit-0.x
Oct 31, 2026
Merged

kauri-off merged 1 commit into
masterfrom
renovate/gpui-kit-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Type Update Change
gpui-kit (source) dependencies minor 0.7.3 → 0.8.1

Release Notes

longbridge/gpui-kit (gpui-kit)

v0.8.1

Compare Source

GPUI Kit v0.8.1

GPUI Kit 0.8.1 improves text selection, Markdown rendering, editor layout, scrolling, focus and accessibility. It also adds compatible customization APIs for text rendering, editor scrollbars and Diff parsing and highlighting.

To preserve Kit-owned API compatibility with v0.8.0, this patch defers the MotionTokens field additions from #​3616 and the Textarea associated-type change from #​2842. Behavior fixes remain included. The default backend is pinned to gpui-pre 0.3.10, and the optional GPUI Fast backend uses 0.1.12. These upstream snapshots change several GPUI APIs re-exported by Kit; see the migration notes below.

Editor and text input

  • Tab stops: code-editor tabs align to the configured tab stops during measurement, wrapping and painting. Horizontal scroll extents follow laid-out text widths. (#​3622, #​3604)
  • Custom scrollbars: set_scrollbar_renderer lets an application supply its editor scrollbar presentation using EditorScrollbarContext. (#​3644)
  • Focused inputs ask surrounding scroll containers to reveal them, taps request the software keyboard, and accessibility semantics follow the actual editor focus. (#​3625, #​3623, #​3585)

Markdown and text rendering

  • Selection: publish selection snapshots once per frame to avoid invalidating unrelated retained views. Double- and triple-click drags and subsequent Shift-clicks extend selections by words, lines or paragraphs, including paragraphs with hard breaks. Drags starting inside a table cell stay in that cell. (#​3686, #​3681, #​3646)
  • Text styles: inline_code_style, list_style and blockquote_style refine the corresponding text presentation while inheriting unspecified properties from the resolved style. (#​3663, #​3687)
  • Image sources: Component TextView exposes image_source to resolve document images consistently for measurement and rendering. (#​3694)
  • Preserve sparse Markdown table rows and release shaped text retained by dropped TextViews on the next frame. (#​3673, #​3628)

Diff

  • Truncated patches: DiffFile::parse_with and DiffParseOptions::truncated_hunks accept incomplete hunks without relaxing the default parser. DiffFile::is_truncated identifies affected files; unified file boundaries and empty-hunk ordering remain validated. (#​3688)
  • Syntax highlighting: with_syntax_highlighter, set_syntax_highlighter and clear_syntax_highlighter let an application provide its own highlighting without resetting selection or scrolling. (#​3618)

Scrolling and layout

  • Scrollable regions can scroll content beyond their maximum size. Bounce handling avoids rounding-induced overscroll and false overscroll at large offsets, and release inertia applies only to stretched edges. (#​3613, #​3632, #​3661, #​3631)
  • last_horizontal_scroll_claim exposes the last horizontal scroll step consumed by a mask. Resizable dividers read the active drag state when events arrive. (#​3621, #​3629)
  • on_prepaint reports bounds from the element's corner, aligning geometry callbacks with their intended coordinate origin. (#​3689)

Components

  • Dialog: Dialog::centered and AlertDialog::centered center the surface vertically; exit animation matches entrance animation. Sheets and notifications avoid system bars and the software keyboard. (#​3635, #​3603, #​3624)
  • Button: track_focus accepts an application-owned handle. Disabling a focused button preserves the focus binding so Tab can still leave it in either direction. (#​3684, #​3606)
  • DataTable: honor centered and right-aligned columns; expose table structure and cell labels to assistive technology through TableDelegate::cell_label. (#​3617, #​3667)
  • Toolbar: grow with taller content and preserve focus when blank toolbar space is clicked. (#​3651, #​3652)
  • HoverCard: trigger_style applies layout styling to the trigger container. (#​3653)
  • ColorPicker: preserve the first hex edit after a programmatic value update and round color channels instead of truncating them. (#​3641, #​3640)
  • TimeField: pressing outside a segment focuses the first segment. Command applies empty-list padding only while its empty state is visible. (#​3655, #​3654)
  • Focus trap: stop Tab traversal at the first repeated stop. Dock restores legacy empty StackPanel layouts as empty splits. (#​3642, #​3610)

Shell and localization

The release also prepares gpui-shell for crates.io publication with matching quickjs-jit, quickjs-jit-runtime and quickjs-jit-stdlib 0.14.1 registry dependencies.

  • Shell Button: accessibility_label supplies an accessible name independently of the visible label. (#​3665)
  • Add Brazilian Portuguese translations and preserve valid Portuguese words in spell checking. (#​3638, #​3664)

Upstream GPUI compatibility

The updated GPUI snapshots change public APIs re-exported at the Kit root. Internal compilation checks and Kit API checks do not preserve these upstream signatures:

  • Modifiers::secondary() and Modifiers::secondary_key() now require &App.
  • Keystroke::parse and KeyBinding::new require static strings. Dynamic strings and secondary modifiers use OS-aware parsing/loading.
  • Keystroke::unparse and KeybindingKeystroke::unparse require an OperatingSystem argument.
  • PlatformInput::ScrollWheel becomes PlatformInput::Scroll; scroll event literals gain a source field.

Use cx.platform_info().os for OS-aware parsing/formatting and pass cx to modifier helpers. Use KeyBinding::load(..., cx) for dynamic keybindings or choose explicit cmd/ctrl literals with KeyBinding::new.

Thank you to everyone who contributed code, documentation, testing, and feedback!

What's Changed

New Contributors

Full Changelog: longbridge/gpui-kit@v0.8.0...v0.8.1

v0.8.0

Compare Source

GPUI Kit 0.8.0 adds an installable JavaScript Shell runtime, Linux WebView support, and a public rendering boundary for external editors. It also adds lighter syntax highlighting with syntect, native-style scroll bounce, richer completion highlighting, and improvements to text selection, tables, focus and accessibility.

Runtime and platforms

  • Shell runtime: run and scaffold JavaScript applications with gpui-shell; package them with bundle, and use dev for reloading during development. (#​3464, #​3487)
  • WebView: use gpui-webview on macOS, Windows and Linux X11/XWayland. GPUI Fast enables overlays above native pages on macOS and Linux; bounds and clipping updates preserve the page viewport. (#​3395, #​3499, #​3591)

This release updates the optional GPUI Fast backend to 0.1.10. The default backend remains pinned to gpui-pre 0.3.9, the latest published snapshot. The WebAssembly example uses wasm-bindgen 0.2.127 to match the updated backend dependency graph.

Editor and text input

  • External editors: gpui_kit::base::text::editor_host lets an editor render a BlockNode tree through TextView and collect keyed leaf geometry while retaining its own document model, selection, commands and undo. (#​3580)
  • Syntax highlighting: enable the syntect feature for a lighter highlighter with bat’s syntax collection; tree-sitter takes precedence when both are enabled. (#​3512)
  • Completion highlighting: configure Lsp::with_completion_highlighter or set_completion_highlighter with highlight_prefix, highlight_contains, highlight_characters, or a host callback returning byte ranges. (#​3496)
  • Wrapping: display_map() and prewrap(...) are available on InputState and TextareaState as well as EditorState. Editor::size supports the shared control sizes. (#​3483, #​3495, #​3564, #​3480)
  • Software keyboards: configure input_action, autocorrect and autocapitalize; masked fields are identified as passwords, and clear/mask controls have accessible names. (#​3557, #​3555, #​3554, #​3562)
  • Fixed caret clipping in one-row viewports, caret visibility during reflow and height changes, vertical scroll clamping, scrollbar reach in auto-growing textareas, and caret crispness on click. (#​3583, #​3477, #​3527, #​3515)
  • Custom Find queries and case changes start near the viewport; an unchanged query retains its active occurrence. Android’s Back button keeps entered text when clean_on_escape is enabled. (#​3584, #​3556)

Markdown and text rendering

  • Selection format: SelectionFormat::SourceAcrossStyles copies plain text within a single style and Markdown source across styles. (#​3517)
  • Copy uses the current gesture before repaint, including virtualized rich content. Unmounting a selection endpoint retires the old selection, so retaining and remounting a TextView cannot revive it. (#​3589, #​3588)
  • HTML <br> creates a line break, and <pre> / <pre><code> preserve their text and whitespace through HTML minification. (#​3569, #​3570, #​3581)

Scrolling and motion

  • Scroll bounce: precise scrolling uses a shared boundary-bounce engine, enabled by default on macOS, iOS and Android. Desktop motion follows NSScrollView; ordinary line-wheel input does not bounce. Nested areas retain their own gestures. (#​3500, #​3484)
  • Horizontal strips: ScrollableMask::vertical_wheel maps a plain mouse wheel to horizontal scrolling and chains to the parent at the edge. (#​3518)
  • Cubic-bezier easing preserves anticipation and overshoot, and transitions and presence retain duration precision. (#​3432, #​3590)

Components

  • DataTable: fit a column by double-clicking its resize handle or calling fit_col, with widths supplied by TableDelegate::fit_column; inspect the result with col_width. Configure fixed_cols_border, select_on_modifier_click and focus_ring. (#​3489, #​3482, #​3523, #​3565)
  • DataTable: Home/End select the first/last row in row mode; row selection preserves event propagation, and default column resizing is capped at 1200px while preserving explicitly assigned initial widths. (#​3471, #​3469, #​3472)
  • Resizable: use the standalone resize_handle for application-owned handles and ResizablePanel::fixed to preserve a panel’s size when its container changes. (#​3302, #​3478)
  • Dock: subscribe to DockToggleEvent to distinguish user-driven dock toggles. (#​3546)
  • MessageScroller: read the current reading position through MessageScrollerState::logical_scroll_top. (#​3485)
  • Select: keyboard confirmation and reconciliation of changed items preserve the intended selection. (#​3446)
  • Focus and accessibility: focus traps preserve containment and accessibility; disabled controls report their disabled state; sliders can be named with accessibility_label; settings fields inherit their setting’s title. (#​3443, #​3531, #​3494, #​3524, #​3582)
  • Tooltip: switching between triggers is direction-independent; a pressed trigger remains dismissed until the pointer leaves, and removing a trigger dismisses its tooltip. (#​3501, #​3492, #​3528)
  • Popover: keyboard activation inside content remains available. (#​3586)
  • TabBar: overflow-menu actions call the tab’s own handler, the sliding indicator appears after the first frame, and TabVariant::Folder adds a folder presentation. (#​3568, #​3574, #​3415)
  • Tree: selection and toggling happen on click rather than mouse-down. (#​3567)

Shell APIs

  • Extensible catalog: gpui_shell::components::registry() returns the unfrozen component catalog for host additions. Registered state objects support release() so applications can promptly dispose of retained resources. (#​3542, #​3544)
  • Lists and transcripts: script lists support with_follow_mode("tail") and on_visible_range_change; item-count changes preserve the reader’s position. MessageScrollerState exposes append/prepend/splice, measurement and scrolling operations. (#​3548, #​3549, #​3547, #​3541)
  • Script components: the catalog includes WebView/WebViewState, and Base TextareaState exposes set_submit_on_enter for message composers. (#​3532, #​3550)
  • Runtime compatibility: scripts gain gradient backgrounds and custom shadows, more browser/Node-compatible runtime APIs, and corrected filesystem link handling. Script errors report their cause, and launching a window on Wayland no longer crashes during activation. (#​3534, #​3505, #​3510, #​3561, #​3509, #​3508)

Breaking Changes

Support Linux on X11 and rename the crate to gpui-webview (#​3395)

The crate is renamed from gpui-wry to gpui-webview.

 [dependencies]
-gpui-wry = "0.7.1"
+gpui-webview = "0.7.1"
-use gpui_wry::WebView;
+use gpui_webview::WebView;

On Linux, applications using the WebView must start on X11:

-gpui_kit::application().run(|cx| { /* ... */ });
+#[cfg(target_os = "linux")]
+let app = gpui_kit::platform::linux(WindowingModes::X11);
+#[cfg(not(target_os = "linux"))]
+let app = gpui_kit::application();
+app.run(|cx| { /* ... */ });
Support gpui-pre and make gpui-fast optional again (#​3591)

Applications that relied on gpui-webview switching them to GPUI Fast must now select GPUI Fast on gpui-kit and enable the WebView feature with it, to keep overlays above the page on macOS and Linux:

 [dependencies]
-gpui-kit = "0.7"
-gpui-webview = "0.7"
+gpui-kit = { version = "0.7", features = ["gpui-fast"] }
+gpui-webview = { version = "0.7", features = ["gpui-fast"] }

Without both they build on gpui-pre; with only one of them, gpui-webview fails to compile and names the missing feature.

Add SelectionFormat::SourceAcrossStyles (#​3517)

SelectionFormat is not #[non_exhaustive], so code that matches it exhaustively needs an arm for the new variant.

 match format {
     SelectionFormat::Plain => ...,
     SelectionFormat::Source => ...,
+    SelectionFormat::SourceAcrossStyles => ...,
 }
Let an application build its own resize handle (#​3302)

ResizeHandle::on_drag was #[doc(hidden)]; its constructor now takes &T instead of Rc<T>:

- .on_drag(DragPanel, |drag, _, _, cx| cx.new(|_| drag.deref().clone()))
+ .on_drag(DragPanel, |drag, _, _, cx| cx.new(|_| drag.clone()))
Bounce scrollable content like NSScrollView, by default on macOS (#​3500)

No existing signature changes. Every existing call still compiles. Four defaults change behavior, compared with main:

1. ScrollBounce is enabled by default on macOS. On main it was enabled only on iOS and Android. A ScrollBounce created without .enabled(..) now bounces on macOS too. To keep it still:

- ScrollBounce::new(id, &handle, child)
+ ScrollBounce::new(id, &handle, child).enabled(false)

2. ScrollBounce owns vertical wheel scrolling by default. On main, the child scrolled itself and the wrapper only stretched the deltas the child left unused. Now the wrapper scrolls the handle itself, through the shared engine. Code that relied on the child-owned mode, such as touch emulation or synthesized drags, must ask for it:

- ScrollBounce::new(id, &handle, child).enabled(true)
+ ScrollBounce::new(id, &handle, child).enabled(true).scroll_wheel(false)

3. ScrollBounceMotion::default() changes on macOS, Windows and Linux. The defaults are now tuned to match NSScrollView, replacing the UIScrollView tuning:

  • tracking goes from 0.55 to 0.075.
  • response goes from 524 ms to ≈503 ms.
  • The stretch is capped at 36 px.

iOS and Android are unchanged. To keep the previous feel:

- ScrollBounce::new(id, &handle, child)
+ ScrollBounce::new(id, &handle, child).motion(
+     ScrollBounceMotion::default()
+         .with_tracking(0.55)
+         .with_response(Duration::from_millis(524)),
+ )

4. Scrollable components scroll differently.

  • They bounce on macOS. Scrollable (overflow_y_scrollbar()), List, DataTable, Tree, Select, Command, Textarea, Editor, Sidebar, Diff, MessageScroller, the settings page and scrollable TextView now bounce on precise scrolling. On main none of them did. Each one that has a builder can turn it off:

    - List::new(&state)
    + List::new(&state).scroll_bounce(false)
  • Nested areas no longer scroll together, on every platform. The innermost area under the pointer takes the whole gesture, including at its ends. On main:

    • Nested GPUI scroll divs scrolled together.
    • MessageScroller handed the wheel to an ancestor scroller once it reached an end.

    Neither happens now. Sidebar, Diff, MessageScroller, the settings page and TextView have no scroll_bounce builder; they always follow the platform default.

Everything else listed under Public API is new in this PR, and so additive.

Keep a scroll over text that can scroll, even at its end (#​3484)

Scrolling over a textarea or editor whose text can scroll no longer reaches the page around it once the text is at its end: the rest of that swipe, its momentum, and later wheel flicks over the text stay in the input. Text that fits, and vertical scrolling over a single-line input, still scroll the page. No setting restores the old behavior; to scroll the page, move the pointer off the input.

Add Folder variant (#​3415)

TabVariant is not #[non_exhaustive], so exhaustive matches need the new arm:

 match variant {
     ...
+    TabVariant::Folder => ...,
 }
Keep cubic-bezier anticipation and overshoot in Easing (#​3432)
  • Code that relied on Easing::sample staying within [0, 1] for an out-of-range cubic-bezier curve now sees overshoot:
- let alpha = easing.sample(delta);
+ let alpha = easing.sample(delta).clamp(0., 1.);
Select the first or last row on Home and End in row mode (#​3471)

In row mode, Home and End select the first or last row instead of the first or last column. No setting restores the old behavior: Left and Right still move to a column, and a host that wants Home and End to pick a column can select one with set_selected_col.

Don't stop event propagation in set_selected_row (#​3469)

TableState::set_selected_row no longer stops event propagation. Custom handlers that require it must call cx.stop_propagation() explicitly.

Skip the notify in set_line_number when nothing changes (#​3475)

In a code editor, set_line_number no longer notifies when the line numbers are already as asked. A caller that relied on that call to re-render the editor notifies it itself:

  state.set_line_number(true, window, cx);
+ cx.notify();
Notify from set_searchable only when it changes (#​3576)

ListState::set_searchable no longer notifies when the list is already searchable or not as asked. A caller that relied on that call to re-render the list notifies it itself:

  list.set_searchable(true, cx);
+ cx.notify();
Add bundle to package an application, and a dev command (#​3487)

--dev no longer implies --watch or a debug log. dev is the command that reloads.

- gpui-shell run -d app --dev
+ gpui-shell dev -d app          # reload + debug log
+ gpui-shell dev -d app --dev    # … and the relaxed sandbox, as before

InvocationKind gains a variant, so an exhaustive match over it needs a Bundle arm.

  match gpui_shell::host::parse_invocation(arguments)? {
      InvocationKind::Run => …,
+     InvocationKind::Bundle => …,
      …
  }
Fix the runtime gaps found by the gpui-shell benchmark apps (#​3505)

gpui-shell run -d <dir> with a manifest now stores data under the manifest id, the same place the installed copy uses, instead of <dir>-<hash>. Data written by earlier development runs stays in the old directory.

process.env was absent before; scripts that feature-detected it with typeof process.env === "undefined" now see an object.

Capabilities' read and write roots for a local run now include the manifest's roots rather than only the app and data directories, so gpui-shell list reports a wider grant for manifests that ask for one.

Extend UI testing with semantic queries and Linux rendering (#​3402)

Existing pointer helpers now retain held modifiers. Callers that deliberately require an unmodified click while modifiers are held can request it explicitly; ordinary calls and signatures remain valid.

- window.click("save", cx); // previously reset held modifiers implicitly
+ window.click_with_options("save", ClickOptions::new(), cx); // explicitly unmodified, then restores held state

Nested context-menu callers keep the same construction. The corrected interaction is:

- window.right_click("inner-trigger", cx); // both inner and ancestor menus opened
+ window.right_click("inner-trigger", cx); // only the innermost menu opens
Add find_all and configurable clicks to the UI test harness (#​3384)

TestWindowExt gains two required methods: find_all and click_with_options.
Downstream implementations must implement both. click_with_modifiers has a default
implementation through click_with_options. Call sites continue to import only
TestWindowExt for all window queries and interactions.

 impl TestWindowExt for MyTestWindow {
     // Existing methods remain.
+    fn find_all(&self, id: impl Into<ElementId>) -> Vec<ElementSnapshot> {
+        self.window.find_all(id)
+    }
+    fn click_with_options(&mut self, id: impl Into<ElementId>, options: ClickOptions, cx: &mut App) {
+        self.window.click_with_options(id, options, cx);
+    }
 }

Thank you to everyone who contributed code, documentation, testing, and feedback!

What's Changed

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 6am on monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/gpui-kit-0.x branch from 7ffa548 to dfc90f6 Compare October 26, 2026 10:05
@renovate renovate Bot changed the title Update Rust crate gpui-kit to 0.8.0 Update Rust crate gpui-kit to 0.8.1 Oct 26, 2026
@kauri-off
kauri-off merged commit b701e38 into master Oct 31, 2026
2 checks passed
@kauri-off
kauri-off deleted the renovate/gpui-kit-0.x branch October 31, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant