Skip to content

Upgrade to gpui-base 0.8.0 and adopt its scroll, resizable, input and webview defaults - #922

Merged
Tryanks merged 13 commits into
mainfrom
gpui-base-0.8.0
Oct 21, 2026
Merged

Tryanks merged 13 commits into
mainfrom
gpui-base-0.8.0

Conversation

@Tryanks

@Tryanks Tryanks commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrade to gpui-base 0.8.0 (gpui-fast 0.1.10, gpui-wry → gpui-webview 0.8.0) and adopt what 0.8.0 now provides, per principle 6: upstream defaults are used as they are, and Tcode's own primitives that 0.8.0 closes are removed.

 crates/ui/Cargo.toml          gpui-base 0.7.3 → 0.8.0, gpui-fast 0.1.8 → 0.1.10
-                              gpui-wry 0.7.3
+                              gpui-webview 0.8.0 + gpui-kit (feature selection only)
 crates/{app,ios,android,web,platform/*}/Cargo.toml   gpui-fast 0.1.10, wasm-bindgen 0.2.127

 crates/ui/src/
-├── wheel_easing.rs           # Tcode's wheel-notch easing + nested-viewport routing
 ├── scroll.rs                 # page_viewport: ScrollBounce with upstream defaults
 ├── shell.rs                  # sidebar: resizable_panel().fixed() replaces the restore loop
 │                             # edge-back capture canvas registered before the stack
 ├── widgets/input_configuration.rs   # keyboard intent via upstream builders; keeps the
 │                             # UTF-16 length/selection and iOS paste gaps
 ├── composer/mod.rs           # TextareaState .autocorrect(true).input_action(Enter)
 ├── widgets/{slider,input}.rs # accessibility_label forwarded to Slider / NumberInput
 └── preview_panel/            # WebView::build / set_visible / forward from gpui-webview

Scroll behaviour now follows gpui-base: page viewports bounce on macOS with NSScrollView tuning, ScrollBounce owns wheel input, mouse-wheel notches are no longer eased, and nested bounce areas do not chain to their parent at the edge. Masked areas (Scrollable, ScrollArea, VirtualList) and horizontal strips keep their composition.

Two failures the upgrade exposed were Tcode's: the edge-back capture canvas was registered after the palette's ScrollBounce, which now consumes the release packet; and a hidden right panel occupied an unmeasured slot in the resizable group, which broke sidebar drags. Both are fixed here.

Evidence

  • Before: on the bare dependency bump, cargo nextest run --workspace had 3 failing tests and 1 stalled test (timeline bounce, composer destination draft, edge-swipe sheet, paging stall).
    After: cargo fmt --check, cargo clippy --workspace --all-targets --locked -D warnings, cargo machete, iOS / Android / Web check with -D warnings, and the full workspace suite pass (see the comment below for the final run).
  • Manual on macOS (light + dark, wide + narrow): wheel over sidebar, timeline and composer scrolls the right surface; sidebar keeps its pixel width across window resize, fullscreen entry, collapse/expand and right-panel open; preview loads, back/forward, tab-switch keeps page state; --preview-smoke passes; numeric controls read their labels in the accessibility tree.
  • Not verified: physical trackpad overscroll feel (automation only emits wheel events); GPUI overlays above the native webview after a window zoom were unreliable, so the palette/compact-menu hiding stays.

Merge Danger

Door: two-way

Revert restores 0.7.3 and the removed code; no data or wire changes.

Blast Radius: scrolling

Every scroll surface changes feel on macOS (bounce on, no notch easing, inner areas keep the gesture at their ends); textareas keep the wheel once they overflow. Windows and Linux are not bounce platforms but also lose notch easing. iOS/Android only see the dependency bump.

Move gpui-fast to 0.1.10, rename gpui-wry to gpui-webview, and select gpui-kit gpui-fast for native preview. Align Web wasm-bindgen pins and CLI with wgpu 30 requirements.
Remove Tcode's wheel-notch interceptor so ScrollBounce owns page input. Keep bounded areas masked and use GPUI handles directly.

Exercise timeline bounce with overflowing content at both edges. The paging test stalled by starting new gestures against a displaced edge without advancing its clock; settle pending display frames between gestures while retaining the paging and tail-position assertions.
Register edge-back capture before the content so gpui-base 0.8's
ScrollBounce cannot consume the zero-delta release before the gesture
owner resets its sheet target.

Deliver the host session-status response for the composer test's final
destination switches. The test previously relied on incidental cursor
notifications; reverting only BlinkCursor::start to its 0.7.3 behavior
confirmed the upstream change that exposed the missing test-driver event.
Keep all draft, IME, undo/redo and sheet-rest assertions unchanged.
@Tryanks

Tryanks commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

Final acceptance run on the integrated branch (macOS host):

Summary [  73.776s] 1259 tests run: 1259 passed, 13 skipped

cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings and cargo machete passed on the same tree.

@Tryanks
Tryanks merged commit 3557e2b into main Oct 21, 2026
7 checks passed
@Tryanks
Tryanks deleted the gpui-base-0.8.0 branch October 21, 2026 09:27
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