Files
alan d02d5ea11d Chat transcript: wheel and trackpad scrolling always reaches the transcript
Root causes found in release web captures (1280x800 and 560x900):
- Follow mode undid small wheel/trackpad ticks at the end: each tick is its
  own scroll, re-judged as following within 32 px and jumped back. A user
  scroll toward older rows now releases the end however small; the jump
  control appears once streamed content moves the end beyond the threshold.
- The end-of-scroll jump ran inside the position's activity switch, so a
  touch or scrollbar drag released near the end recursed without end (stack
  overflow during the gesture). The jump now runs after the notification.
- Horizontally scrolling code blocks and tables claimed diagonal trackpad
  gestures whole. HorizontalScrollView gives mostly vertical gestures to the
  enclosing list; sideways and Shift + wheel still scroll the block.
- The wheel over the floating chat bar, composer and jump control moved
  nothing. VerticalWheelForwarder scrolls the transcript from them unless
  something under the pointer claims the event.

Adds widget tests per content kind and scroll mode, follow/touch/Load older
tests, a capture-kit check (tool/capture/examples/chat-wheel-scroll.json)
with eval/expect steps, wheel dx/repeat, --params and eval: targets, a
transcript scroll probe and fixture options, and fixes the kit ignoring a
script's size. Notes in notes/chat-wheel-scroll.md.
2026-11-02 20:37:36 +00:00

261 lines
5.3 KiB
JSON

{
"size": "1280x800",
"params": "chats=3&msgs=40,3,12&rich=1",
"steps": [
{
"open": "/chat"
},
{
"click": "OpenCode harness\nFixture chat 1",
"wait": 1800
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -4,
"repeat": 12,
"gap": 16,
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -43.2",
"name": "small ticks leave the end of the transcript"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"code\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over code"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -30,
"dx": 4,
"at": "eval:JSON.parse(chatScrollTargets())[\"code\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -27.0",
"name": "diagonal trackpad over code"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"wide\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over wide"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -30,
"dx": 4,
"at": "eval:JSON.parse(chatScrollTargets())[\"wide\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -27.0",
"name": "diagonal trackpad over wide"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"table\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over table"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -30,
"dx": 4,
"at": "eval:JSON.parse(chatScrollTargets())[\"table\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -27.0",
"name": "diagonal trackpad over table"
},
{
"scroll": 6000,
"wait": 600
},
{
"eval": "window.__s = JSON.parse(chatSidewaysOffsets()).reduce((a, b) => a + b, 0)"
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": 0,
"dx": 40,
"at": "eval:JSON.parse(chatScrollTargets())[\"wide\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatSidewaysOffsets()).reduce((a, b) => a + b, 0) - window.__s >= 36",
"name": "sideways scroll moves the wide block"
},
{
"expect": "Math.abs(JSON.parse(chatScrollMetrics()).pixels - window.__b) < 1",
"name": "sideways scroll leaves the transcript"
},
{
"scroll": 6000,
"wait": 600
},
{
"scroll": -500,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"image\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over image"
},
{
"scroll": 6000,
"wait": 600
},
{
"scroll": -500,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"agent\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over agent"
},
{
"scroll": 6000,
"wait": 600
},
{
"scroll": -500,
"wait": 600
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "eval:JSON.parse(chatScrollTargets())[\"notice\"] ?? null",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over notice"
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "Work on demo",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over composer"
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "Send",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over send button"
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "Jump to latest",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over jump control"
},
{
"eval": "window.__b = JSON.parse(chatScrollMetrics()).pixels"
},
{
"scroll": -100,
"at": "opencode default",
"wait": 600
},
{
"expect": "JSON.parse(chatScrollMetrics()).pixels - window.__b < -90.0",
"name": "wheel over model control"
},
{
"shot": "after-wheel"
}
]
}