Repository navigation
Restore lost scroll regression tests and fix two bugs they found - #6437
Merged
Merged
Conversation
#5951 and earlier rewrites deleted about 200 scroll-related regression tests. An audit marked each one not about scrolling, covered by a current test, obsolete, or a gap. The gaps were rewritten against the current keeper, gated (each kept test fails under a mutation that reintroduces its bug), and moved into their owner test files. Two restored tests failed on main: - A scroll with no input on a detached view, such as find in page, was undone when a re-render reconciled before its scroll event arrived. apply() now takes such a scroll as navigation, except a clamp onto the end of shrunken content, which stays layout. - When a hidden pane regained height, windowed spacers kept estimated heights instead of the heights measured while every row was mounted, so the scroll extent jumped later. The window state now refreshes them on that change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymichael
added a commit
that referenced
this pull request
Oct 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
ymichael
added a commit
that referenced
this pull request
Oct 28, 2026
## Human comments ## What was wrong `main` has 134 commits since 0.47.0, and 0.47.1 shipped without notes. `bb-app` and `@bb/desktop` were still at 0.47.1, so the publish and desktop workflows can't ship them. ## What changed - `packages/bb-app/package.json`, `apps/desktop/package.json`: 0.47.1 → 0.48.0 (`node scripts/bump-version.mjs --minor`). - `CHANGELOG.md`: the 0.48.0 section, written as a quality and performance release and covering everything since 0.47.0, including 0.47.1. Sections: Reliability, Performance, Usability, New experiments (early adopter set only), Other improvements, Bug fixes, Plugins, and Thanks (7 external contributors). The only numbers in it are deterministic payload and memory figures; single-machine measurements were left out. - `changelog-metadata.ts`: the 0.48.0 `RELEASE_META` entry (October 28, 2026, "Faster loading, lighter live updates, and a long list of fixes"). The release commits sit directly on `24847ae036`, the current `main` (including #6437, whose two scroll fixes are in Bug fixes). ## How you verified - `node .github/workflows/check-version-lockstep.mjs`: `bb-app=0.48.0 @bb/desktop=0.48.0`. - On `f8c0701e94` (before rebasing onto #6437; CI covers the rebased branch): `pnpm exec turbo run typecheck test --filter=@bb/app --filter=@bb/config --filter=@bb/server --filter=bb-app`: 16 of 17 tasks passed. `@bb/server` had 3 timeouts in `test/services/plugins/builtin-plugins.test.ts` under load; that file passes 28/28 when run alone. - `pnpm exec turbo run smoke:tarball --filter=bb-app --force`: 62/62 tasks passed. - `apps/app` `changelog-preview.test.ts`: 7/7 passed. Prettier check on `CHANGELOG.md` and `changelog-metadata.ts` and `git diff --check`: clean. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Human comments
What was wrong
#5951 rewrote timeline scroll ownership, and it and earlier rewrites deleted many regression tests that previous scroll-bug fixes had added. I listed the tests added by the 50 commits that changed the scroll code since May and checked which still exist on main: 200 of the missing ones were scroll-related. Restoring the uncovered ones against the current keeper found two live bugs:
ScrollPositionKeeper.apply()only took in an unexplained scroll during an input session, andTimelineWindowedItemsreconciles in a layout effect after every commit. So any re-render in that frame, typically while a thread streams, undid the jump. In headless Chrome on a streaming thread, 1 of 5 such jumps snapped back. This contradicted the documented rule that a detached view follows navigation.What changed
scroll-position-keeper.ts:apply()now treats an unexplained scroll outside an input session as navigation, for views that follow navigation (detached, or the desktop find bar open). It takes the position from the screen, marks the reader as having scrolled, and drops any pending restore. A clamp onto the end of shrunken content stays layout.TimelineWindowedItems.tsx: when the scroll root goes from no height to having one, the window state refreshes its heights from the retained measurements (knownHeights, shared with the existing window update).scroll-position-keeper.test.ts: 11 tests, plus 1 folded into an existing test.bottom-anchored-scroll-body.test.tsx: 6.TimelineWindowedItems.test.tsx: 4, two of them folded in.ThreadTimelineRows.system-summary.test.tsx: 1, the streaming detail scroller.thread-opening.model.test.tsx: 1, a live reply adding NEW above an attached view.test/fake-flow-layout.ts:flushResizeObserversreports the scroll element's own size, so viewport shrinks reach the keeper.docs/timeline-pagination.md: reconciliation step 1 and the hidden-pane windowing rule.Audit totals for the 200 lost tests:
scrollHeightandclientHeighton each scroll event, which Give the timeline's reading position one owner so scrolling stops jumping #5951 introduced on purpose.Client only; no wire, CLI or plugin API change.
How you verified
f8c0701e94) and pass here. So does L034 against the pre-fixTimelineWindowedItems.pnpm exec turbo run typecheck lint test --filter=@bb/app: passes (643 files, 6,369 tests; lint has 0 errors).🤖 Generated with Claude Code