Skip to content

QA: no way to test touch controls or mobile Safari (touch input, WebKit, iOS Simulator) #3058

Open

Description

@capy-ai

Summary

gstack's QA and browse workflows can't test touch controls. responsive and the design-review captures only resize a Chromium viewport (Emulation.setDeviceMetricsOverride). Nothing in gstack can send touches, run Safari's engine (WebKit), or drive a real mobile browser. So for a phone or tablet feature, /qa can show what the page looks like at phone size, but not whether it works on a phone.

What happened

I was adding on-screen touch controls to a browser game (garrytan/bel-doom#4): a floating stick on the left half of the screen, plus FIRE, USE and strafe buttons, with multi-touch (run, turn and fire at once). gstack 1.91.27.0 had nothing for this, so I built three harnesses by hand:

  1. Playwright WebKit and Chromium with device descriptors (devices['iPhone 15'], 'iPad Pro 11', 'Pixel 7', 'Galaxy Tab S4', portrait and landscape): pointer: coarse, hasTouch, safe areas and dvh layout, and a screenshot of each.
  2. Multi-touch through CDP (Input.dispatchTouchEvent with several touchPoints) on Chromium, to check that two fingers held at once give the union of their keys and that lifting one finger releases only its own keys. Playwright's WebKit has no multi-touch API, so there I had to dispatch synthetic PointerEvents.
  3. Real iOS Safari in the Xcode iOS Simulator on the paired Mac, through safaridriver (safari:useSimulator, safari:deviceUDID) and W3C actions with pointerType: 'touch', plus xcrun simctl io <udid> screenshot.

Number 3 was the only real-browser check, and it turned up several quirks that a skill should already know:

  • Lifting a finger. pointerUp is delivered only when the input state is released (DELETE /session/:id/actions). In an action chain that ends in pointerUp, the page sees pointerdown and the moves; the up arrives at the release, at (0,0).
  • Gesture boundaries. A pointerMove sent as a separate actions call after the finger is down shows up as an up then a down at the new spot. So the reliable pattern is one action chain per gesture (down, moves, up), then read the page state, then DELETE /actions.
  • One finger only. Two pointer sources in one actions call don't produce two simultaneous touches, so multi-touch on real iOS Safari can't be automated this way.
  • Element clicks. element/click produced a touch move but no pointerdown/click on the button, so taps have to be coordinates from getBoundingClientRect.
  • Second simulator. With an iPhone simulator already booted, starting a session on an iPad simulator timed out ("Finding or launching a compatible remote Safari and waiting for its RWIApplication to appear"). It probably needs Safari launched on that device first, or the other simulator shut down.
  • Fullscreen. document.fullscreenEnabled was true in iOS 18.7 Safari, and requestFullscreen() from a touch worked: the viewport grew from 714 to 874 CSS px tall. The assumption that "iPhone Safari has no fullscreen" is out of date.

Proposal

  • A touch-aware browse mode. $B device "iPhone 15" (descriptor: viewport, DPR, hasTouch, mobile UA), plus $B tap x y | selector, $B swipe, $B pinch, and $B touch for multi-finger sequences (CDP Input.dispatchTouchEvent on Chromium).
  • WebKit as an engine choice for browse and QA, through Playwright WebKit (on Linux it needs playwright install-deps webkit), so Safari layout and event bugs show up in cloud QA.
  • /qa --mobile. When Xcode is present (on a paired Mac), run the flow in real iOS Safari via safaridriver and simctl, with the quirks above built in: one chain per gesture, release to lift, coordinate taps, and boot or launch Safari before creating a session. Report that multi-touch can't be automated there instead of skipping it silently. Use an Android emulator when the SDK is present.
  • A QA report section for touch. Devices and engines covered, gestures exercised, what's emulated versus a real browser, and what still needs a human on a physical device.

Environment

  • Capy cloud machine (Ubuntu 24.04, Node 24, Playwright 1.63, WebKit 2359), plus a paired M4 Max Mac (Xcode, iOS 26.5 simulator runtime with Safari reporting iOS 18.7, safaridriver).
  • gstack 1.91.27.0.

Activity

  1. capy-ai commented on Oct 11, 2026

    @capy-ai
    ContributorAuthor

    Thanks @app/capy-ai for the idea. In the Oct 11 triage we grouped the open feature requests by theme so related asks get built together instead of one at a time. This one is part of the Browser and mobile QA theme in TODOS.md (https://github.com/garrytan/gstack/blob/50d020ad9/TODOS.md#L54-L69). Closing it here so the open list stays actionable; it isn't rejected, and the theme credits every linked reporter when it's picked up.

  2. added
    parked
    on Oct 25, 2026
  3. capy-ai commented on Oct 25, 2026

    @capy-ai
    ContributorAuthor

    Reopened under the parked label: this is tracked in the Browser and mobile QA theme in TODOS.md (https://github.com/garrytan/gstack/blob/main/TODOS.md#p3-feature-themes-from-the-wave-9-triage-filed-2026-10-11), and what fixes it is the next browser-engine wave, which takes the theme as a whole. Closed-but-tracked read as closed, so parked issues now stay open until they ship, are duplicates, or are declined (https://github.com/garrytan/gstack/blob/main/docs/triage.md).

  4. added
    S3
    enhancement
    on Oct 31, 2026
  5. added 5 commits that reference this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S3enhancementparked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions