Repository navigation
Update Rust crate gpui-kit to 0.8.1 - #93
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/gpui-kit-0.x
branch
from
October 26, 2026 10:05
7ffa548 to
dfc90f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
0.7.3→0.8.1Release Notes
longbridge/gpui-kit (gpui-kit)
v0.8.1Compare 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
MotionTokensfield 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
set_scrollbar_rendererlets an application supply its editor scrollbar presentation usingEditorScrollbarContext. (#3644)Markdown and text rendering
inline_code_style,list_styleandblockquote_stylerefine the corresponding text presentation while inheriting unspecified properties from the resolved style. (#3663, #3687)image_sourceto resolve document images consistently for measurement and rendering. (#3694)Diff
DiffFile::parse_withandDiffParseOptions::truncated_hunksaccept incomplete hunks without relaxing the default parser.DiffFile::is_truncatedidentifies affected files; unified file boundaries and empty-hunk ordering remain validated. (#3688)with_syntax_highlighter,set_syntax_highlighterandclear_syntax_highlighterlet an application provide its own highlighting without resetting selection or scrolling. (#3618)Scrolling and layout
last_horizontal_scroll_claimexposes the last horizontal scroll step consumed by a mask. Resizable dividers read the active drag state when events arrive. (#3621, #3629)on_prepaintreports bounds from the element's corner, aligning geometry callbacks with their intended coordinate origin. (#3689)Components
Dialog::centeredandAlertDialog::centeredcenter the surface vertically; exit animation matches entrance animation. Sheets and notifications avoid system bars and the software keyboard. (#3635, #3603, #3624)track_focusaccepts an application-owned handle. Disabling a focused button preserves the focus binding so Tab can still leave it in either direction. (#3684, #3606)TableDelegate::cell_label. (#3617, #3667)trigger_styleapplies layout styling to the trigger container. (#3653)Shell and localization
The release also prepares
gpui-shellfor crates.io publication with matchingquickjs-jit,quickjs-jit-runtimeandquickjs-jit-stdlib0.14.1 registry dependencies.accessibility_labelsupplies an accessible name independently of the visible label. (#3665)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()andModifiers::secondary_key()now require&App.Keystroke::parseandKeyBinding::newrequire static strings. Dynamic strings andsecondarymodifiers use OS-aware parsing/loading.Keystroke::unparseandKeybindingKeystroke::unparserequire anOperatingSystemargument.PlatformInput::ScrollWheelbecomesPlatformInput::Scroll; scroll event literals gain asourcefield.Use
cx.platform_info().osfor OS-aware parsing/formatting and passcxto modifier helpers. UseKeyBinding::load(..., cx)for dynamic keybindings or choose explicitcmd/ctrlliterals withKeyBinding::new.Thank you to everyone who contributed code, documentation, testing, and feedback!
What's Changed
StackPanelas an empty split by @obito-t in #3610New Contributors
Full Changelog: longbridge/gpui-kit@v0.8.0...v0.8.1
v0.8.0Compare 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
gpui-shell; package them withbundle, and usedevfor reloading during development. (#3464, #3487)gpui-webviewon 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
gpui_kit::base::text::editor_hostlets an editor render aBlockNodetree through TextView and collect keyed leaf geometry while retaining its own document model, selection, commands and undo. (#3580)syntectfeature for a lighter highlighter with bat’s syntax collection; tree-sitter takes precedence when both are enabled. (#3512)Lsp::with_completion_highlighterorset_completion_highlighterwithhighlight_prefix,highlight_contains,highlight_characters, or a host callback returning byte ranges. (#3496)display_map()andprewrap(...)are available on InputState and TextareaState as well as EditorState.Editor::sizesupports the shared control sizes. (#3483, #3495, #3564, #3480)input_action,autocorrectandautocapitalize; masked fields are identified as passwords, and clear/mask controls have accessible names. (#3557, #3555, #3554, #3562)clean_on_escapeis enabled. (#3584, #3556)Markdown and text rendering
SelectionFormat::SourceAcrossStylescopies plain text within a single style and Markdown source across styles. (#3517)<br>creates a line break, and<pre>/<pre><code>preserve their text and whitespace through HTML minification. (#3569, #3570, #3581)Scrolling and motion
ScrollableMask::vertical_wheelmaps a plain mouse wheel to horizontal scrolling and chains to the parent at the edge. (#3518)Components
fit_col, with widths supplied byTableDelegate::fit_column; inspect the result withcol_width. Configurefixed_cols_border,select_on_modifier_clickandfocus_ring. (#3489, #3482, #3523, #3565)resize_handlefor application-owned handles andResizablePanel::fixedto preserve a panel’s size when its container changes. (#3302, #3478)DockToggleEventto distinguish user-driven dock toggles. (#3546)MessageScrollerState::logical_scroll_top. (#3485)accessibility_label; settings fields inherit their setting’s title. (#3443, #3531, #3494, #3524, #3582)TabVariant::Folderadds a folder presentation. (#3568, #3574, #3415)Shell APIs
gpui_shell::components::registry()returns the unfrozen component catalog for host additions. Registered state objects supportrelease()so applications can promptly dispose of retained resources. (#3542, #3544)with_follow_mode("tail")andon_visible_range_change; item-count changes preserve the reader’s position. MessageScrollerState exposes append/prepend/splice, measurement and scrolling operations. (#3548, #3549, #3547, #3541)set_submit_on_enterfor message composers. (#3532, #3550)Breaking Changes
Support Linux on X11 and rename the crate to gpui-webview (#3395)
The crate is renamed from
gpui-wrytogpui-webview.On Linux, applications using the WebView must start on X11:
Support gpui-pre and make
gpui-fastoptional again (#3591)Applications that relied on
gpui-webviewswitching them to GPUI Fast must now select GPUI Fast ongpui-kitand enable the WebView feature with it, to keep overlays above the page on macOS and Linux:Without both they build on gpui-pre; with only one of them,
gpui-webviewfails to compile and names the missing feature.Add SelectionFormat::SourceAcrossStyles (#3517)
SelectionFormatis 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_dragwas#[doc(hidden)]; its constructor now takes&Tinstead ofRc<T>: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.
ScrollBounceis enabled by default on macOS. Onmainit was enabled only on iOS and Android. AScrollBouncecreated without.enabled(..)now bounces on macOS too. To keep it still:2.
ScrollBounceowns vertical wheel scrolling by default. Onmain, 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:3.
ScrollBounceMotion::default()changes on macOS, Windows and Linux. The defaults are now tuned to match NSScrollView, replacing the UIScrollView tuning:trackinggoes from 0.55 to 0.075.responsegoes from 524 ms to ≈503 ms.iOS and Android are unchanged. To keep the previous feel:
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. Onmainnone of them did. Each one that has a builder can turn it off: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:Neither happens now. Sidebar, Diff, MessageScroller, the settings page and TextView have no
scroll_bouncebuilder; 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
Foldervariant (#3415)TabVariantis not#[non_exhaustive], so exhaustive matches need the new arm:match variant { ... + TabVariant::Folder => ..., }Keep cubic-bezier anticipation and overshoot in Easing (#3432)
Easing::samplestaying within[0, 1]for an out-of-range cubic-bezier curve now sees overshoot: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_rowno longer stops event propagation. Custom handlers that require it must callcx.stop_propagation()explicitly.Skip the notify in
set_line_numberwhen nothing changes (#3475)In a code editor,
set_line_numberno 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_searchableno 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
bundleto package an application, and adevcommand (#3487)--devno longer implies--watchor a debug log.devis the command that reloads.InvocationKindgains a variant, so an exhaustivematchover it needs aBundlearm.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 manifestid, the same place the installed copy uses, instead of<dir>-<hash>. Data written by earlier development runs stays in the old directory.process.envwas absent before; scripts that feature-detected it withtypeof 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, sogpui-shell listreports 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.
Nested context-menu callers keep the same construction. The corrected interaction is:
Add find_all and configurable clicks to the UI test harness (#3384)
TestWindowExtgains two required methods:find_allandclick_with_options.Downstream implementations must implement both.
click_with_modifiershas a defaultimplementation through
click_with_options. Call sites continue to import onlyTestWindowExtfor 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
TooltipDefaultsby @madcodelife in #3376Foldervariant by @madcodelife in #3415set_selected_rowby @shreeve in #3469set_line_numberwhen nothing changes by @shreeve in #3475ResizablePanel::fixedto keep a panel's size on container resizes by @shreeve in #3478Editortake a size, asTextareadoes by @shreeve in #3480logical_scroll_topto read the reading position by @UncertaintyDeterminesYou4ndMe in #3485bundleto package an application, and adevcommand by @huacnlee in #3487DataTable::fixed_cols_borderby @shreeve in #3482EditorState::wrap_row_countandprewrapby @shreeve in #3483Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.