feat: re-measure measured bones on DOM mutations (BON-5) - #38
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The three re-measure tests mutated in the same tick as mount, so ResizeObserver's spec-mandated first callback (fired regardless of any real resize) supplied the re-measure instead of the MutationObserver under test. Settle past that guaranteed delivery before mutating so only DOM changes can drive the re-measure, add a test pinning that attribute mutations are excluded, and document the empty-then-refilled-subtree edge in the docs bullet per the controller's ruling (overlay.ts behavior unchanged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughMeasured bones now re-measure after light-DOM child or text changes. Mutation observation ignores attributes, cleans up with resize observation, and falls back to CSS rendering when the boundary becomes empty. ChangesMeasured overlay mutations
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change re-measures measured bones when light-subtree content changes during busy state, preventing stale bars without observing attribute updates. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Closes the stale-bars case the BON-4 design deferred to Phase 4: content that changes while busy without resizing the boundary kept its previous bars until the next resize. Streaming makes mid-busy child swaps the norm, so
MeasuredOverlaynow pairs its ResizeObserver with a MutationObserver (childList,subtree,characterDataon the light subtree, active-overlay lifetime only).Part of BON-5 (PR 1 of 3). No visual baselines change.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation