magpie/app/services/reddit
Alan Weinstock f39f36e258 feat(discovery): subreddit discovery and rule classification (#2)
- Add app/services/reddit/discovery.py:
  - search_subs(): searches /subreddits/search.json by keyword
  - analyze_sub(): fetches /about.json + /about/rules.json per sub
  - _classify_rules(): keyword-pattern classifier for promo policy
    (banned / conditional / unknown; hard to positively confirm allowed)
  - search_and_analyze(): combined search + per-sub analysis entry point
  - Unauthenticated-friendly (uses auth cookies when available)
- Add POST /subs/discover endpoint: returns candidate list with
  promo_allowed, flair_required, subscriber count, notes excerpt,
  and already_tracked flag. Nothing stored until user imports.
- Add SubDiscoveryResult interface and api.subs.discover() in api.ts
- Rework SubRulesView: slide-in discovery panel (right drawer),
  per-row Import button, auto-marks already-tracked subs, immutable
  result update on import

Closes: #2
2026-06-13 22:17:53 -07:00
..
__init__.py feat: scaffold Magpie — campaign scheduler + social posting platform 2026-04-21 16:51:33 -07:00
client.py feat(engagement): poll Reddit post metrics after posting (#6) 2026-06-13 22:02:07 -07:00
discovery.py feat(discovery): subreddit discovery and rule classification (#2) 2026-06-13 22:17:53 -07:00
post.py feat: opportunities UI improvements, MCP tools, session refresh, migrations 013-014 2026-04-27 07:49:34 -07:00
session.py fix(session): pass REDDIT_SESSION_FILE env to post.py subprocess; fix status check path 2026-06-01 15:37:35 -07:00