Repository navigation
Keep outline jumps on target with timeline windowing - #4217
Merged
ymichael merged 2 commits intoSep 23, 2026
Merged
Conversation
With timeline windowing enabled, clicking a conversation outline entry for a loaded but unmounted row asked the timeline to mount it and then searched the DOM synchronously, before React rendered it. The jump was a no-op when no older pages existed, and otherwise loaded an unneeded older page before scrolling. The outline now waits up to the existing render-frame budget for a loaded row to appear before falling back to older-page pagination. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The timeline virtualizer caches its scroll offset from scroll events. When a row resized in the same frame as the outline jump, its scroll adjustment used the pre-jump offset and pulled the viewport back to where it started. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/fix-outline-jumping-in-timeline-windowing-thr_vxftsyhutj
branch
September 23, 2026 21:13
ymichael
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Timeline row windowing (#2011) only ran when the `timelineWindowing` experiment was turned on, and it was off by default. So long timelines and large expanded details still mounted every row. The known outline-jump bug with windowing on was fixed by #4217, which is already on `main` (bb34cef), so nothing else was holding back the rollout. ## What changed - **App:** `ThreadTimelineSurface` no longer reads the experiment from system config. I removed the `timelineWindowingEnabled` prop and context from `ThreadTimelineRows` and the `enabled` prop from `TimelineWindowedItemsLoader`/`TimelineWindowedItems`. Windowing still falls back to fully mounted rows below the per-list thresholds (60/40 top-level, 20 nested) or when there is no usable scroll root. Outline and search navigation targets now always stay mounted. - **Experiment key:** removed `timelineWindowing` from `@bb/domain` experiments, the Settings → Experiments toggle, and the test fixtures. Legacy stored rows are ignored, as before. - **Docs:** `docs/configuration.md`, the bb-guide customization template, and the bb-cli `app-settings.md` reference now describe windowing as standard behavior. The verify-bb settings recipe lists the remaining experiments. - **Plugin SDK:** bumped to `0.5.20`, because the experiment keys are part of its bundled declarations. Same as #2772 and #3424. - No host-daemon wire changes. ## How you verified - I deleted the tests for the experiment-off path. The remaining windowing tests now run without a flag. - `pnpm exec turbo run typecheck lint test --filter=@bb/app --filter=@bb/server --filter=@bb/desktop --filter=@bb/cli --filter=@bb/db --filter=@bb/domain --filter=@bb/plugin-api-map --filter=@bb/templates` passed (25/25 tasks; app 557 files, server 299 files). Lint shows only pre-existing warnings. - `node .github/workflows/check-plugin-sdk-version.mjs` passed. Related: #2011 (added the experiment), #4217 (outline-jump fix under windowing, merged). > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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
With the Timeline windowing experiment enabled, clicking a conversation-outline entry often failed to land on the message. Two independent causes:
onNavigateToRow(id)so the virtualizer adds the destination toalwaysMountedKeys, then immediately searches the DOM for[data-timeline-row-id]— synchronously, before React renders the forced row. The row was never found, so the jump either gave up (no older pages) or fell into the pagination loop and loaded an older page it didn't need.scrollOffsetand only refreshes it fromscrollevents, which the browser delivers asynchronously. AfterscrollIntoView, a row resized in the same frame (common right after older pages load);resizeItem→applyScrollAdjustmentthen calledscrollTo(staleOffset + delta), pulling the viewport back to roughly where it started. Instrumented live:scrollIntoViewput the target at offset 0, and the next write wasscrollTo({top: 31880})fromapplyScrollAdjustment.What changed
apps/app/src/components/thread/toc/ThreadTableOfContents.tsx: when the destination is already in the loadedtimelineRows, wait up to the existingTOC_JUMP_RENDER_FRAMESbudget for it to render before falling back to older-page pagination. The per-page wait reuses the same helper.apps/app/src/components/ui/bottom-anchored-scroll-body.tsx:scrollElementIntoViewdispatches a synchronousscrollevent on the scroll area whenscrollIntoViewmoved it, so scroll observers (the virtualizer's cached offset in particular) see the new position before any same-frame resize adjustment.App-only; no wire changes.
How you verified
mainand passing with the fix:ThreadTableOfContents.test.tsx—waits for a loaded but unmounted message to render instead of paginatingbottom-anchored-scroll-body.scroll-preservation.test.tsx—notifies scroll listeners synchronously when revealing a row moves the viewportpnpm exec turbo run test typecheck lint --filter=@bb/app— 5054 tests passed; lint has only pre-existing warnings.pnpm start:worktreeon a seeded 8,624-event thread (206 user messages, windowing on, 1,500-event pages). Fresh load per case, one outline click, target offset sampled every frame for 5s:main(2d5d5e3)The PR column was consistent across two full runs.
Fixes: N/A — reported directly; no issue filed.
🤖 Generated with Claude Code