Repository navigation
feat(fetcher): add rss feed reader - #153
Conversation
Trust gate, fetch error, timeout, unknown-fetcher, and shape-mismatch placeholders all emitted `Body::TextBlock`, causing renderers that only accept other shapes (notably `list_links` → `LinkedTextBlock`) to surface "renderer X cannot display TextBlock" instead of the actual reason. Add `fetcher::placeholder_body(shape, lines)` and route every placeholder through it using each widget's renderer-derived shape. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Supports `LinkedTextBlock` (default — clickable rows for `list_links`) and `TextBlock` shapes. Options: `url` (required, http/https only) and `count` (1..=20, default 5). Network safety class — local configs must be `splashboard trust`-ed before fetching. Caps response body at 5MB. Refs #150. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 19 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
==========================================
- Coverage 78.29% 78.16% -0.13%
==========================================
Files 107 113 +6
Lines 20429 21378 +949
==========================================
+ Hits 15995 16711 +716
- Misses 4434 4667 +233
🚀 New features to boost your workflow:
|
Atom entries can carry both `rel="self"` (entry-as-resource permalink in the feed) and `rel="alternate"` (the article body URL). Picking the first non-empty href grabbed `rel="self"` on common Atom shapes, so `list_links` rendered links that bounced back into the feed instead of the article. Per RFC 4287 the article URL is `rel="alternate"` (which is also the default when `rel` is absent — matching RSS 2.0's single- link case). Falls back to the first non-empty link if no alternate is declared. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Implements
rssfetcher (RSS 2.0 / RSS 1.0 / Atom / JSON Feed viafeed-rs) — the canonical read more main slot candidate from #150 (home_feedmorning briefing preset). First built-inNetwork-class fetcher, so this PR also fixes a latent UX issue surfaced by it: trust / error / timeout / unknown-fetcher placeholders all emittedBody::TextBlock, whichlist_links(and any other shape-strict renderer) rejected — users sawrenderer list_links cannot display TextBlockinstead of🔒 requires trust. Both fixes ship together because rss +list_linksis the canonical pairing #150 specifies.Refs #67 (Social & Media — RSS / news), #150 (home_feed preset).
Commits
fix(runtime): make trust/error placeholders shape-aware— addsfetcher::placeholder_body(shape, lines)helper; routes every placeholder constructor through it using each widget's renderer-derived shape.feat(fetcher): add rss feed reader— newsrc/fetcher/rss.rs, registered inRegistry::with_builtins.feed-rs = "2"added toCargo.toml.Reference page (preview)
Test plan
cargo test— 726 passed (18 new for rss + 2 for placeholder shape adaptation).cargo clippy --all-targets -- -D warningsclean.cargo fmt --all -- --checkclean.cargo run --bin splashboard -- catalog fetcher rssprints schema + compatible renderers.list_linksdefault +countoverride +text_blockfallback) renders feed entries correctly underSPLASHBOARD_TRUST_ALL=1.🔒 requires trust(previously two of them showedcannot display TextBlock).#[ignore]'d live test againsthttps://blog.rust-lang.org/feed.xmlruns green (cargo test -- --ignored fetcher::rss::tests::live).Out of scope
wikipedia_on_this_day,lobsters_top, etc.) — separate PRs.rssinto thehome_feedpreset itself — needs the other body-2 / body-3 fetchers first.🤖 Generated with Claude Code