From 604f2d7341d976e7d1e1033b5f2af9015f7cecc2 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 3 May 2026 16:38:02 +0200 Subject: [PATCH] fix(perception): avoid skipping first highlight story by differentiating from home feed tray --- GramAddict/core/perception/intent_resolver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GramAddict/core/perception/intent_resolver.py b/GramAddict/core/perception/intent_resolver.py index e862914..a0078bd 100644 --- a/GramAddict/core/perception/intent_resolver.py +++ b/GramAddict/core/perception/intent_resolver.py @@ -294,8 +294,9 @@ class IntentResolver: # Sort horizontally (left-to-right) story_nodes.sort(key=lambda n: n.x1) - # If we are looking at the home feed story tray (avatar_image_view) - if "avatar_image_view" in (story_nodes[0].resource_id or "").lower(): + # Check if this is the home feed story tray (avatar_image_view without 'highlight' in desc) + is_highlight = any("highlight" in (n.content_desc or "").lower() for n in story_nodes) + if "avatar_image_view" in (story_nodes[0].resource_id or "").lower() and not is_highlight: if len(story_nodes) > 1: logger.info(f"🎯 [Structural Fast-Path] Found {len(story_nodes)} story rings. Skipping own profile. Picking second: '{story_nodes[1].content_desc}'") return story_nodes[1]