fix(perception): avoid skipping first highlight story by differentiating from home feed tray
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user