diff --git a/GramAddict/core/perception/screen_identity.py b/GramAddict/core/perception/screen_identity.py index 0f8f668..385715a 100644 --- a/GramAddict/core/perception/screen_identity.py +++ b/GramAddict/core/perception/screen_identity.py @@ -198,12 +198,16 @@ class ScreenIdentity: "next_button_textview", ) browser_markers = ("ig_browser_text_title", "ig_browser_close_button", "ig_chrome_subsection") + bottom_sheet_markers = ("bottom_sheet_container", "action_sheet_container") if not is_normal_override and any(marker in ids_str for marker in creation_flow_markers): logger.info("🛡️ [ScreenIdentity] Content-creation overlay detected → MODAL") return ScreenType.MODAL if not is_normal_override and any(marker in ids_str for marker in browser_markers): logger.info("🛡️ [ScreenIdentity] In-App Browser detected → MODAL") return ScreenType.MODAL + if not is_normal_override and any(marker in ids_str for marker in bottom_sheet_markers): + logger.info("🛡️ [ScreenIdentity] Bottom Sheet Modal detected → MODAL") + return ScreenType.MODAL # Priority 2: Structural Heuristics (100% Deterministic) if "unified_follow_list_tab_layout" in ids or "follow_list_container" in ids: diff --git a/GramAddict/core/situational_awareness.py b/GramAddict/core/situational_awareness.py index 3627bad..1e125bf 100644 --- a/GramAddict/core/situational_awareness.py +++ b/GramAddict/core/situational_awareness.py @@ -486,6 +486,8 @@ class SituationalAwarenessEngine: "ig_browser_text_title", # In-App Browser Title "ig_browser_close_button", # In-App Browser Close Button "ig_chrome_subsection", # In-App Browser Chrome + "bottom_sheet_container", # Bottom sheet modal (e.g., following options) + "action_sheet_container", # Action sheet modal ) if any( re.search(rf'resource-id="[^"]*{marker}[^"]*"', xml_dump, re.IGNORECASE)