Agent Selector breaks page layout on window resize

The agent selector incorrectly opens left-aligned instead of right-aligned when the viewport width is between 900-1200px, causing the page layout to break.

Screenshot
Screenshot_2025-12-11_at_20.02.33
Demo
2025-12-11_19-54-45

How to reproduce:

  1. Navigate to a page with the custom agent selector
  2. Resize the browser window to a width between 900px and 1200px
  3. Open and close the agent selector repeatedly while adjusting the window size within this range

Note: The issue doesn't occur on every resize event but is consistently reproducible after several resize attempts within the affected width range.

Note: I happened to record the demos on the GDK, but gitlab.com is showing the same behaviour.

Edited by Jannik Lehmann