Repository navigation
Preserve thread scroll position when older rows load - #1975
Merged
ymichael merged 1 commit intoAug 19, 2026
Merged
Conversation
Contributor
|
🚨 SLOP COP 🚨 · I am SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and product behavior. |
Contributor
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain English summary: This change keeps the current message in place when bb loads older thread history. It updates the timeline height before scroll restoration.
I found no blocking issue and no changed line that needs an inline comment.
- Security: The key contains only row identifiers and sequence values. It does not expose message content or private paths.
- Code quality: The change uses the existing height revision contract. The focused test covers the new height update.
- Performance: Each leading-row change adds one synchronous height read. It does not add an observer or a repeated measurement loop.
- Architecture: The existing parts keep clear roles. The code search found no duplicate implementation or useful refactor for this change.
- Tests: Eight focused tests passed. The app type check passed. All GitHub checks passed at this SHA.
- Product test: I did not run the browser test. Parallel test tasks overloaded the review host and made timed results invalid.
A future test can assert the final scroll position through the full scroll container. I do not require that test for this change.
The GPT-5.6 review gate returned APPROVE.
ymichael
deleted the
bb/investigate-localhost-refresh-issue-thr_5ne6vjr4e3
branch
August 19, 2026 23:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was wrong
When an older timeline page was prepended,
BottomAnchoredScrollBodytried to restore the captured viewport in its layout effect whileAutoHeightContainerstill exposed the previous wrapper height. The laterResizeObserverheight update happened after that compensation opportunity, so Chromium clamped the scroll position to the old maximum and left the viewport on an older message as the full prepended height appeared.What changed
The timeline height snap revision now includes the leading row identity. A paginated prepend therefore snap-syncs
AutoHeightContainerduring the same commit, before the parent scroll body's layout effect measures the added height. Streaming growth and the existing completed-turn topology revision remain unchanged. A focused regression test covers a leading-row prepend while the latest completed turn stays constant.No wire, daemon protocol, CLI, or configuration changes.
Before and after
How you verified
200pxremained stale instead of snap-syncing to400px) and passes with this change.scrollTopfrom 553 to 1,353 and replaced the visible row.scrollTopcompensates from 553 to 2,923 while the same visible row remains at exactly -426px.pnpm exec turbo run test --filter=@bb/app --force: 410 files passed, 3,138 tests passed, 3 skipped.pnpm exec turbo run typecheck --filter=@bb/app.pnpm exec turbo run lint --filter=@bb/app(0 errors; existing warnings only).Fixes: no linked issue.