From 9932ad018d02f69110a9ba72c676b01542ee13d4 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Wed, 22 Apr 2026 21:26:35 -0700 Subject: [PATCH 01/13] add touch tap+click guidance for custom trigger elements in Agents (#312001) --- .github/instructions/sessions.instructions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/instructions/sessions.instructions.md b/.github/instructions/sessions.instructions.md index 6dec29dbb1c85..69f15894b95cf 100644 --- a/.github/instructions/sessions.instructions.md +++ b/.github/instructions/sessions.instructions.md @@ -17,4 +17,5 @@ When working on files under `src/vs/sessions/`, use these skills for detailed gu The Agents window can run on touch-capable platforms (notably iOS). Follow these rules for all DOM interaction code: - Do not use `EventType.MOUSE_DOWN`, `EventType.MOUSE_UP`, or `EventType.MOUSE_MOVE` with `addDisposableListener` directly — on iOS, these events don't fire because the platform uses pointer events. Use `addDisposableGenericMouseDownListener`, `addDisposableGenericMouseUpListener`, or `addDisposableGenericMouseMoveListener` instead, which automatically select the correct event type per platform. +- For custom clickable elements (e.g. picker triggers, title bar pills, or other `
`/`` elements styled as buttons) that open pickers or menus on click, listen to **both** `EventType.CLICK` and `TouchEventType.Tap` and call `Gesture.addTarget` on the element. On touch devices, including iOS, VS Code relies on the gesture system to emit `TouchEventType.Tap`, and `EventType.CLICK` alone may not reliably fire there. The base `Button` class already does this correctly, so this rule applies to custom non-`