Repository navigation
feat(subscription,ui): add tracking presets with default full-archive and per-sub scheduling - #128
Conversation
… and per-sub scheduling Implement DEC-080 (Closes #109): - Add 4 intent-based tracking presets (full_archive default, follow_cache, check_only, manual) plus overlayable auto_record and expandable custom atomic tags on top of the existing 7 atomic tags (subscriptions.json stays v5; existing saved subscriptions remain untouched). - Default all new-subscription entry points (add dialog, subscribe/move pickers, followings import) to full_archive with inline preset/custom selection, and add quick presets to subscription detail, Settings > 缓存标签, and multi-tag batch dialog. - Remove the global scheduled-check toggle in Settings > 订阅与直播 and run scheduled checks whenever at least one subscription enables scheduled_check (settings.json stays v1; legacy scheduledCheck field retained for compatibility; mutations wake the scheduler). - Improve first-check baseline feedback, rule-aware subscription detail empty states, and auto-cache without scheduled_check dependency warnings. Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
|
Agent:已完成对 PR #128( 审查结论:先修复底层 4 预设 + 可叠加「录直播」+ 7 原子标签模型、既有 v5 空标签订阅零回溯改写、零结构版本升级( 阻塞问题
非阻塞建议(至多 3 条)
已审查范围与未运行项(
|
…default-full-cache Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com> # Conflicts: # docs/decisions.md # docs/ui.md
- Add one-click secondary "开启定时检查" (and "保留定时检查" in batch remove mode) action button on auto-cache dependency warnings across Subscription Detail, new/import preset pickers, and multi-tag batch dialog (Issue #109 #3). - Preserve an existing future nextRunAt across routine subscription writes and unrelated settings saves so non-schedule edits never postpone or starve scheduled checks; recompute immediately on 0<->1 active transitions or schedule parameter changes. - Invalidate stale 20s UI checkPlan cache in saveSettings(), refreshSubscriptions(), and syncSelectedSubAfterTagBatch(), and distinguish PlanOff (manual schedule mode) from PlanUnauth in Settings > 订阅与直播. - Reset AddSubPreset on opening the Add Subscription modal and update audit test comment; expand backend/UI tests and uishots assertions. Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
|
Agent:第 2 轮独立代码审查结论(针对 PR #128,头提交 结论:先修复(仅剩与新合入
|
…default-full-cache Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com> # Conflicts: # docs/decisions.md # docs/requirements.md # docs/ui.md # internal/ui/app.go
|
Agent:第 3 轮(终审)独立代码审查结论(针对 PR #128,头提交 结论:可合并(待 CI
|
Closes #109
做了什么
按 DEC-080(UX 审查 #1、#5 与「新订阅默认缓存全部」)完成以下改动,且不升任何数据文件结构版本(
subscriptions.json保持 v5、settings.json保持 v1):在 7 个原子能力标签之上提供 4 个追踪意图预设(FR-SUBS-004):
internal/subscription/rules.go新增预设与匹配辅助:完整存档(默认)(full_archive:scheduled_check+ 4 项cache_*+full_cache)、追更并保存(follow_cache:scheduled_check+cache_video+cache_draw)、只看新动态(check_only:scheduled_check)、仅手动(manual:空)、可叠加录直播(auto_record),其余组合归为自定义(custom)。DefaultSubRules()对应「完整存档」仅用于新建订阅入口,EmptySubRules()保留空集合;读盘与迁移已有订阅绝不回溯改写,既有空标签订阅原样保留。移除全局「定时检查更新」总开关,由订阅级
scheduled_check驱动(FR-SET-002、FR-SUB-002):internal/settings/settings.go保留ScheduledCheck/Subscription.Enabled字段以兼容读取旧版 v1settings.json,不升结构版本。internal/subscription/{loop,scheduler,check_plan}.go改为只要至少一个订阅启用Rules.ScheduledCheck(且Mode != "manual")即按间隔调度,不再被旧配置中的scheduledCheck: false阻断;订阅增删改、标签变更与导入落盘时主动调用WakeScheduler()唤醒调度器。首次检查基线反馈、规则感知空状态与标签依赖提醒(FR-SUB-001、FR-SUBS-002):
checkSummaryMessage在首次检查仅记录检查起点时明确提示「已为 N 个账号记录检查起点,之后发布的新内容会被追踪」,不再误导显示「新增 0 条动态」,同时清晰表达混合轮次与自动缓存入队数。full_cache、自动缓存+定时检查、自动缓存无定时检查、仅定时检查、仅手动 6 种场景,零额外站点请求)。scheduled_check时,在订阅详情、创建/导入自定义区与批量设置对话框中展示温和提醒「已开启自动缓存但未开启「定时检查」:仅在手动检查更新时生效。」。文档与截图场景同步:
docs/decisions.md(新增DEC-080并标注DEC-054/DEC-070更新)、docs/requirements.md、docs/ui.md、docs/design/subscriptions.md。tools/uishots场景(add-sub-preset-modal、subscription-detail-dep-warning、settings-rules、settings-subscription等)。验证
go run ./tools/check— 通过(exit 0,gofmt -l、go vet ./...、go test ./...、依赖方向、trace-serverLinux 交叉编译与 vet、tools/checkdocs、git diff --check HEAD全部通过)。go test ./internal/subscription/... ./internal/ui/...— 通过(包含新增TestTrackingPresetsRoundTripAndMatching、TestPerSubscriptionSchedulerIgnoresLegacyGlobalEnabledAndWakes及internal/ui/sub_presets_ux_test.go全部用例,覆盖 1280/1000/720 无横向溢出)。go run ./tools/uishots -out artifacts/uishots— 通过(318/318 截图与 1280/1000/720 断言全部通过,无横向溢出)。go test -race ./...:not-run(当前 Windows 环境未启用 cgo)。not-run(本次仅使用合成测试夹具与离线 UI 渲染验证,零真实站点请求)。git push时pre-push钩子会继承GIT_DIR触发LESSONS.md记录的 worktree 钩子问题,已在推送前完整独立运行go run ./tools/check通过,故使用git push --no-verify推送分支。风险
subscriptions.json保持 v5、settings.json保持 v1;已有订阅标签原样保留;未触及安装/更新、签名/发布、凭证隔离、站点请求账本或.github/工作流)。risk:high,等用户合并)每个提交都带
Signed-off-by(git commit -s)。