From 449f66057da4bf8ab1513e7b5d04d14e62c4615c Mon Sep 17 00:00:00 2001 From: ciregenz Date: Wed, 15 Jul 2026 16:22:10 -0700 Subject: [PATCH] [eric] browser: scope broadened submit vocab to the receipt-gated send-script; keep the always-on Send hint tight (broadening it regressed the default config with the send-script off) --- backend/apps/agents/browser/browser_agent.py | 30 ++++++++++++++------ backend/tests/test_browser_agent_loop.py | 30 ++++++++++++-------- backend/tests/test_browser_reveal.py | 16 +++++------ backend/tests/test_browser_send_script.py | 16 +++++------ 4 files changed, 56 insertions(+), 36 deletions(-) diff --git a/backend/apps/agents/browser/browser_agent.py b/backend/apps/agents/browser/browser_agent.py index ef56738a..736d02e4 100644 --- a/backend/apps/agents/browser/browser_agent.py +++ b/backend/apps/agents/browser/browser_agent.py @@ -473,11 +473,14 @@ def delta_state(text: str, seen_lines: set[str]) -> str: # A button row whose name is exactly a Send control (not "Send InMail credit" or "Send a message to X"); used to hand the model the Send button after it types, so it never burns turns hunting a button that's right there. P_SEND_ROW_RE = re.compile(r'\[(\d+)\]\*?<\s*button\s+"([^"]*)"', re.I) -# The submit-button labels across the popular composers, so the fast send-path COMPLETES on -# X/IG/FB/Threads/YouTube, not just LinkedIn. EXACT match + button-only (P_SEND_ROW_RE) is the -# safety: "Post" never matches "Post a job", a "Share" menuitem isn't a