Repository navigation
Conversation
This was referenced Sep 27, 2026
Closed
Switch the mobile platform and the example from Zed git dependencies to the matching `gpui-pre` / `gpui-pre-wgpu` 0.3.4 crates.io packages (imported as `gpui` / `gpui_wgpu`, so no `use` changes are needed). This removes the `[patch.crates-io]` async-task fork and every git dependency, which makes the crate publishable to crates.io and lets consumers depend on it without reproducing Zed's patches. Adapt to the platform and styling API differences, fix the "wpgu" typo in the crate description, and update the publish workflow to check the iOS backends before publishing and to treat the `dry-run` input as the boolean it is. Test plan: - cargo check --all-targets - cargo check --target aarch64-apple-ios / aarch64-apple-ios-sim - cargo test --lib
Embed GPUI Kit's Markdown TextView in a Swift-owned UIKit window instead of letting GPUI create the iOS example's window. A child controller renders into `GPUITextView: UIView`; native Compact / Expanded controls exercise layout changes. The light English sample puts emphasis, quotes, nested lists, code, tables, and tasks on the first screen. Fix two startup failures exposed by the simulator: supply the UIKit display handle to wgpu 29, and retain the `run_embedded` application handle so native callbacks cannot outlive the GPUI app. Synchronize layout and redraw without implicit animations during size changes. Correct the Xcode static-library paths and build directory. Pins GPUI Kit to commit `7d9efcd2069f9eaa6eb3ba6345aac4aa7d87c9f7` from longbridge/gpui-kit#3045, so a sibling local checkout is not required. No crates are published. The embedding example supports one GPUI view for the application lifetime; independent destruction and multiple instances are not implemented. - Passed `cargo check --manifest-path example/Cargo.toml --target aarch64-apple-ios-sim` with the pinned Git dependency. - Built the Swift app with Xcode for the iOS simulator and ran it on iPhone 17 Pro / iOS 26.5 using the same GPUI Kit source revision locally. - Verified light Markdown rendering, native controls, and Compact / Expanded resizing. - Passed `git diff --check` and `bash -n example/build.sh`. - Embedded scrolling needs manual verification: the automation tool emitted touch begin/end without move events. Transient resize jitter also needs visual confirmation. - No Android, physical-device, or performance testing performed. --------- Co-authored-by: Codex <codex@openai.com>
A released iOS touch currently leaves GPUI's synthetic mouse over the last control, keeping hover feedback active. Clear the pointer hit test and emit MouseExited after touch end/cancellation and momentum frames, while preserving the original position for click and scroll dispatch. Handle UIKit cancellation separately so it never commits a deferred tap or starts a momentum fling. Cancel an active scroll with TouchPhase::Cancelled. Update the example's GPUI Kit revision to include mobile tooltip suppression, tap-triggered HoverCard behavior, and the inline is_mobile helper from longbridge/gpui-kit#3045. - Built the Swift-hosted iOS example for aarch64-apple-ios-sim. - Used a temporary simulator smoke view to check HoverCard opens on tap, remains open when its content is tapped, and closes on outside tap. - Checked a normal ghost button with a configured tooltip: no lingering hover background or tooltip after release. - Restored the original chat example and rebuilt it with the final Kit revision. - GPUI Kit regression tests cover desktop hover and mobile tap interaction. - UIKit cancellation was reviewed in code; no system-cancellation gesture was injected. Android was not changed or tested. No crates published. Co-authored-by: Codex <codex@openai.com>
## Summary Apply the iOS touch cleanup from #3 to Android. After touch release/cancellation and every momentum frame, move the synthetic pointer outside the window and emit MouseExited so hover does not remain on the last control. Preserve original coordinates for click and scroll dispatch. Handle ACTION_CANCEL independently: discard queued coalesced scroll, reset velocity, stop inertia, and emit ScrollWheel(Cancelled) for an active scroll. Never turn cancellation into a tap or fling, and ignore stray moves with no active touch. Add regression tests and update an existing test to use the renamed gpu_specs API. ## Test Plan - Android arm64/API 31 cargo-ndk library check passed. - Built the Android unit-test executable and ran touch tests on an Android API 34 arm64 emulator: 5 passed. - Tests cover tap coordinates, pending-tap cancellation, coalesced-scroll cancellation, and post-momentum hover cleanup. - This verification covers platform event dispatch; Android app UI testing is ongoing separately. Co-authored-by: Codex <codex@openai.com>
huacnlee
force-pushed
the
upstream/04-fix-android-touch-hover-and-cancellation
branch
from
September 27, 2026 12:06
55cc763 to
2f5e4cf
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
Stack 4/13, ported from longbridge/gpui-mobile, where each layer was reviewed and merged as its own PR.
This PR is based on #50. Cross-fork PRs can't use GitHub's stacked PRs or target another PR's branch, so this diff includes every layer below it. Please review only the top commit (2f5e4cf), and merge the stack bottom-up.
Summary
Apply the iOS touch cleanup from #50 to Android. After touch release/cancellation and every momentum frame, move the synthetic pointer outside the window and emit MouseExited so hover does not remain on the last control. Preserve original coordinates for click and scroll dispatch.
Handle ACTION_CANCEL independently: discard queued coalesced scroll, reset velocity, stop inertia, and emit ScrollWheel(Cancelled) for an active scroll. Never turn cancellation into a tap or fling, and ignore stray moves with no active touch.
Add regression tests and update an existing test to use the renamed gpu_specs API.
Test Plan
🤖 Generated with Claude Code