Studio Playwright: snooze update banner before sending (#6576)

* Studio Playwright: snooze update banner before sending

The llama.cpp update banner is a fixed bottom-right toast (z-9998). When an
update is available it overlaps the composer's Send button and its subtree
intercepts the click, so send_and_wait times out (flaky; surfaces on the
Windows studio UI smoke, passes otherwise). Snooze the banner if it is
showing before each send, then wait for it to detach.

* Also snooze the web update banner before sending

The web update banner (web-update-banner, z-9999) is a fixed bottom-right
toast like the llama.cpp one and can overlap the Send button too. Loop over
both banners and snooze whichever is showing.
This commit is contained in:
Daniel Han 2026-06-22 08:27:18 -07:00 committed by GitHub
commit 3a9fc34fcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -569,6 +569,21 @@ with sync_playwright() as p:
# this at temp 0), and the old non-empty predicate got stuck
# on such bubbles.
bubbles_before = _bubble_count()
# The llama.cpp and web update banners are fixed bottom-right toasts
# (z-9998 / z-9999) that can overlap the composer's Send button and
# intercept the click. Snooze whichever is showing before sending.
for prefix in ("llama", "web"):
snooze_btn = page.locator(f'[data-testid="{prefix}-update-snooze-button"]')
if snooze_btn.count():
try:
snooze_btn.first.click(timeout = 2_000)
page.wait_for_selector(
f'[data-testid="{prefix}-update-banner"]',
state = "detached",
timeout = 5_000,
)
except Exception:
pass
composer.click()
composer.fill(prompt)
page.locator('button[aria-label="Send message"]').click()