Skip to content

Fix collapsed preview overflow render loop - #767

Merged
SawyerHood merged 1 commit into
mainfrom
fix/collapsed-preview-overflow-loop
Jul 17, 2026
Merged

Fix collapsed preview overflow render loop#767
SawyerHood merged 1 commit into
mainfrom
fix/collapsed-preview-overflow-loop

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • keep expandable collapsed-preview continuation markers mounted so their width remains stable
  • hide the manual marker when native truncation is active instead of removing it from layout
  • add regression coverage for the ResizeObserver fit/overflow feedback loop

Root cause

A collapsed child-thread preview could fit without its manual ... marker but overflow after the marker was mounted. The overflow measurement then removed the marker, which made the preview fit again and caused an infinite ResizeObserver/render loop.

Browser profiling on the affected workspace measured 364 DOM mutations and 4.62 seconds of style recalculation over five seconds at roughly 18 FPS. Reserving the marker width reduced that sample to zero mutations, 0.033 seconds of style recalculation, and 60 FPS.

Validation

  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run test --filter=@bb/app -- --run src/components/thread/timeline/GeneratedConversationMessage.test.tsx
  • pnpm exec turbo run test --filter=@bb/app --force (241 files, 1,601 tests)
  • local managed-app browser smoke test with no console or page errors

@SawyerHood
SawyerHood merged commit 82bd4ca into main Jul 17, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the fix/collapsed-preview-overflow-loop branch July 17, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant