Add a browser-facing Miniflux URL and link feeds to their entries page

The pipeline talks to Miniflux on loopback, so links meant for a person
need their own base. `[miniflux].public_url` defaults to base_url, and
`feed_url` builds the web UI's `/feed/{id}/entries` page, which the feeds
dashboard now uses instead of the non-existent `/feeds/{id}` route.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWmCpUojfHXhSZ2129Z7Nv
This commit is contained in:
2026-09-09 05:45:14 +00:00
co-authored by Claude Fable 5.1
parent c8df55e91a
commit 8a8d5d1f16
4 changed files with 68 additions and 6 deletions
+4 -6
View File
@@ -88,7 +88,7 @@ struct FeedRow {
/// timestamps sit in the cell's tooltip.
seen: String,
decided_at: String,
/// `{miniflux.base_url}/feeds/{id}` for a candidate we subscribed to.
/// The Miniflux web UI page for a candidate we subscribed to.
miniflux_href: Option<String>,
}
@@ -157,10 +157,9 @@ async fn index(
None => load_evidence(db, &config, &candidates).await?,
};
let titles = article_titles(db, &candidates).await?;
let base_url = config.miniflux.base_url.trim_end_matches('/').to_string();
let rows: Vec<FeedRow> = candidates
.iter()
.map(|candidate| row(candidate, &evidence, &titles, &config, &base_url))
.map(|candidate| row(candidate, &evidence, &titles, &config))
.collect();
// The picker is only ever used by the candidate view, so only it pays for
@@ -381,7 +380,6 @@ fn row(
evidence: &HashMap<ArticleId, ArticleEvidence>,
titles: &HashMap<ArticleId, String>,
config: &Config,
base_url: &str,
) -> FeedRow {
let mut scored = evidence_of(candidate, evidence);
let score = discovery::score(&scored);
@@ -433,7 +431,7 @@ fn row(
decided_at: fmt_stored_time(candidate.decided_at.as_deref(), config),
miniflux_href: candidate
.miniflux_feed_id
.map(|feed_id| format!("{base_url}/feeds/{feed_id}")),
.map(|feed_id| config.miniflux.feed_url(feed_id)),
}
}
@@ -610,7 +608,7 @@ mod tests {
assert!(body.contains("Added Strong Blog."), "{body}");
let added =
response_text(get(&app, "/dashboard/feeds?status=added", Some(&admin)).await).await;
assert!(added.contains("/feeds/77"), "{added}");
assert!(added.contains("/feed/77/entries"), "{added}");
}
#[tokio::test]
+2
View File
@@ -218,6 +218,7 @@ pub const RESTART_REQUIRED: &[&str] = &[
/// Optional keys that `Config::default()` leaves unset (and therefore do not
/// appear when the defaults are serialized), with the kind they take.
const OPTIONAL_KEYS: &[(&str, FieldKind)] = &[
("miniflux.public_url", FieldKind::Text),
("miniflux.api_key", FieldKind::Secret),
("providers.*.api_key", FieldKind::Secret),
("providers.*.effort", FieldKind::Text),
@@ -296,6 +297,7 @@ pub const SETTINGS_HELP: &[(&str, &str)] = &[
("profile_path", "Hand-maintained reader profile, loaded every run."),
("interests_opml", "Scour interests OPML merged with the profile interests."),
("miniflux.base_url", "Miniflux root (no /v1)."),
("miniflux.public_url", "Browser-facing Miniflux web UI URL for dashboard links. Defaults to miniflux.base_url."),
("miniflux.api_key", "X-Auth-Token for Miniflux. Required; environment only."),
("miniflux.page_limit", "Entries per page for GET /v1/entries; Miniflux caps this at 250."),
("llm.bulk", "The [providers.*] name that runs triage, deep assessment and every fallback. Empty means no bulk provider (those stages are skipped)."),