Files
paseo/packages/app/e2e/mobile/usage-drag
Mohamed Boudra 2e4dab0556 fix(app): preserve Android Usage drag order and sheet gestures (#9748)
On Android, a slow drag on a Usage card handle moved the sheet instead of the
card. A drop in the same slot left the sheet ignoring body swipes. A drop in a
new slot painted the original order for one or two frames.

The sheet gesture now registers a content drag as both a failure requirement
and a simultaneous relation, and the Gorhom patch spreads relation arrays into
RNGH, so the waiting sheet recognizer no longer cancels the card drag.

The old-order frames came from the list clearing its drag state before the
reordered data arrived. The sheet portal forwards changed children from an
effect, so the list committed old data with fresh transform hosts and a cleared
active key, and the new data about 200 ms later. The draggable-flatlist patch
now renews moved hosts and clears the active key in the render that receives
the reordered data. A same-slot drop resets explicitly because its data does
not change. Every native list that uses the patch gets the drop change.

Repro tooling for both device checks is in packages/app/e2e/mobile/usage-drag.
2026-11-15 20:34:07 +07:00
..

Android Usage drop regressions

Use a device you own and fixed reports from an isolated daemon. Keep recordings in .artifacts/. Do not upload recordings containing account details.

Same-slot drop

Open Usage with two cards that fit without scrolling. Run:

ANDROID_SERIAL=emulator-5580 node packages/app/e2e/mobile/usage-drag/android.mjs

Set PASEO_DEVICE_SESSION to reuse your Agent Device session. The test holds the first handle, moves within its slot, drops it, then swipes the sheet body. It asserts sheet movement while the finger is still down: after release, the sheet can snap back to its starting position.

Old-order frame

Record a drop with Android screenrecord. Include the original order, the held arrangement, the release, and at least five seconds after release. Take a reference screenshot before recording. Use fixed labels that stay visible throughout the drop.

Create a JSON map of label names to screenshot rectangles [x, y, width, height], in physical pixels. Crop each label tightly, without changing text or the pointer. Install opencv-python-headless in a local virtual environment under .artifacts/, then run:

.artifacts/frames-venv/bin/python packages/app/e2e/mobile/usage-drag/frames.py \
  --reference .artifacts/before.png --labels .artifacts/labels.json \
  .artifacts/drop-up.mp4 .artifacts/drop-down.mp4

The check requires recognized labels in the first and last frames and a changed final order. After every label first reaches its final slot, it fails on any frame showing all original slots again. It prints the offending frame numbers for each recording. This exercises the Android compositor; a JavaScript render test cannot establish which intermediate commit reached the screen.