Skip to content

World's first open-source enterprise world model.

The RSS block is one nullable object (#627)

WaylandYangb0b019f5d7e4
diff --git a/crates/utopia-core/src/models.rs b/crates/utopia-core/src/models.rs
index fd79d4b3..44c8784b 100644
--- a/crates/utopia-core/src/models.rs
+++ b/crates/utopia-core/src/models.rs
@@ -333,15 +333,33 @@ pub struct SourceView {
pub doc_count: i64,
/// 已标记"不在来源中"的文档数(url 全集对账 / custom 墓碑产生)
pub missing_count: i64,
- /// full_new_items 的当前代状态;非 full-content 来源为 NULL
- pub rss_full_content_state: Option<String>,
- pub rss_full_content_generation: Option<i32>,
- pub rss_full_content_baseline_count: Option<i32>,
- pub rss_full_content_pending_count: i64,
- pub rss_full_content_queued_count: i64,
- pub rss_full_content_retrying_count: i64,
- pub rss_full_content_complete_count: i64,
- pub rss_full_content_terminal_count: i64,
+ /// 全文补全那一块。**不是 RSS 的来源整块是 NULL**(0033 决定 2 / #417)。
+ /// 从前这里是八个平铺的列,而「不适用」在其中三个上写作 NULL、在另外五个
+ /// 上写作 0——一个文件夹来源会报 `queued_count: 0`,那是在谈一个它根本
+ /// 没有的队列。现在适不适用由这一格在不在说了算
+ #[sqlx(json(nullable))]
+ pub rss_full_content: Option<RssFullContentSummary>,
+}
+
+/// 一个 RSS 来源当前代的全文补全进度。
+///
+/// 五个计数只有凑在一起才有意义(Library 那条状态栏一次读完),所以一起走。
+/// `state` 是服务端算好的那一档,调用方不必拿 kind 与 content_mode 再推一遍。
+///
+/// **`generation` 与 `baseline_count` 不在这里**(0033 决定 2):代号是内部状态,
+/// 基线那一批也不属于「还有多少活要干」这五个数——它是起点,不是进度。
+/// 要它们的地方读 `rss_full_content::counts`。
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct RssFullContentSummary {
+ /// `pending`(还没建基线)| `active` | `disabled`(是 RSS,但没开全文)
+ pub state: String,
+ pub pending: i64,
+ /// queued 与 hydrating 合成一格
+ pub queued: i64,
+ pub retrying: i64,
+ pub complete: i64,
+ /// terminal、deleted、superseded 合成一格
+ pub terminal: i64,
}
/// 审计事件视图(带操作人显示名;删号后为 NULL)。纯审计展示用。
diff --git a/crates/utopia-store/src/sources.rs b/crates/utopia-store/src/sources.rs
index de9a319e..18c29efe 100644
--- a/crates/utopia-store/src/sources.rs
+++ b/crates/utopia-store/src/sources.rs
@@ -86,8 +86,8 @@ pub async fn list(pool: &PgPool, kb_id: Uuid) -> AppResult<Vec<SourceView>> {
// 的密钥就这么漏出去的(#246)
// 外层别名不能与 ENTRY_SELECT 的来源别名重名;来源和当前代谓词必须留在投影内部,
// 否则 PostgreSQL 会先计算部署中的全部 observation,再丢弃与当前来源无关的行。
- let rows: Vec<SourceView> = sqlx::query_as(
- &format!("SELECT listed_source.id, listed_source.kind, listed_source.name,
+ let rows: Vec<SourceView> = sqlx::query_as(&format!(
+ "SELECT listed_source.id, listed_source.kind, listed_source.name,
listed_source.config - $2::text[] AS config, listed_source.icon,
listed_source.sync_interval_minutes, listed_source.sync_cron,
listed_source.last_sync_at, listed_source.last_sync_status,
@@ -97,16 +97,23 @@ pub async fn list(pool: &PgPool, kb_id: Uuid) -> AppResult<Vec<SourceView>> {
(SELECT count(*) FROM documents d
WHERE d.source_id = listed_source.id AND d.missing_since IS NOT NULL
AND d.deleted_at IS NULL) AS missing_count,
- CASE WHEN listed_source.kind <> 'rss' THEN NULL
- WHEN listed_source.config->>'content_mode' IS DISTINCT FROM 'full_new_items' THEN 'disabled'
- WHEN listed_source.rss_baselined_at IS NULL THEN 'pending' ELSE 'active' END AS rss_full_content_state,
- CASE WHEN listed_source.kind='rss' THEN listed_source.rss_generation END AS rss_full_content_generation,
- COALESCE(hydration.baseline_count, 0) AS rss_full_content_baseline_count,
- COALESCE(hydration.pending, 0) AS rss_full_content_pending_count,
- COALESCE(hydration.queued, 0) AS rss_full_content_queued_count,
- COALESCE(hydration.retrying, 0) AS rss_full_content_retrying_count,
- COALESCE(hydration.complete, 0) AS rss_full_content_complete_count,
- COALESCE(hydration.terminal, 0) AS rss_full_content_terminal_count
+ -- 整块出去,不是八个平铺的列(0026 / #417)。**不是 RSS 的来源
+ -- 这一格就是 NULL**:从前「不适用」在 state 上写作 NULL、在五个
+ -- 计数上写作 0,同一件事两套说法,而 `queued_count: 0` 读起来
+ -- 像「队列空着」。计数在块里仍然 COALESCE 成 0——这时候它真是
+ -- 「这一档现在没有」,不是「不适用」。
+ CASE WHEN listed_source.kind = 'rss' THEN jsonb_build_object(
+ 'state', CASE
+ WHEN listed_source.config->>'content_mode' IS DISTINCT FROM 'full_new_items'
+ THEN 'disabled'
+ WHEN listed_source.rss_baselined_at IS NULL THEN 'pending'
+ ELSE 'active' END,
+ 'pending', COALESCE(hydration.pending, 0),
+ 'queued', COALESCE(hydration.queued, 0),
+ 'retrying', COALESCE(hydration.retrying, 0),
+ 'complete', COALESCE(hydration.complete, 0),
+ 'terminal', COALESCE(hydration.terminal, 0)
+ ) END AS rss_full_content
FROM sources listed_source
LEFT JOIN LATERAL (
SELECT
@@ -126,9 +133,8 @@ pub async fn list(pool: &PgPool, kb_id: Uuid) -> AppResult<Vec<SourceView>> {
) projected
) hydration ON listed_source.kind = 'rss'
WHERE listed_source.kb_id = $1 ORDER BY listed_source.created_at",
- crate::rss_full_content::ENTRY_SELECT
- ),
- )
+ crate::rss_full_content::ENTRY_SELECT
+ ))
.bind(kb_id)
.bind(SOURCE_SECRET_KEYS)
.fetch_all(pool)
diff --git a/crates/utopia-store/tests/rss_full_content.rs b/crates/utopia-store/tests/rss_full_content.rs
index e2c21447..0b2613f4 100644
--- a/crates/utopia-store/tests/rss_full_content.rs
+++ b/crates/utopia-store/tests/rss_full_content.rs
@@ -162,7 +162,14 @@ async fn delayed_observation_cannot_cross_purge_and_diagnostics_hide_job_errors(
.unwrap();
assert_eq!(counts.terminal_count, 1);
let sources = utopia_store::sources::list(&pool, kb).await?;
- assert_eq!(sources[0].rss_full_content_terminal_count, 1);
+ assert_eq!(
+ sources[0]
+ .rss_full_content
+ .as_ref()
+ .expect("RSS 全文来源有这一块")
+ .terminal,
+ 1
+ );
// A live document is the accepted-content authority even if an older job failed.
utopia_store::documents::create_with_version_and_processing(
&pool,
@@ -380,27 +387,26 @@ async fn source_list_exposes_scoped_rss_summary() -> anyhow::Result<()> {
.iter()
.find(|source| source.id == id)
.ok_or_else(|| anyhow::anyhow!("{kind} source is missing"))?;
- assert!(source.rss_full_content_state.is_none());
- assert!(source.rss_full_content_generation.is_none());
- assert_eq!(source.rss_full_content_baseline_count, Some(0));
- assert_eq!(source.rss_full_content_pending_count, 0);
- assert_eq!(source.rss_full_content_queued_count, 0);
- assert_eq!(source.rss_full_content_retrying_count, 0);
- assert_eq!(source.rss_full_content_complete_count, 0);
- assert_eq!(source.rss_full_content_terminal_count, 0);
+ // **不是 RSS 的来源整块都不在。**从前这八列里三列是 NULL、五列是 0,
+ // 于是一个文件夹来源会报 `queued_count: 0`——在谈一个它没有的队列
+ assert!(
+ source.rss_full_content.is_none(),
+ "{kind} 不是 RSS 全文来源,不该有这一块"
+ );
}
let rss = listed
.iter()
.find(|source| source.id == source_id)
.ok_or_else(|| anyhow::anyhow!("RSS source is missing"))?;
- assert_eq!(rss.rss_full_content_state.as_deref(), Some("pending"));
+ let block = rss.rss_full_content.as_ref().expect("RSS 全文来源有这一块");
+ assert_eq!(block.state, "pending");
assert_eq!(
(
- rss.rss_full_content_pending_count,
- rss.rss_full_content_queued_count,
- rss.rss_full_content_retrying_count,
- rss.rss_full_content_complete_count,
- rss.rss_full_content_terminal_count
+ block.pending,
+ block.queued,
+ block.retrying,
+ block.complete,
+ block.terminal
),
(0, 0, 0, 0, 0)
);
@@ -474,16 +480,14 @@ async fn source_list_exposes_scoped_rss_summary() -> anyhow::Result<()> {
.iter()
.find(|source| source.id == source_id)
.ok_or_else(|| anyhow::anyhow!("RSS source is missing after discovery"))?;
- assert_eq!(rss.rss_full_content_state.as_deref(), Some("active"));
- assert_eq!(rss.rss_full_content_pending_count, 1);
+ let block = rss.rss_full_content.as_ref().expect("RSS 全文来源有这一块");
+ assert_eq!(block.state, "active");
+ assert_eq!(block.pending, 1);
+ assert_eq!(block.queued, 2, "queued and hydrating share one bucket");
+ assert_eq!(block.retrying, 1);
+ assert_eq!(block.complete, 1);
assert_eq!(
- rss.rss_full_content_queued_count, 2,
- "queued and hydrating share one bucket"
- );
- assert_eq!(rss.rss_full_content_retrying_count, 1);
- assert_eq!(rss.rss_full_content_complete_count, 1);
- assert_eq!(
- rss.rss_full_content_terminal_count, 3,
+ block.terminal, 3,
"terminal, deleted and superseded share one bucket"
);
assert_eq!(
@@ -503,12 +507,10 @@ async fn source_list_exposes_scoped_rss_summary() -> anyhow::Result<()> {
.iter()
.find(|source| source.id == source_id)
.ok_or_else(|| anyhow::anyhow!("RSS source is missing after generation change"))?;
- assert_eq!(rss.rss_full_content_state.as_deref(), Some("active"));
- assert_eq!(
- rss.rss_full_content_pending_count, 1,
- "old-generation observations are excluded"
- );
- assert_eq!(rss.rss_full_content_terminal_count, 0);
+ let block = rss.rss_full_content.as_ref().expect("RSS 全文来源有这一块");
+ assert_eq!(block.state, "active");
+ assert_eq!(block.pending, 1, "old-generation observations are excluded");
+ assert_eq!(block.terminal, 0);
sqlx::query(
"UPDATE sources
@@ -523,11 +525,11 @@ async fn source_list_exposes_scoped_rss_summary() -> anyhow::Result<()> {
.iter()
.find(|source| source.id == source_id)
.ok_or_else(|| anyhow::anyhow!("RSS source is missing after disabling"))?;
- assert_eq!(rss.rss_full_content_state.as_deref(), Some("disabled"));
- assert_eq!(
- rss.rss_full_content_terminal_count, 1,
- "disabled current rows are superseded"
- );
+ // 关掉全文的 RSS 来源**这一块仍然在**:它还是 RSS,只是这一档关着,
+ // 而那些观察还在库里。不适用的是"根本不是 RSS",不是"没开全文"
+ let block = rss.rss_full_content.as_ref().expect("还是 RSS,块还在");
+ assert_eq!(block.state, "disabled");
+ assert_eq!(block.terminal, 1, "disabled current rows are superseded");
cleanup(&pool, org_id).await?;
Ok(())
@@ -578,7 +580,7 @@ async fn source_list_counts_only_the_listed_source() -> anyhow::Result<()> {
listed
.iter()
.find(|source| source.id == id)
- .map(|source| source.rss_full_content_pending_count)
+ .map(|source| source.rss_full_content.as_ref().map_or(0, |b| b.pending))
.ok_or_else(|| anyhow::anyhow!("source {id} is missing from its base's list"))
}
@@ -595,8 +597,9 @@ async fn source_list_counts_only_the_listed_source() -> anyhow::Result<()> {
"a second source in the same base does not inherit the first's rows"
);
for source in &listed {
- assert_eq!(source.rss_full_content_complete_count, 0);
- assert_eq!(source.rss_full_content_terminal_count, 0);
+ let counts = source.rss_full_content.as_ref();
+ assert_eq!(counts.map_or(0, |b| b.complete), 0);
+ assert_eq!(counts.map_or(0, |b| b.terminal), 0);
}
let listed = utopia_store::sources::list(&pool, other_kb_id).await?;
diff --git a/docs/decisions/0033-rss-source-summaries-are-source-scoped.md b/docs/decisions/0033-rss-source-summaries-are-source-scoped.md
index 7cdff3be..1884ae16 100644
--- a/docs/decisions/0033-rss-source-summaries-are-source-scoped.md
+++ b/docs/decisions/0033-rss-source-summaries-are-source-scoped.md
@@ -1,6 +1,6 @@
# 0033 · RSS summaries are scoped to the source being listed
-- **Status**: query implemented for #417; nested public contract pending
+- **Status**: Implemented · the source- and generation-scoped lateral landed in #462; the nested `rss_full_content` contract landed in #417's second cut
- **Written**: 2026-09-06 (conventions in the [README](README.md))
- **Related**: [0023](0023-rss-observations-are-not-documents.md) established RSS observations as a separate responsibility from documents; #417 changes the public `SourceView` contract while fixing the scope of its RSS summary.
@@ -47,6 +47,8 @@ The Rust API will expose a strongly typed `RssFullContentSummary`, not an arbitr
The store will deserialize a private flat `SourceListRow`, then explicitly convert it to `SourceView`. Missing SQL fields or a row that cannot form the required RSS object are storage errors; the conversion will not use `unwrap`, `expect` or silent defaults to hide them.
+> **Revised 2026-09-12, in the cut that implemented this.** The mechanism is the one thing here that did not survive contact. The query builds the object with `jsonb_build_object` inside the existing `CASE WHEN kind = 'rss'`, and `SourceView` reads it through `#[sqlx(json(nullable))]`; there is no second flat row struct. What that paragraph was protecting is intact and arguably better served: the type is still `RssFullContentSummary` and not an arbitrary JSON value, a block that cannot be formed is a deserialization error from the driver rather than a default, and there is no `unwrap` or `expect` on the path. What it cost, had it been followed literally, was a private struct restating all fourteen non-RSS columns so that six of them could be moved — a second place to forget a column, to buy a guarantee the typed column already gives. The shape of the contract, which is what this decision is actually about, is unchanged.
+
The TypeScript contract and Library consumer will use the nested object and first check it for null. No compatibility double-write of the old fields is planned. No UI redesign, new component, visual-style change or new copy is part of this decision.
### 3. Do not add schema or runtime dependencies
diff --git a/docs/decisions/README.md b/docs/decisions/README.md
index 54218dd8..b92bdbae 100644
--- a/docs/decisions/README.md
+++ b/docs/decisions/README.md
@@ -56,7 +56,7 @@ The test for writing one: if someone (including us) looks at a piece of code in
| 0030 | [A rule may read what a rule concluded](0030-a-rule-may-read-what-a-rule-concluded.md) | Cuts 1–2 · A rule could not read another rule's conclusion (`attribute_facts()` reads `facts`, subject scope is `entities.type_id`, one pass), so `A → B → C` has to be written as one flattened rule. The answer is the fixed point the axiom side already runs, **inside one call and in memory** — which answers 0013's objection instead of waiving it, since a run stays a pure function of the asserted facts. A derived typing enters as a **premise**, not a filter, so the conclusion narrows to the window the entity was actually a `B`; a rule may read its own conclusions because the derivable space is finite; `fact_derivations` gains `premise_derived_id` and the proof becomes a tree; retirement cascades for free because recompute is total. The page showing which rules feed which is next |
| 0031 | [An event holds at the moment it names](0031-an-event-holds-at-the-moment-it-names.md) | Implemented (#486) · `Validity::under` normalises every write by the predicate's `temporal` (an event is one moment written at both ends, an eternal fact has no dates), `world_axis` and `read_span` read an event as the bucket it names and an undated event at no moment, an eternal fact at every moment · the prompt marks `[event]` / `[eternal]` and says what to write · no schema change, old rows read correctly · the panel's point rendering and the ontology hint are the UI cut |
| 0032 | [A rule computes what it concludes](0032-a-rule-computes-what-it-concludes.md) | Cuts 1–2 · A rule's conclusion was a **constant** (`attribute_rules.conclude_value` is a JSONB literal), so a criterion about a number nobody wrote down — net pay, a margin, a ratio — gets computed elsewhere and typed back in as an assertion, losing the readings it stood on. An operand on either side becomes an expression tree over attributes: its premises are the readings it touched and its interval is their intersection, so retirement needs no new machinery. **Picked, not typed** — not because a parsed string would break the display (it would not; that reason is wrong and recorded as wrong) but because a picker cannot compose an expression over a predicate that does not exist, and because a text box grows a grammar on request. A value may be reached **across a relation** (a path has definite premises and an interval; a to-many path is just a cartesian product the evaluator already walks), while **aggregation is refused**: a `sum` asserts *these are all the readings*, a completeness claim this base cannot hold — and while recompute still retires it correctly, its proof cannot say why it was withdrawn, and nothing incremental could ever wake it. Row count, unit checking and division by zero are the costs |
-| 0033 | [RSS summaries are scoped to the source being listed](0033-rss-source-summaries-are-source-scoped.md) | Query implemented for #417 · source- and generation-scoped lateral aggregation preserves the flat API; nested `rss_full_content` public contract pending; baseline rows are intentionally outside the five work counts |
+| 0033 | [RSS summaries are scoped to the source being listed](0033-rss-source-summaries-are-source-scoped.md) | Implemented · source- and generation-scoped lateral aggregation (#462), then the nested nullable `rss_full_content` contract replacing the eight flat columns (#417); `generation` and `baseline_count` stay internal, and baseline rows are intentionally outside the five work counts |
| 0034 | [An action is a declared call](0034-an-action-is-a-declared-call.md) | Cut 1 · the record. A base can conclude but cannot act: nothing holds a call it may make, a typed parameter, or what it sent. An action is **data** (method, URL, headers, a sealed auth block, a JSON body template, scalar parameters with bounds or a value set), substituted and never scripted, so the page renders what runs and an unknown placeholder is refused at save. Registered once for the deployment and **granted** to a base, one layer where warehouses have two because nothing is mounted. Every run is a row read by two log pages. The reach is the operator's, with no placeholder in the host. Rules fire actions in the next record |
| 0035 | [A vector index is built by a job](0035-a-vector-index-is-built-by-a-job.md) | Implemented · a partial HNSW index per dimension on `chunks.embedding` and `entities.profile_embedding`, requested by the first write of that dimension and built by a `build_vector_index` job outside any transaction · the two nearest-neighbour reads write the dimension as a literal, cast both sides and set `hnsw.iterative_scan = relaxed_order` · type resolution gathers its neighbours eight at a time in order and remembers descendant sets per batch (#512, #514) · dimensions above 2000 stay on the exact path |
| 0036 | [Exploration aligns a schema to the ontology](0036-exploration-aligns-a-schema-to-the-ontology.md) | Written, not implemented · exploration proposes an alignment per table (the class it is a table of, its attributes, its relations, a conversion tree per column) through `ontology_proposals`, adopted as one thing · a definition is a rule over aligned attributes, written by a person; a shared convention is one rule others read · conversions are 0032's expression tree, text parsed by `sqlparser`, never stored as SQL · `Metric` / `Dimension` retire and `concept_mappings` becomes rendered · the schema document leaves extraction · where a rule runs against the source stays open |
diff --git a/web/src/api.ts b/web/src/api.ts
index 3ae0cb8a..e81babe5 100644
--- a/web/src/api.ts
+++ b/web/src/api.ts
@@ -218,14 +218,21 @@ export interface SourceView {
last_sync_added: number;
doc_count: number;
missing_count: number;
- rss_full_content_state: "pending" | "active" | "disabled" | null;
- rss_full_content_generation: number | null;
- rss_full_content_baseline_count: number | null;
- rss_full_content_pending_count: number;
- rss_full_content_queued_count: number;
- rss_full_content_retrying_count: number;
- rss_full_content_complete_count: number;
- rss_full_content_terminal_count: number;
+ /** 全文补全那一块;**不是 RSS 全文来源的就是 null**,不用再拿 kind 与
+ * content_mode 自己推一遍适不适用(0026 / #417) */
+ rss_full_content: RssFullContentSummary | null;
+}
+
+/** 一个 RSS 来源当前代的全文补全进度。五个计数一起读,所以一起给。 */
+export interface RssFullContentSummary {
+ state: "pending" | "active" | "disabled";
+ pending: number;
+ /** queued 与 hydrating 合成一格 */
+ queued: number;
+ retrying: number;
+ complete: number;
+ /** terminal、deleted、superseded 合成一格 */
+ terminal: number;
}
export interface SearchResult {
diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts
index a06c3aec..81188916 100644
--- a/web/src/i18n/en.ts
+++ b/web/src/i18n/en.ts
@@ -610,8 +610,9 @@ export const en = {
"The first sync records what the feed holds now and imports nothing. Each item that appears after that is stored from the feed's own text when there is enough of it, otherwise from the linked article; an item with neither is listed as skipped.",
rssFeedModeHint:
"Stores what the feed itself carries — the entry text or its summary — and never opens the linked article.",
- rssHydrationCounts: (pending: number, queued: number, retrying: number, complete: number, terminal: number) =>
- `pending ${pending} · queued ${queued} · retrying ${retrying} · complete ${complete} · terminal ${terminal}`,
+ // 五个数一起读,所以收一个对象:分开传五个位置参数,调换两个不会有人发现
+ rssHydrationCounts: (c: { pending: number; queued: number; retrying: number; complete: number; terminal: number }) =>
+ `pending ${c.pending} · queued ${c.queued} · retrying ${c.retrying} · complete ${c.complete} · terminal ${c.terminal}`,
repoField: "Repository (owner/name)",
jiraUrlField: "Jira site URL",
jiraProjectField: "Project key",
diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts
index 39d1f154..194e3b94 100644
--- a/web/src/i18n/zh.ts
+++ b/web/src/i18n/zh.ts
@@ -556,8 +556,8 @@ export const zh: Strings = {
rssFullModeHint:
"第一次同步只记下订阅当前有哪些条目,不导入。之后新出现的条目,订阅自带的正文够长就用它,不够就去抓链接的文章;两者都没有的条目记为跳过。",
rssFeedModeHint: "只存订阅自带的内容——正文或摘要——不去打开链接的文章。",
- rssHydrationCounts: (pending: number, queued: number, retrying: number, complete: number, terminal: number) =>
- `待处理 ${pending} · 排队 ${queued} · 重试 ${retrying} · 完成 ${complete} · 终止 ${terminal}`,
+ rssHydrationCounts: (c: { pending: number; queued: number; retrying: number; complete: number; terminal: number }) =>
+ `待处理 ${c.pending} · 排队 ${c.queued} · 重试 ${c.retrying} · 完成 ${c.complete} · 终止 ${c.terminal}`,
repoField: "仓库(owner/name)",
jiraUrlField: "Jira 地址",
jiraProjectField: "项目 key",
diff --git a/web/src/pages/Library.tsx b/web/src/pages/Library.tsx
index f0d35bc3..3401c447 100644
--- a/web/src/pages/Library.tsx
+++ b/web/src/pages/Library.tsx
@@ -931,6 +931,9 @@ function SourceBar({
(cfg.urls ? `${cfg.urls.length} URLs` : "");
const rssMode: RssContentMode =
cfg.content_mode === "full_new_items" ? "full_new_items" : "feed";
+ // 补全进度只在这一档开着时才有话说
+ const hydration =
+ source.rss_full_content?.state === "disabled" ? null : source.rss_full_content;
return (
<div className="glass rounded-panel mb-3">
@@ -973,18 +976,16 @@ function SourceBar({
? S.library.rssModeFullShort
: S.library.rssModeFeedShort}
</span>
- {rssMode === "full_new_items" && (
- <>
- <span className="text-ink-2 shrink-0 u-num">
- {S.library.rssHydrationCounts(
- source.rss_full_content_pending_count,
- source.rss_full_content_queued_count,
- source.rss_full_content_retrying_count,
- source.rss_full_content_complete_count,
- source.rss_full_content_terminal_count,
- )}
- </span>
- </>
+ {/* **这一档开没开由服务端的 `state` 说,不由前端重推。**
+ 从前这里是 `rssMode === "full_new_items"`——把服务端那条
+ CASE 在前端又算了一遍,同一条规矩两份。
+ 块对任何 RSS 来源都在(0033 决定 2),所以看的是 state:
+ `disabled` 的来源没有补全队列,那五个 0 不是「队列空着」,
+ 是「这里没有队列」,不该显示。 */}
+ {hydration && (
+ <span className="text-ink-2 shrink-0 u-num">
+ {S.library.rssHydrationCounts(hydration)}
+ </span>
)}
</>
)}