Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

The CodeBlocks story was flaky because after Shiki highlighting completes, code block heights change which triggers the ResizeObserver in useAutoScroll to schedule a coalesced RAF scroll. Chromatic could capture the snapshot before this RAF completed.

Add a double-RAF wait after verifying highlighting is done, matching the pattern used in useAutoScroll.performAutoScroll() and the expandAllBashTools helper.


Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

@ammar-agent ammar-agent changed the title 🤖 fix: wait for post-highlighting scroll RAF in CodeBlocks story 🤖 tests: wait for post-highlighting scroll RAF in CodeBlocks story Dec 21, 2025
@ammar-agent ammar-agent force-pushed the fix-codeblocks-story-flaky branch 2 times, most recently from aa18dd2 to be8b6f9 Compare December 21, 2025 06:32
The CodeBlocks story was flaky because after Shiki highlighting
completes, code block heights change which triggers the ResizeObserver
in useAutoScroll to schedule a coalesced RAF scroll. Chromatic could
capture the snapshot before this RAF completed.

Add a double-RAF wait after verifying highlighting is done, matching
the pattern used in useAutoScroll.performAutoScroll() and the
expandAllBashTools helper.

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
@ammar-agent ammar-agent force-pushed the fix-codeblocks-story-flaky branch from be8b6f9 to 867869e Compare December 21, 2025 06:33
@ammario ammario merged commit c02774d into main Dec 21, 2025
19 checks passed
@ammario ammario deleted the fix-codeblocks-story-flaky branch December 21, 2025 06:43
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.

2 participants