From 07ea7d0098cefc9d1d2f306a0563cdf0c982957d Mon Sep 17 00:00:00 2001 From: ciregenz Date: Sat, 6 Jun 2026 12:45:54 -0700 Subject: [PATCH] [eric] browser: compose helper settles and re-lists once when Send renders after the text lands --- backend/apps/agents/browser/browser_agent.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/apps/agents/browser/browser_agent.py b/backend/apps/agents/browser/browser_agent.py index 49b9c843..1e029380 100644 --- a/backend/apps/agents/browser/browser_agent.py +++ b/backend/apps/agents/browser/browser_agent.py @@ -1472,6 +1472,14 @@ async def run_browser_agent( and str((tu.input or {}).get("text") or "").strip() and "error" not in result): _send = find_send_index("\n".join(attached_state_seen)) + if not _send: + # the Send control usually renders a beat AFTER the text + # lands; settle once and re-list to catch the late paint. + await browser_wait.smart_wait(_wait_exec, browser_id, tab_id, 1500) + _relist = await _cancellable(execute_browser_tool( + "BrowserListInteractives", {}, browser_id, tab_id)) + if isinstance(_relist, dict) and _relist.get("text"): + _send = find_send_index(str(_relist["text"])) if _send: _si, _sn = _send result["text"] = (f"{result.get('text') or ''}\n\n[send-ready] The Send "