when communities are selected in user settings, all feeds disappear #28
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
● CRITICAL DISCREPANCY IDENTIFIED!
Here's the major mismatch between the community selection system and the actual post data:
🔍 THE PROBLEM:
User Settings: {"communities": []} - Empty array means user doesn't see ANY posts.
Post Data Structure: Posts have "source": "hackernews" for ALL HackerNews posts, regardless of community.
📊 Actual Data vs. Expected Data:
🔧 Specific Discrepancies Found:
- "front_page" (from platform config)
- "ask" (Ask HN)
- "show" (Show HN)
🎯 The Filtering Logic Issue:
In app.py:461-464:
if (post_source == selected_community or
post_platform == selected_community or
selected_community in post_source):
Since:
Result: NO POSTS EVER MATCH because user has no communities selected!
🔥 Two Separate Problems:
💡 Solution:
Quick Fix: Update some communities for the user:
Set user communities to enable them to see posts
user.settings = '{"communities": ["hackernews", "front_page", "ask", "show"]}'
Long-term Fix: Update data collection to store proper community identifiers in the source field.