ADFA-2786 | Harden structure view drawing#1360
Conversation
Avoid unsafe parent-chain access while rendering structure connectors
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughRelease NotesChanges
Benefits
Notes
Walkthrough
ChangesNull-safe parent resolution in dispatchDraw
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Description
This PR hardens
StructureView.dispatchDraw()to avoid unsafe assumptions while drawing the LayoutEditor structure connector lines.The method now skips entries when the mapped view or expected parent hierarchy is not available, instead of directly accessing or casting parent-chain values during the draw cycle.
This helps prevent drawing-related crashes if the structure view contains stale, detached, or partially unavailable rows.
Details
No UI behavior changes are expected.
Screen.Recording.2026-06-02.at.12.37.30.PM.mov
Ticket
ADFA-2786
Observation
The original Sentry crash path is not currently reproducible in
stage, but this change reduces a remaining latent risk in nearby drawing code by avoiding direct parent-chain casts insidedispatchDraw().