feat(subscriptions): 按 MP 收敛订阅默认值与表单

- 定时主动搜索默认关(DEFAULT_SEARCH_INTERVAL_HOURS = 0),新建 / 手动照常各搜一次,之后靠 RSS 与站点快照
- 多版本自动补全系统缺省改为关
- 表单:基础页 = 作品与范围、下载、洗版;收录版本、优先级、自动补全折叠到进阶页「多版本」
- 对照文档 §7.3 记录落实范围

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-02 22:34:48 +08:00
1 parent 709414778e
commit ed083fd138
12 files changed
+111 -74

No files matched your search

+4 -1
View File
@@ -76,7 +76,7 @@ export const Subscription = EntityBase.extend({
statusReason: z.string().nullable(),
lastCheckedAt: Timestamp.nullable(),
createdBy: z.string().nullable(),
/** 上次主动搜索时间 / 下次到期(按 params.searchIntervalHours,缺省 24h) */
/** 上次主动搜索时间 / 下次到期(按 params.searchIntervalHours,缺省不周期搜索) */
lastSearchedAt: Timestamp.nullable(),
nextSearchAt: Timestamp.nullable(),
/** 上次进展:任一收录版本的单元转为已入库、或总集数变化时写入;总览"上次更新"另合并计划预留时间 */
@@ -126,6 +126,9 @@ export type SubscriptionEffect = z.infer<typeof SubscriptionEffect>;
* 写入时兼容 MP 字段与旧键(sites/downloader/save_path/start_episode/filter_groups/keyword/autoFillVersions…),
* 服务端规范化后只存本表列出的键,见 docs/runbook/subscriptions.md。
*/
/** 周期主动搜索缺省关闭(对照 MP:订阅默认靠站点 RSS / 首页刷新匹配);params.searchIntervalHours > 0 才按周期搜 */
export const DEFAULT_SEARCH_INTERVAL_HOURS = 0;
export const SubscriptionParams = z
.object({
siteIds: z.array(Id).optional(),
+2 -2
View File
@@ -1,5 +1,5 @@
// 多版本自动补全(docs/design/subscriptions.md §2.2):非主收录版本在主版本已满足的单元上补下其他版本。
// 开关按 订阅 → 规则组(链上后者优先)→ 系统缺省(开)取值;补全预算按订阅、按自然日计,超出记延后。
// 开关按 订阅 → 规则组(链上后者优先)→ 系统缺省(关,MP 没有多版本补全)取值;补全预算按订阅、按自然日计,超出记延后。
export type AutoFillModeValue = "inherit" | "on" | "off";
@@ -15,7 +15,7 @@ export interface AutoFillResolution {
export function resolveAutoFill(
mode: AutoFillModeValue | undefined,
groupFlags: readonly { id: string; autoFill: boolean | null }[] = [],
systemDefault = true,
systemDefault = false,
): AutoFillResolution {
if (mode === "on" || mode === "off") return { enabled: mode === "on", mode, source: "subscription" };
for (let k = groupFlags.length - 1; k >= 0; k--) {