Skip to content

Fix scroll to bottom button flickering near bottom of the chat#1692

Merged
juliusmarminge merged 2 commits intopingdotgg:mainfrom
vaeho:fix/scroll-to-bottom-flicker
Apr 2, 2026
Merged

Fix scroll to bottom button flickering near bottom of the chat#1692
juliusmarminge merged 2 commits intopingdotgg:mainfrom
vaeho:fix/scroll-to-bottom-flicker

Conversation

@vaeho
Copy link
Copy Markdown
Contributor

@vaeho vaeho commented Apr 2, 2026

What Changed

Adjusted the chat scroll behavior so the "Scroll to bottom" pill does not appear immediately when the user starts slowly scrolling upward from the very bottom of a thread.

The change keeps auto-scroll enabled while the scroll container is still within the near-bottom threshold during upward wheel or pointer scrolling.

Why

When scrolling up slowly from the bottom of an existing chat, the "Scroll to bottom" pill could appear too early and flicker on and off before the user had actually moved far enough away from the bottom for the control to be useful.

This change keeps the existing behavior intact, but avoids releasing auto-scroll until the user is no longer near the bottom, which makes the pill appear at a more sensible point and prevents the near-bottom flicker.

UI Changes

Before:

Screen.Recording.2026-04-02.at.19.52.57.mov

The "Scroll to bottom" pill could appear immediately and flicker while slowly scrolling upward near the bottom of a chat.

After:

Screen.Recording.2026-04-02.at.20.24.12.mov

The pill stays hidden while the user is still near the bottom and appears only after scrolling far enough upward.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk UI behavior tweak limited to chat auto-scroll state; may slightly change when auto-scroll disengages during upward scrolling near the bottom.

Overview
Adjusts ChatView auto-scroll disable logic so upward wheel/pointer scrolling only turns off auto-scroll once the user is not within the near-bottom threshold.

This prevents the “Scroll to bottom” pill from appearing/flickering when a user slowly scrolls up while still effectively at the bottom of the thread.

Written by Cursor Bugbot for commit 68aaf07. This will update automatically on new commits. Configure here.

Note

Fix scroll-to-bottom button flickering near the bottom of chat

The auto-scroll disable condition in ChatView.tsx previously triggered on any upward scroll. It now requires the user to both scroll up and be away from the bottom (scrolledUp && !isNearBottom). This fix applies to both the pendingUserScrollUpIntentRef and isPointerScrollActiveRef branches.

Macroscope summarized 68aaf07.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e7af8dc5-9c7f-4c25-bf78-bec2cba9ce57

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 2, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 2, 2026

Approvability

Verdict: Approved

This is a straightforward UI bug fix that adds an additional !isNearBottom condition to prevent the scroll-to-bottom button from flickering when users are near the bottom of the chat. The change follows an existing pattern already used elsewhere in the same function and has minimal scope.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge enabled auto-merge (squash) April 2, 2026 22:53
@juliusmarminge juliusmarminge merged commit 0853405 into pingdotgg:main Apr 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants