Closes #53202 `Anchored::prepaint` computes the bounding box of its children to determine the size used for fitting the anchored element in the window. Previously, this calculation manually tracked the minimum origin and maximum bottom-right point, initializing the maximum point to `(0, 0)`. If child bounds were in negative coordinates, the maximum point could be clamped to `(0, 0)`, inflating the computed size. This replaces the manual min/max accumulation with `Bounds::union`, starting from the actual child bounds instead of sentinel values. This computes the child bounding box correctly regardless of coordinate sign. --- Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed a bug where the context menu in the agent panel (and other scrollable surfaces) would appear at the wrong location
1 file changedLine totals unavailable