fix(web): stabilize chat timeline row measurement#1159
fix(web): stabilize chat timeline row measurement#1159sabraman wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
What Changed
This is a focused follow-up for chat timeline overlap and scroll-jiggle behavior in virtualized rows.
It hardens
MessagesTimelineso mounted virtual rows are remeasured when their real rendered height changes after initial placement, while avoiding the extra global remeasurement churn that was causing visible twitching.Scope:
Why
The current chat timeline can place a following row too early when an earlier virtualized row grows after render. That shows up as overlapping timeline content.
After fixing the overlap, there was still visible jiggle when collapsing or expanding changed-files trees. The remaining issue was excess measurement churn and over-eager scroll compensation for resized virtualized rows.
This PR keeps the overlap fix while narrowing measurement and scroll correction to the cases that actually need it.
Related to:
UI Changes
Before/after screenshots: pending, will add before requesting review.
Video for collapse/expand interaction: pending, will add before requesting review.
Validation
bun fmtbun lintbun typecheckbun run --cwd apps/web test:browserNotes
This is intentionally scoped to the timeline measurement/scroll behavior only.
It does not include unrelated workspace changes from the local branch/worktree.
Note
Stabilize chat timeline virtualized row measurement to prevent vertical overlap and jitter
measureElementin MessagesTimeline.tsx to cache measured heights per row and skip remeasurement when the delta is ≤1px, reducing unnecessary reflows.useMemoto track content changes (message length, streaming state, diff summary presence, expanded directories) and only remeasures rows whose signatures changed.Macroscope summarized 7fadfc6. (Automatic summaries will resume when PR exits draft mode or review begins).