diff --git a/backend/apps/agents/browser/browser_send_parse.py b/backend/apps/agents/browser/browser_send_parse.py index 28147c5f..747d49b8 100644 --- a/backend/apps/agents/browser/browser_send_parse.py +++ b/backend/apps/agents/browser/browser_send_parse.py @@ -70,9 +70,12 @@ P_SIGNIN_AFFORDANCE_RE = re.compile( re.I) # Anything only a signed-IN page shows. Its presence vetoes the verdict, so a stray "Log in" on an # authenticated page (a second product's promo) can't make us tell the user to sign in again. +# Deliberately NARROW: an earlier draft also vetoed on "notifications"/"profile"/"inbox", which +# logged-OUT pages advertise all the time, and that silently suppressed the whole detector on the +# exact sites it exists for (measured: bsky with 0 cookies read as signed-in). Only a control that +# is meaningless unless you are already authenticated belongs here. P_SIGNED_IN_RE = re.compile( - r'(?:sign|log)[_ -]?out|your profile|account menu|my account|notifications|' - r'<\s*(?:link|button)\s+"[^"]*(?:profile|avatar|inbox)', + r'(?:sign|log)[_ -]?out\b|your profile|account menu|my account', re.I) diff --git a/backend/tests/test_browser_signed_out.py b/backend/tests/test_browser_signed_out.py index 7bc3c27a..6421f8e8 100644 --- a/backend/tests/test_browser_signed_out.py +++ b/backend/tests/test_browser_signed_out.py @@ -21,6 +21,12 @@ P_HANDLER_TS = os.path.join(P_REPO_ROOT, "frontend", "src", "shared", "browserCo # Page-shaped perceptions, in the interactives format the agent actually sees. BSKY_SIGNED_OUT = '[1]\n[2]