Skip to content

fix(app): preserve timeline selection autoscroll#35383

Merged
Hona merged 2 commits into
anomalyco:devfrom
Hona:timeline-autoscroll
Jul 5, 2026
Merged

fix(app): preserve timeline selection autoscroll#35383
Hona merged 2 commits into
anomalyco:devfrom
Hona:timeline-autoscroll

Conversation

@Hona

@Hona Hona commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • treat held pointer drags over timeline content as scroll gestures
  • stop bottom-follow before native text-selection autoscroll begins
  • cover upward drag-selection in the production timeline fixture

Testing

  • bun typecheck
  • bun typecheck:e2e
  • bunx playwright test --config e2e/performance/timeline-stability/playwright.config.ts e2e/performance/timeline-stability/scroll-interaction.spec.ts
  • production timeline benchmark before and after: passed with 0px bottom drift

Copilot AI review requested due to automatic review settings July 5, 2026 02:27
@Hona Hona requested a review from Brendonovich as a code owner July 5, 2026 02:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes timeline auto-follow/selection interactions by marking pointer drag selection as a scroll gesture and extending the timeline stability E2E suite to cover upward drag-selection autoscroll behavior.

Changes:

  • Mark scroll gestures on pointer down and during primary-button pointer moves within the timeline viewport.
  • Add an E2E test that validates upward drag-selection continues moving the scroller (and that selection actually grows).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/app/src/pages/session/timeline/message-timeline.tsx Marks scroll gestures for pointer drag interactions to prevent unwanted bottom-follow behavior during native selection autoscroll.
packages/app/e2e/performance/timeline-stability/scroll-interaction.spec.ts Adds a new drag-selection stability test covering upward autoscroll and selection growth.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 599 to 607
const handleListPointerDown = (event: PointerEvent & { currentTarget: HTMLDivElement }) => {
if (!prependLoading) clearPrependAnchor()
if (event.target !== event.currentTarget) return
props.onMarkScrollGesture(event.currentTarget)
props.onMarkScrollGesture(event.target)
}

const handleListPointerMove = (event: PointerEvent) => {
if (event.buttons !== 1) return
props.onMarkScrollGesture(event.target)
}
Comment on lines +76 to +80
await page.mouse.move(textBox.x + 20, scrollBox.y - 120, { steps: 30 })
await page.waitForTimeout(1_500)
await page.mouse.up()

expect(Number(await scroller.getAttribute("data-selection-length"))).toBeGreaterThan(0)
@Hona Hona enabled auto-merge (squash) July 5, 2026 02:37
@Hona Hona added the beta label Jul 5, 2026
@Hona Hona merged commit efd5f0a into anomalyco:dev Jul 5, 2026
8 checks passed
Wiktor102 pushed a commit to Wiktor102/opencode that referenced this pull request Jul 5, 2026
drewr pushed a commit to drewr/opencode that referenced this pull request Jul 7, 2026
shaheislam pushed a commit to shaheislam/opencode-vim that referenced this pull request Jul 7, 2026
anduimagui pushed a commit to anduimagui/opencode that referenced this pull request Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants