From f148efd2a0392dc44219ec0792eb05b308a96c23 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 27 Apr 2026 14:59:47 +0200 Subject: [PATCH] fix(obstacle_guard): prevent softlock in ReelsFeed by scoping feed marker strictness to classic feeds only --- GramAddict/core/behaviors/obstacle_guard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GramAddict/core/behaviors/obstacle_guard.py b/GramAddict/core/behaviors/obstacle_guard.py index c0fbc9d..96bf1a2 100644 --- a/GramAddict/core/behaviors/obstacle_guard.py +++ b/GramAddict/core/behaviors/obstacle_guard.py @@ -72,8 +72,12 @@ class ObstacleGuardPlugin(BehaviorPlugin): else: # SituationType.NORMAL nav_graph = ctx.cognitive_stack.get("nav_graph") current_state = nav_graph.current_state if nav_graph else "Unknown" + + # The 'row_feed_button_like' marker is ONLY present in classic feeds. + # Do not enforce this check for ReelsFeed, OwnProfile, FollowList, etc. + classic_feed_states = ["home_feed", "HOME_FEED", "explore_feed", "EXPLORE_FEED", "user_feed", "USER_FEED"] - if "row_feed_button_like" not in xml and current_state != "ProfileView": + if "row_feed_button_like" not in xml and current_state in classic_feed_states: logger.info("🧩 [ObstacleGuard] Missing feed markers. Scrolling...") ctx.shared_state["consecutive_marker_misses"] = misses + 1 if ctx.shared_state["consecutive_marker_misses"] >= 3: