Medium Risk
Touches chat timeline virtualization and row-height estimation; mistakes could cause scroll-jank, incorrect cached heights, or missing content during expand/collapse, though changes are UI-only with no auth/data risk.
Overview
Stabilizes chat timeline virtualization by extracting a shared row model + height estimator (deriveMessagesTimelineRows, estimateMessagesTimelineRowHeight) and using it for virtualizer sizing, including work-group expansion state and changed-files card height.
Prevents stale virtualizer measurements on resize by scoping react-virtual item keys to the current timeline width, and adds optional onVirtualizerSnapshot plus extra data-* attributes to aid debugging/verification.
Fixes ChangedFilesTree initial expand/collapse behavior by replacing effect-driven directory expansion state with an override map keyed by expand-mode + directory set, and adds unit + browser harness tests to catch estimate/measurement drift and ensure collapse/expand keeps the virtualizer in sync.
Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 32ef60515c5dd7082289f1e8edbfe6d5fec35a7a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed