Commit Graph

6 Commits

Author SHA1 Message Date
Panniantong 904f8dfb49 fix: doctor status must be honest — show real capability per channel
Before: everything under tier 0 showed  with vague descriptions
After: each channel shows its actual capability and limitations

Changes:
- GitHub: 'Public repos only. Set github_token for private repos'
- Twitter: shows 'Full access' vs 'Read-only' depending on birdx
- Bilibili: ⚠️ warning on servers about potential IP blocks
- XiaoHongShu: friendly message when no cookie (was showing Jina 451)
- Doctor format: tier 0 items now show detailed status messages, not just 
- README: platform table updated to match reality (removed exaggerated claims)
- README: doctor example updated to show new honest format
2026-02-24 09:00:34 +01:00
Panniantong 07c6efbc7e fix: 4 bugs found in full E2E usage testing
Bug 1: Reddit 403 due to short User-Agent in proxy test
  Root cause: configure proxy test used 'Mozilla/5.0' (too short, Reddit rejects)
  Fix: use full UA string matching the channel implementation

Bug 2: Reddit URL parsing broke on trailing slashes
  Root cause: url.rstrip('/') + '.json' mangled URLs with query params
  Fix: properly parse URL, clean path, reconstruct json URL

Bug 3: Reddit 403 without proxy showed raw HTTP error
  Root cause: no error handling for 403/429 responses
  Fix: friendly message suggesting proxy setup + Exa search alternative

Bug 4: XiaoHongShu without cookie showed Jina Reader 451 error
  Root cause: fallback to Jina Reader which can't access XHS (legal block)
  Fix: show clear message about needing cookies with setup instructions

Bug 5: Empty search query caused raw 422 API error
  Root cause: no input validation before API call
  Fix: check for empty query, show friendly message

All 36 unit tests passing.
2026-02-24 08:52:37 +01:00
Panniantong afe3aceb61 fix: 2 real-usage bugs found in end-to-end testing
Bug 1: search-github/search-twitter silently returned empty
  Root cause: result printing code was inside except block (never reached on success)
  Fix: moved result display code outside try/except

Bug 2: Bilibili returned empty content when server IP is blocked
  Root cause: API returns code -404 but code treated it as success with empty data
  Fix: check API response code, show friendly message with proxy setup hint

Also: GitHub search results now correctly show stars/forks/language from extra dict

All found through real-usage E2E testing (not just install/config testing).
2026-02-24 08:44:29 +01:00
Panniantong 1b8b202e1e feat: complete channel menu install flow + XiaoHongShu channel
Major install flow polish:
- Channels organized by setup difficulty:
  🟢 Zero-config (Web, GitHub, RSS) — works immediately
  🔵 Cookie-based (Twitter, YouTube, Bilibili, XiaoHongShu) — free, ~2min
  🟡 Free API key (Exa Search) — one key, 30 seconds
  🟠 Proxy-based (Reddit, Bilibili on server) — $1/month
- Every channel explains: what it does, what's needed, what you miss without it
- Server vs local affects which channels need proxy

New: XiaoHongShu channel (cookie-based, falls back to Jina Reader)
New configure commands: twitter-cookies, xhs-cookie, youtube-cookies
Each command auto-tests after saving.
2026-02-24 06:31:48 +01:00
Panniantong 83622965d2 feat: add environment detection (local vs server) + Bilibili proxy support
Install guide now asks: local computer or server?
- Server users get proactive guidance on Reddit/Bilibili proxy (/mo Webshare)
- Bilibili channel now supports proxy config (bilibili_proxy)
- Updated step numbering in install guide
2026-02-24 06:12:03 +01:00
Panniantong 74c3df5c3d v2.0.0 — Pure glue architecture: zero copied code, pluggable channels
BREAKING: Complete architectural rewrite.

Before: Copied x-reader's fetcher code into readers/ (1205 lines of borrowed code)
After: Pluggable channel system where each channel is a thin wrapper (~50 lines)
       around the best external tool for that platform. Zero copied code.

Architecture:
- channels/base.py — Universal Channel interface (read, search, check)
- channels/web.py — Jina Reader API (swappable)
- channels/github.py — GitHub API (swappable)
- channels/twitter.py — birdx + Jina fallback (swappable)
- channels/youtube.py — yt-dlp (swappable)
- channels/reddit.py — Reddit JSON API + proxy (swappable)
- channels/rss.py — feedparser (swappable)
- channels/bilibili.py — Bilibili API (swappable)
- channels/exa_search.py — Exa semantic search (swappable)

Key design: every backend can be swapped by changing ONE file.
YouTube dies? Change youtube.py. Exa sucks? Swap exa_search.py for Tavily.
Nothing else changes.

Removed: reader.py, schema.py, readers/, search/, utils/ (all x-reader code)
Tests: 36/36 passing
2026-02-24 05:38:21 +01:00