Skip to content

feat: Do not lock scroll position while text is streaming#1096

Open
AshhKetchup wants to merge 2 commits intodifferent-ai:devfrom
AshhKetchup:feat/no_lock_scroll_while_text_streaming
Open

feat: Do not lock scroll position while text is streaming#1096
AshhKetchup wants to merge 2 commits intodifferent-ai:devfrom
AshhKetchup:feat/no_lock_scroll_while_text_streaming

Conversation

@AshhKetchup
Copy link
Contributor

Summary

  1. Added userScrolledAwayAt tracking variable
    • Tracks when user last scrolled away from bottom
  2. Reduced auto-scroll threshold from 96px to 24px
    - Only pins to "viewing latest" when truly at the bottom
    - Prevents auto-scroll from activating when user is just reading near the bottom
  3. Added scroll-away timestamp tracking
    - Records userScrolledAwayAt = Date.now() when user scrolls up
  4. Added 800ms cooldown after manual scroll
    - Suppresses auto-scroll for 800ms after user scrolls away
    - Prevents the view from fighting manual scroll position during streaming

Issue

@vercel
Copy link

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 Mar 22, 2026 5:47am

@vercel
Copy link

vercel bot commented Mar 21, 2026

@AshhKetchup is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not lock scroll position while text is streaming

1 participant