Skip to content

webview: Require GPUI Fast for gpui-webview - #3398

Merged
huacnlee merged 2 commits into
mainfrom
webview-require-gpui-fast
Oct 7, 2026
Merged

huacnlee merged 2 commits into
mainfrom
webview-require-gpui-fast

Conversation

@huacnlee

@huacnlee huacnlee commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Description

On macOS with the default gpui-pre backend, the native WKWebView sits above GPUI's Metal layer, so PopupMenu, dialogs and tooltips that overlap the page are hidden behind it. Only GPUI Fast's window composition places deferred overlays above the native view:

front  GPUI overlay    deferred draws (PopupMenu, Dialog, Tooltip …)
       native surface  WKWebView / X11 child window
back   GPUI base       the root view

gpui-webview now always runs on GPUI Fast:

  • It depends on gpui-kit with default-features = false, features = ["gpui-fast"] instead of on GPUI directly. Feature unification turns on gpui-fast for the application's own gpui-kit, so applications need no manifest change.
  • The gpui-pre code paths and #[cfg(feature = "gpui-fast")] branches are removed; composition is always used on macOS and Linux.
  • The crate's gpui-fast feature is kept as a no-op so manifests that enable it still resolve.
  • examples/webview drops its gpui-fast feature; cargo run -p webview shows the menu above the page.
  • Because gpui-webview turns on gpui-kit/gpui-fast for every member built with it, CI's workspace lint and test, and the bump-gpui.ts kit check, exclude gpui-webview and webview; CI lints them in a separate step and tests gpui-webview in the GPUI Fast job. The rest of the workspace keeps checking gpui-pre.
  • README and WebView docs (en / zh-CN) updated.

cargo publish -p gpui-webview --dry-run fails today because the published gpui-kit 0.7.1 has no gpui-fast feature; it resolves once the next gpui-kit release (which includes #3375) is published together with this crate.

Verified on macOS: the example's "…" dropdown menu renders above the WebView on GPUI Fast.

Breaking Changes

No manifest change is needed, but an application that depends on gpui-webview now runs entirely on GPUI Fast instead of gpui-pre.

Public API

gpui-webview

  • gpui-fast feature — now has no effect; GPUI Fast is always used. Kept for manifest compatibility.

🤖 Generated with Claude Code

huacnlee and others added 2 commits October 7, 2026 20:49
On the gpui-pre backend the native WebView sits above GPUI's Metal layer,
so PopupMenu and other overlays are hidden behind the page on macOS. Only
GPUI Fast's window composition puts deferred overlays above it.

Make gpui-fast a required dependency of gpui-webview, drop the gpui-pre
code paths, and keep the `gpui-fast` feature as a no-op so existing
manifests still resolve. The example always enables `gpui-kit/gpui-fast`;
CI lint and the bump-gpui kit check exclude it so feature unification
does not move the rest of the workspace off gpui-pre.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Depend on gpui-kit with its gpui-fast feature instead of on gpui-fast
directly. Feature unification then turns on GPUI Fast for the
application's own gpui-kit, so applications need no manifest change.

Exclude gpui-webview from the workspace-wide CI lint, test and the
bump-gpui kit check for the same reason, and lint and test it separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@huacnlee huacnlee changed the title webview: Always build gpui-webview on GPUI Fast webview: Require GPUI Fast for gpui-webview Oct 7, 2026
@huacnlee
huacnlee enabled auto-merge (squash) October 7, 2026 12:57
@huacnlee
huacnlee merged commit 917610a into main Oct 7, 2026
16 checks passed
@huacnlee
huacnlee deleted the webview-require-gpui-fast branch October 7, 2026 13:18
trancong12102 added a commit to aislopware/gpui-kit that referenced this pull request Oct 9, 2026
…atest

Leave gpui-webview and its example out of the workspace: longbridge#3398 builds it
on GPUI Fast's window composition and turns on gpui-base's `gpui-fast` feature,
which pulls crates.io gpui-fast 0.1.3 beside the fork; the fork composes windows
its own way. Fill the fork's newer `FrameTiming` fields in the fps sampler's
tests and `momentum_phase` in the Git history example's scroll test, and alias
the Kit as `gpui` in that example, since gpui-fast's macros emit `gpui::` paths
that the gpui-pre snapshot would have rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
linruohan pushed a commit to linruohan/gpui-component that referenced this pull request Oct 9, 2026
## Description

On macOS with the default gpui-pre backend, the native `WKWebView` sits
above GPUI's Metal layer, so `PopupMenu`, dialogs and tooltips that
overlap the page are hidden behind it. Only GPUI Fast's window
composition places deferred overlays above the native view:

```text
front  GPUI overlay    deferred draws (PopupMenu, Dialog, Tooltip …)
       native surface  WKWebView / X11 child window
back   GPUI base       the root view
```

`gpui-webview` now always runs on GPUI Fast:

- It depends on `gpui-kit` with `default-features = false, features =
["gpui-fast"]` instead of on GPUI directly. Feature unification turns on
`gpui-fast` for the application's own `gpui-kit`, so **applications need
no manifest change**.
- The gpui-pre code paths and `#[cfg(feature = "gpui-fast")]` branches
are removed; composition is always used on macOS and Linux.
- The crate's `gpui-fast` feature is kept as a no-op so manifests that
enable it still resolve.
- `examples/webview` drops its `gpui-fast` feature; `cargo run -p
webview` shows the menu above the page.
- Because `gpui-webview` turns on `gpui-kit/gpui-fast` for every member
built with it, CI's workspace lint and test, and the `bump-gpui.ts` kit
check, exclude `gpui-webview` and `webview`; CI lints them in a separate
step and tests `gpui-webview` in the GPUI Fast job. The rest of the
workspace keeps checking gpui-pre.
- README and WebView docs (en / zh-CN) updated.

`cargo publish -p gpui-webview --dry-run` fails today because the
published `gpui-kit` 0.7.1 has no `gpui-fast` feature; it resolves once
the next `gpui-kit` release (which includes longbridge#3375) is published together
with this crate.

Verified on macOS: the example's "…" dropdown menu renders above the
WebView on GPUI Fast.

## Breaking Changes

No manifest change is needed, but an application that depends on
`gpui-webview` now runs entirely on GPUI Fast instead of gpui-pre.

## Public API

### `gpui-webview`

- `gpui-fast` feature — now has no effect; GPUI Fast is always used.
Kept for manifest compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
trancong12102 added a commit to aislopware/gpui-kit that referenced this pull request Oct 9, 2026
…atest

Leave gpui-webview and its example out of the workspace: longbridge#3398 builds it
on GPUI Fast's window composition and turns on gpui-base's `gpui-fast` feature,
which pulls crates.io gpui-fast 0.1.3 beside the fork; the fork composes windows
its own way. Fill the fork's newer `FrameTiming` fields in the fps sampler's
tests and `momentum_phase` in the Git history example's scroll test, and alias
the Kit as `gpui` in that example, since gpui-fast's macros emit `gpui::` paths
that the gpui-pre snapshot would have rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trancong12102 added a commit to aislopware/gpui-kit that referenced this pull request Oct 10, 2026
…atest

Leave gpui-webview and its example out of the workspace: longbridge#3398 builds it
on GPUI Fast's window composition and turns on gpui-base's `gpui-fast` feature,
which pulls crates.io gpui-fast 0.1.3 beside the fork; the fork composes windows
its own way. Fill the fork's newer `FrameTiming` fields in the fps sampler's
tests and `momentum_phase` in the Git history example's scroll test, and alias
the Kit as `gpui` in that example, since gpui-fast's macros emit `gpui::` paths
that the gpui-pre snapshot would have rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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