GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): preserve scroll when collapsing large changed-files trees by CodeZeno · Pull Request #1113 · pingdotgg/t3code

Conversation

@CodeZeno

@CodeZeno CodeZeno commented Mar 15, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Fix chat scroll jumps when collapsing very large changed-files trees.

Problem

When a changed-files section contains hundreds of entries, collapsing the tree can shrink the rendered message enough that the timeline repositions the viewport unexpectedly. In practice this makes the collapse controls feel broken because the user gets pulled away from the message they were interacting with.

What changed

  • stop virtualizer scroll compensation when the resized row is currently visible
  • mark changed-files collapse and directory toggle controls with data-scroll-anchor-ignore so click-anchor restoration does not interfere with those interactions

Why

The bug happens during an intentional height change inside the message the user is actively viewing. In that case, preserving the current viewport is more stable than trying to compensate for the size change. The virtualizer can still adjust scroll for off-screen rows, but visible changed-files interactions now keep the user anchored in place.

UI Changes

Before:
https://github.com/user-attachments/assets/60f06a27-9776-4c6d-b553-611fbbf5b2a0

  • Notice tree collapses correctly but the user is then immediately taken to the top of thread
  • 'Collapse all' button immediately takes the user to the top of thread

After:
https://github.com/user-attachments/assets/eacd53a5-66f9-41e7-b70c-7b4de1b0292d

  • Tree collapses work fine, keeping position
  • 'Collapse all' button also keeps position

Good to have

Might also be nice to have the default as collapsed if the number of changed files is greater then a certain number?

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

Preserve scroll position when collapsing changed-files trees in the chat timeline

  • Adds data-scroll-anchor-ignore to directory toggle buttons in ChangedFilesTree.tsx and the collapse/expand button in MessagesTimeline.tsx so clicks on these buttons don't trigger scroll anchor adjustments.
  • Updates shouldAdjustScrollPositionOnItemSizeChange in MessagesTimeline to skip scroll adjustments when the resized item is within the viewport, preventing jarring scroll jumps when collapsing large file trees.
  • Behavioral Change: scroll position adjustments now only fire when the resized item is outside the viewport and the remaining distance to the bottom exceeds AUTO_SCROLL_BOTTOM_THRESHOLD_PX.

Macroscope summarized 7b0d5e8.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@CodeZeno
fix(web): preserve scroll when collapsing large changed-files trees
7b0d5e8
@coderabbitai

coderabbitai Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

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: eff497c1-37b9-490d-bb56-890b5ce25eb4

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
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list. labels Mar 15, 2026
@sabraman sabraman mentioned this pull request Mar 17, 2026
fix(web): stabilize chat timeline row measurement #1159
Closed
4 tasks done
@CodeZeno CodeZeno mentioned this pull request Mar 20, 2026
Fix chat timeline row height estimation #1093
Closed
2 of 4 tasks
@CodeZeno

CodeZeno commented Mar 29, 2026

Copy link
Copy Markdown
Contributor Author

Just confirming still an issue in v0.0.15

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

juliusmarminge
juliusmarminge approved these changes Mar 29, 2026
View reviewed changes

@juliusmarminge juliusmarminge left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nice

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@juliusmarminge
juliusmarminge merged commit d417819 into pingdotgg:main Mar 30, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@aaditagrawal aaditagrawal mentioned this pull request Mar 30, 2026
Sync fork with upstream/main (post-v0.0.15, 17 commits) aaditagrawal/t3code#40
Merged
8 tasks done
xddinside referenced this pull request in xddinside/t3code Apr 4, 2026
@CodeZeno @xddinside
fix(web): preserve scroll when collapsing large changed-files trees (…
cb2ef9c
…#1113)
youpele52 referenced this pull request in youpele52/bigbud Jun 17, 2026
@CodeZeno
fix(web): preserve scroll when collapsing large changed-files trees (…
0840a6a
…#1113)
dcherrera pushed a commit to dcherrera/t3code that referenced this pull request Jul 7, 2026
@CodeZeno
fix(web): preserve scroll when collapsing large changed-files trees (p…
189df10
…ingdotgg#1113)
NeilTheFisher pushed a commit to NeilTheFisher/t3code that referenced this pull request Aug 18, 2026
@CodeZeno
fix(web): preserve scroll when collapsing large changed-files trees (p…
9394e6f
…ingdotgg#1113)
@coderabbitai coderabbitai Bot mentioned this pull request Sep 23, 2026
feat(server): select GitHub CLI accounts per project codemode-studio/t3code#1
Merged
2 of 4 tasks
@CodeZeno
CodeZeno deleted the wip/changed-files-scroll-fix-v2 branch October 18, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@juliusmarminge juliusmarminge juliusmarminge approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@CodeZeno @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.