Skip to content

spec: prevent overshoot scrolling code diff to top (#9808)#10228

Open
lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
lonexreb:spec/9808-diff-scroll-overshoot
Open

spec: prevent overshoot scrolling code diff to top (#9808)#10228
lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
lonexreb:spec/9808-diff-scroll-overshoot

Conversation

@lonexreb
Copy link
Copy Markdown
Contributor

@lonexreb lonexreb commented May 6, 2026

Spec for #9808. Clamp in-progress scroll gestures to the diff container; only new gestures (after a 200ms settling window) bubble up to the parent blocklist. Applies to all blocklist-embedded scroll containers, not just diff.

Closes (spec-only) #9808.

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@lonexreb

I'm starting a first review of this spec-only pull request.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This spec defines a gesture-window clamp for nested scroll containers to prevent in-progress overscroll from moving the parent blocklist.

Concerns

  • The behavior contract does not define ownership after a new gesture starts at an inner-scroll boundary, so implementers could bubble only the first delta and then consume the rest of the same gesture.
  • The scope expands from code diff to all blocklist-embedded scroll containers, but acceptance criteria, implementation pointers, and tests remain diff-only.
  • The scrollbar click acceptance criterion should identify which scrollbar target bypasses the gesture clamp.

Verdict

Found: 0 critical, 2 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH9808/SPEC.md
scroll-event-stream timing: events within ≤200ms of each other
belong to the same gesture (matches macOS/Windows trackpad
inertia conventions).
- B3. After a 200ms gap, the next scroll arriving at the diff
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.

⚠️ [IMPORTANT] B3 conflicts with B1 for a new gesture that begins while the inner container is already at its boundary: after the first delta bubbles, specify whether the remaining deltas in that same ≤200ms gesture keep bubbling to the parent or are consumed by the child.

Comment thread specs/GH9808/SPEC.md
- B4. Same behavior at top AND bottom edges.
- B5. Click-to-jump (clicking the scrollbar) bypasses this rule
— that's a discrete event, not part of a gesture.
- B6. The new behavior applies to **all** scroll containers
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.

⚠️ [IMPORTANT] B6 expands the requirement to every blocklist-embedded scroll container, but the acceptance criteria, implementation pointers, and tests only cover diffs; either limit the scope to diffs or add explicit coverage for code review snippets and embedded markdown plus the shared hook that will enforce it.

Comment thread specs/GH9808/SPEC.md
top remains visible.
- A2. Stop scrolling for >200ms, scroll up again — blocklist
scrolls normally.
- A3. Click the scrollbar above the diff to jump up — works as
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.

💡 [SUGGESTION] Clarify whether this means the inner diff scrollbar, the parent blocklist scrollbar, or both, because the bypass behavior depends on which scrollable receives the click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant