diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..0c71a9c3 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,52 @@ +# Security Policy / 安全政策 + +## Supported Versions / 支持的版本 + +| Version | Supported | +| ------- | ------------------ | +| 3.x | :white_check_mark: | +| < 3.0 | :x: | + +## Reporting a Vulnerability / 报告漏洞 + +### English + +If you discover a security vulnerability in AutoBangumi, please report it responsibly: + +1. **GitHub Private Vulnerability Reporting** (Recommended): Use [GitHub's private vulnerability reporting feature](https://github.com/EstrellaXD/Auto_Bangumi/security/advisories/new) to submit your report securely. + +2. **Email**: Contact the maintainer directly at the email associated with the GitHub account [@EstrellaXD](https://github.com/EstrellaXD). + +**Please do NOT:** +- Open a public GitHub issue for security vulnerabilities +- Disclose the vulnerability publicly before it has been addressed + +**What to include in your report:** +- Description of the vulnerability +- Steps to reproduce the issue +- Potential impact +- Any suggested fixes (optional) + +We will acknowledge receipt of your report within 48 hours and work to address the issue promptly. + +--- + +### 中文 + +如果您在 AutoBangumi 中发现安全漏洞,请通过以下方式负责任地报告: + +1. **GitHub 私密漏洞报告**(推荐):使用 [GitHub 的私密漏洞报告功能](https://github.com/EstrellaXD/Auto_Bangumi/security/advisories/new) 安全地提交您的报告。 + +2. **邮件**:直接联系维护者,使用 GitHub 账户 [@EstrellaXD](https://github.com/EstrellaXD) 关联的邮箱。 + +**请勿:** +- 在公开的 GitHub Issue 中报告安全漏洞 +- 在漏洞被修复之前公开披露 + +**报告中请包含:** +- 漏洞描述 +- 复现步骤 +- 潜在影响 +- 修复建议(可选) + +我们将在 48 小时内确认收到您的报告,并尽快处理该问题。 diff --git a/docs/changelog/3.2-zh.md b/docs/changelog/3.2-zh.md new file mode 100644 index 00000000..f62512f3 --- /dev/null +++ b/docs/changelog/3.2-zh.md @@ -0,0 +1,225 @@ +# [3.2] - 2025-01 + +## 后端 + +### 新功能 + +- 新增 WebAuthn Passkey 无密码登录支持 + - 支持注册、验证和管理 Passkey 凭证 + - 多设备凭证备份检测(iCloud 钥匙串等) + - 克隆攻击防护(sign_count 验证) + - 认证策略模式统一密码和 Passkey 登录接口 + - 支持无用户名登录(可发现凭证/resident keys) +- 新增季度/集数偏移自动检测 + - 通过分析 TMDB 剧集播出日期检测「虚拟季度」(如芙莉莲第一季分两部分播出) + - 当播出间隔超过 6 个月时自动识别为不同部分 + - 自动计算集数偏移量(如 RSS 显示 S2E1 → TMDB S1E29) + - 后台扫描线程自动检测已有订阅的偏移问题 + - 新增 API 端点:`POST /bangumi/detect-offset`、`PATCH /bangumi/dismiss-review/{id}` +- 新增番剧归档功能 + - 支持手动归档/取消归档 + - 已完结番剧自动归档 + - 新增 API 端点:`PATCH /bangumi/archive/{id}`、`PATCH /bangumi/unarchive/{id}`、`GET /bangumi/refresh/metadata` +- 新增搜索源配置 API + - `GET /search/provider/config` - 获取搜索源配置 + - `PUT /search/provider/config` - 更新搜索源配置 +- 偏移检查面板新增建议值显示(解析的季度/集数和建议的偏移量) +- 修复季度偏移未应用到下载文件夹路径的问题 + - 设置季度偏移后,qBittorrent 保存路径会自动更新(如 `Season 2` → `Season 1`) + - RSS 规则的保存路径也会同步更新 +- 优化集数偏移建议逻辑 + - 简单季度不匹配时不再建议集数偏移(仅虚拟季度需要) + - 改进提示信息,明确说明是否需要调整集数 +- 新增 RSS 连接状态追踪 + - 每次刷新后记录 `connection_status`(healthy/error)、`last_checked_at` 和 `last_error` +- 新增首次运行设置向导 + - 7 步引导配置:账户、下载器、RSS 源、媒体路径、通知 + - 下载器连接测试、RSS 源验证 + - 可选步骤可跳过,稍后在设置中配置 + - 哨兵文件机制(`config/.setup_complete`)防止重复触发 + - 未认证的设置 API(仅首次运行可用,完成后返回 403) +- 新增日历视图,集成 Bangumi.tv 放送时间表 +- 新增下载器 API 和管理界面 +- 全面异步迁移 + - 数据库层异步支持(aiosqlite),Passkey 操作非阻塞 I/O + - `UserDatabase` 支持同步/异步双模式,向后兼容 + - `Database` 上下文管理器支持 `with`(同步)和 `async with`(异步) + - RSS 引擎、下载器、检查器、解析器全面转换为异步 + - 网络请求从 `requests` 迁移到 `httpx`(AsyncClient) +- 后端迁移到 `uv` 包管理器(pyproject.toml + uv.lock) +- 服务器启动使用后台任务避免阻塞(修复 #891、#929) +- 数据库迁移自动填充 NULL 值为模型默认值 +- 数据库新增 `needs_review` 和 `needs_review_reason` 字段用于偏移检测 + +### 性能优化 + +- 共享 HTTP 客户端连接池,复用 TCP/SSL 连接 +- RSS 刷新改为并发拉取(`asyncio.gather`),多源场景下速度提升约 10 倍 +- 种子文件下载改为并发获取,下载多个种子时速度提升约 5 倍 +- 重命名模块并发获取文件列表,速度提升约 20 倍 +- 通知发送改为并发执行,移除 2 秒硬编码延迟 +- 新增 TMDB 和 Mikan 解析结果缓存,避免重复 API 调用 +- 为 `Torrent.url`、`Torrent.rss_id`、`Bangumi.title_raw`、`Bangumi.deleted`、`RSSItem.url` 添加数据库索引 +- RSS 批量启用/禁用改为单次事务操作,替代逐条提交 +- 预编译正则表达式(种子名解析规则、过滤器匹配) +- `SeasonCollector` 在循环外创建,复用单次认证 +- RSS 解析去重从 O(n²) 列表查找改为 O(1) 集合查找 +- `Episode`/`SeasonInfo` 数据类添加 `__slots__`,减少内存占用 + +### 变更 + +- 升级 WebAuthn 依赖到 py_webauthn 2.7.0 +- `_get_webauthn_from_request` 优先使用浏览器 Origin 头,修复跨端口开发环境验证问题 +- `auth_user` 和 `update_user_info` 转换为异步函数 +- `TitleParser.tmdb_parser` 转换为异步函数 +- `RSSEngine` 方法全面异步化(`pull_rss`、`refresh_rss`、`download_bangumi`、`add_rss`) +- `Checker.check_downloader` 转换为异步函数 +- `ProgramStatus` 从 threading 迁移到 asyncio(Event、Lock) + +### 问题修复 + +- 修复下载器连接检查添加最大重试次数 +- 修复添加种子时的网络瞬态错误,添加重试逻辑 +- 修复搜索和订阅流程中的多个问题 +- 改进种子获取可靠性和错误处理 +- 修复 `aaguid` 类型错误(py_webauthn 2.7.0 中现为 `str`,不再是 `bytes`) +- 修复缺失的 `credential_backup_eligible` 字段(替换为 `credential_device_type`) +- 修复 `verify_authentication_response` 接收无效 `credential_id` 参数导致 TypeError +- 修复程序启动阻塞服务器(修复 #891、#929、#886、#917、#946) +- 修复搜索接口导出与组件期望不匹配 +- 修复海报端点路径检查错误拦截所有请求(修复 #933、#934) +- 修复 OpenAI 解析器安全问题 +- 修复数据库测试使用异步会话与同步代码不匹配 +- 修复从 3.1.x 升级到 3.2 时配置字段冲突导致设置丢失(修复 #956) + - `program.sleep_time` / `program.times` 自动迁移到 `rss_time` / `rename_time` + - 移除废弃的 `rss_parser` 字段(`type`、`custom_url`、`token`、`enable_tmdb`) + - 修复 `ENV_TO_ATTR` 环境变量映射指向不存在的模型字段 + - 修复 `DEFAULT_SETTINGS` 与当前配置模型不一致 +- 修复版本升级迁移逻辑错误(所有升级都调用 3.0→3.1 迁移) + - 新增基于源版本的版本感知迁移分发 + - 新增 `from_31_to_32()` 迁移函数处理数据库架构变更 + +## 前端 + +### 新功能 + +- 全新 UI 设计系统重构 + - 统一设计令牌(颜色、字体、间距、阴影、动画) + - 支持深色/浅色主题切换 + - 全面的无障碍支持(ARIA、键盘导航、焦点管理) + - 移动端响应式布局 +- 新增首次运行设置向导页面 + - 多步骤向导组件(进度条 + 步骤导航) + - 路由守卫自动检测并重定向到设置页面 + - 下载器/RSS/通知连接测试反馈 + - 中英文 i18n 支持 +- 新增 Passkey 管理面板(设置页面) + - WebAuthn 浏览器支持检测 + - 自动识别设备名称 + - Passkey 列表显示和删除 +- 登录页面新增 Passkey 指纹登录按钮(支持无用户名登录) +- 新增日历视图页面 +- 新增下载器管理页面 +- 番剧卡片新增悬停遮罩层(显示标题和标签) +- 新增 `resolvePosterUrl` 工具函数,统一处理外部 URL 和本地路径(修复 #934) +- 重新设计搜索面板,新增模态框和过滤系统 + - 新增筛选区域,支持按字幕组、分辨率、字幕类型、季度分类筛选 + - 多选筛选器,智能禁用不兼容的选项(灰色显示) + - 结果项标签改为非点击式彩色药丸样式 + - 统一标签样式(药丸形状、12px 字体) + - 标签值标准化(分辨率:FHD/HD/4K,字幕:简/繁/双语) + - 筛选分类和结果变体支持展开/收起 + - 海报高度自动匹配 4 行变体项(168px) + - 点击弹窗外部自动关闭 +- 重新设计登录面板,采用现代毛玻璃风格 +- 日志页面新增日志级别过滤功能 +- 重新设计 LLM 设置面板(修复 #938) +- 重新设计设置、下载器、播放器、日志页面样式 +- 新增搜索源设置面板 + - 支持查看、添加、编辑、删除搜索源 + - 默认搜索源(mikan、nyaa、dmhy)不可删除 + - URL 模板验证,确保包含 `%s` 占位符 +- 新增 iOS 风格通知角标系统 + - 黄色角标 + 紫色边框显示需要检查的订阅 + - 支持组合显示(如 `! | 2` 表示有警告且有多个规则) + - 卡片黄色发光动画提示需要注意 +- 编辑弹窗新增警告横幅,支持一键自动检测和忽略 +- 规则选择弹窗高亮显示有警告的规则 +- 日历页面番剧分组:相同番剧的多个规则合并显示,点击可选择具体规则 +- 番剧列表页新增可折叠的「已归档」分区 +- 番剧列表页新增骨架屏加载动画 +- 规则编辑器新增剧集偏移字段和「自动检测」按钮 +- 首页空状态新增「添加 RSS 订阅」按钮,引导新用户快速上手 +- 日历页面海报图片添加懒加载,提升性能 +- 日历页面「未知播出日」独立为单独区块,优化视觉节奏 +- RSS 管理页面新增连接状态标签:健康时显示绿色「已连接」,错误时显示红色「错误」并通过 tooltip 显示错误详情 +- 全新移动端优先响应式设计 + - 三层断点系统:移动端(<640px)、平板(640-1023px)、桌面端(≥1024px) + - 移动端底部导航栏(带图标和文字标签) + - 平板迷你侧边栏(56px 图标导航) + - 移动端弹窗自动切换为底部抽屉 + - 支持下拉刷新 + - 支持水平滑动容器 + - 移动端卡片列表替代数据表格(RSS 页面) + - CSS Grid 响应式布局(番剧卡片网格) + - 移动端表单标签垂直堆叠,输入框全宽 + - 触摸目标最小 44px,符合无障碍标准 + - 安全区域支持(刘海屏设备) + - `100dvh` 动态视口高度(修复移动端浏览器地址栏问题) + - `viewport-fit=cover` 全屏设备支持 + +### 新组件 + +- `ab-bottom-sheet` — 触摸驱动的底部抽屉组件(拖动关闭、最大高度限制) +- `ab-adaptive-modal` — 自适应弹窗(移动端底部抽屉 / 桌面端居中对话框) +- `ab-pull-refresh` — 下拉刷新包装组件 +- `ab-swipe-container` — 水平滑动容器(CSS scroll-snap) +- `ab-data-list` — 移动端友好的卡片列表(替代 NDataTable) +- `ab-mobile-nav` — 增强版底部导航栏(图标 + 标签 + 激活指示器) +- `useSafeArea` — 安全区域组合式函数 + +### 性能优化 + +- 下载器 store 使用 `shallowRef` 替代 `ref`,避免大数组的深层响应式代理 +- 表格列定义改为 `computed`,避免每次渲染重建 +- RSS 表格列与数据分离,数据变化时不重建列配置 +- 日历页移除重复的 `getAll()` 调用 +- `ab-select` 的 `watchEffect` 改为 `watch`,消除挂载时的无效 emit +- `useClipboard` 提升到 store 顶层,避免每次 `copy()` 创建新实例 +- `setInterval` 替换为 `useIntervalFn`,自动生命周期管理 + +### 变更 + +- 重构搜索逻辑,移除 rxjs 依赖 +- 搜索 store 导出重构以匹配组件期望 +- 升级前端依赖 +- 断点系统从单一 1024px 扩展为 640px + 1024px 双层 +- `useBreakpointQuery` 新增 `isTablet`、`isMobileOrTablet`、`isTabletOrPC` +- `media-query.vue` 新增 `#tablet` 插槽(回退到 `#mobile`) +- UnoCSS 新增 `sm: 640px` 断点 +- `ab-input` 移动端全宽 + 增大触摸目标样式 +- 布局使用 `dvh` 单位替代 `vh`,支持 safe-area-inset +- 修复日历页面未知列宽度问题 +- 统一下载器页面操作栏按钮尺寸 +- 修复移动端设置页面水平溢出问题 + - 输入框添加 `max-width: 100%` 防止超出容器 + - 折叠面板添加宽度约束和溢出隐藏 + - 设置栅格添加 `min-width: 0` 允许收缩 +- 修复移动端顶栏布局 + - 搜索按钮改为弹性布局,填充 Logo 和图标之间的空间 + - 减小图标按钮尺寸和间距,优化紧凑型布局 + - 添加「点击搜索」文字提示 +- 修复移动端搜索弹窗关闭按钮被截断问题 + - 减小弹窗头部内边距和元素尺寸 + - 搜索源选择按钮缩小至适配移动端 +- 修复设置页面保存/取消按钮缺少加载状态 +- 修复侧边栏展开动画抖动(rotateY → rotate) +- 移动端底部导航标签字号从 10px 增至 11px,提升可读性 +- 登录页背景动画添加 `will-change: transform` 优化 GPU 性能 + +## CI/基础设施 + +- CI 新增 PR 打开时的构建测试(dev 分支 PR 到 main 自动触发构建) +- CI 升级 `actions/upload-artifact` 和 `actions/download-artifact` 到 v4 +- Docker 构建移除 `linux/arm/v7` 平台(uv 镜像不支持) +- 新增 CLAUDE.md 开发指南 diff --git a/docs/changelog/3.2.md b/docs/changelog/3.2.md index 6cae6e23..f1aaa0c9 100644 --- a/docs/changelog/3.2.md +++ b/docs/changelog/3.2.md @@ -1,192 +1,225 @@ # [3.2] - 2025-01 -## 后端 +## Backend -### 功能 +### Features -- 添加 WebAuthn Passkey 无密码登录支持 - - 注册、认证和管理 Passkey 凭据 - - 多设备凭据备份检测(iCloud 钥匙串等) - - 克隆攻击保护(sign_count 验证) - - 认证策略模式统一密码和 Passkey 登录接口 - - 通过可发现凭据(resident keys)支持无用户名登录 -- 添加季度/集数偏移自动检测 - - 分析 TMDB 剧集播出日期以检测"虚拟季度"(如《葬送的芙莉莲》S1 分成两部分) - - 当播出间隔超过 6 个月时自动识别不同部分 - - 计算集数偏移(如 RSS 显示 S2E1 → TMDB S1E29) - - 后台扫描线程自动检测现有订阅中的偏移问题 - - 新增 API 端点:`POST /bangumi/detect-offset`、`PATCH /bangumi/dismiss-review/{id}` -- 添加番剧归档功能 - - 支持手动归档/取消归档 - - 自动归档已完结系列 - - 新增 API 端点:`PATCH /bangumi/archive/{id}`、`PATCH /bangumi/unarchive/{id}`、`GET /bangumi/refresh/metadata` -- 添加搜索提供者配置 API - - `GET /search/provider/config` - 获取搜索提供者配置 - - `PUT /search/provider/config` - 更新搜索提供者配置 -- 添加 RSS 连接状态跟踪 - - 每次刷新后记录 `connection_status`(healthy/error)、`last_checked_at` 和 `last_error` -- 添加首次运行设置向导 - - 7 步引导配置:账户、下载器、RSS 源、媒体路径、通知 - - 下载器连接测试、RSS 源验证 - - 可选步骤可跳过,稍后在设置中配置 - - 标记文件机制(`config/.setup_complete`)防止重复触发 - - 未认证的设置 API(仅在首次运行时可用,完成后返回 403) -- 添加日历视图,集成 Bangumi.tv 放送时间表 -- 添加下载器 API 和管理界面 -- 全面异步迁移 - - 数据库层异步支持(aiosqlite)用于 Passkey 操作的非阻塞 I/O - - `UserDatabase` 支持同步/异步两种模式以保持向后兼容 - - `Database` 上下文管理器支持 `with`(同步)和 `async with`(异步) - - RSS 引擎、下载器、检查器和解析器全面转换为异步 - - 网络请求从 `requests` 迁移到 `httpx`(AsyncClient) -- 后端迁移到 `uv` 包管理器(pyproject.toml + uv.lock) -- 服务器启动使用后台任务避免阻塞(修复 #891、#929) -- 数据库迁移自动用模型默认值填充 NULL 值 -- 数据库添加 `needs_review` 和 `needs_review_reason` 字段用于偏移检测 +- Added WebAuthn Passkey passwordless login support + - Register, authenticate, and manage Passkey credentials + - Multi-device credential backup detection (iCloud Keychain, etc.) + - Clone attack protection (sign_count verification) + - Authentication strategy pattern unifying password and Passkey login interfaces + - Usernameless login support via discoverable credentials (resident keys) +- Added season/episode offset auto-detection + - Analyzes TMDB episode air dates to detect "virtual seasons" (e.g., Frieren S1 split into two parts) + - Auto-identifies different parts when broadcast gap exceeds 6 months + - Calculates episode offset (e.g., RSS shows S2E1 → TMDB S1E29) + - Background scan thread automatically detects offset issues in existing subscriptions + - New API endpoints: `POST /bangumi/detect-offset`, `PATCH /bangumi/dismiss-review/{id}` +- Added bangumi archive functionality + - Manual archive/unarchive support + - Auto-archive completed series + - New API endpoints: `PATCH /bangumi/archive/{id}`, `PATCH /bangumi/unarchive/{id}`, `GET /bangumi/refresh/metadata` +- Added search provider configuration API + - `GET /search/provider/config` - Get search provider config + - `PUT /search/provider/config` - Update search provider config +- Offset detection panel now shows suggested values (parsed season/episode and recommended offset) +- Fixed season offset not being applied to download folder path + - Setting season offset now auto-updates qBittorrent save path (e.g., `Season 2` → `Season 1`) + - RSS rule save paths also sync the update +- Optimized episode offset suggestion logic + - Simple season mismatch no longer suggests episode offset (only virtual seasons need it) + - Improved prompt messages to clarify whether episode adjustment is needed +- Added RSS connection status tracking + - Records `connection_status` (healthy/error), `last_checked_at`, and `last_error` after each refresh +- Added first-run setup wizard + - 7-step guided configuration: account, downloader, RSS source, media path, notifications + - Downloader connection test, RSS source validation + - Optional steps can be skipped and configured later in settings + - Sentinel file mechanism (`config/.setup_complete`) prevents re-triggering + - Unauthenticated setup API (only available on first run, returns 403 after completion) +- Added calendar view with Bangumi.tv broadcast schedule integration +- Added downloader API and management interface +- Full async migration + - Database layer async support (aiosqlite) for non-blocking I/O in Passkey operations + - `UserDatabase` supports both sync/async modes for backward compatibility + - `Database` context manager supports both `with` (sync) and `async with` (async) + - RSS engine, downloader, checker, and parser fully converted to async + - Network requests migrated from `requests` to `httpx` (AsyncClient) +- Backend migrated to `uv` package manager (pyproject.toml + uv.lock) +- Server startup uses background tasks to avoid blocking (fixes #891, #929) +- Database migration auto-fills NULL values with model defaults +- Database adds `needs_review` and `needs_review_reason` fields for offset detection -### 性能 +### Performance -- 共享 HTTP 客户端连接池,复用 TCP/SSL 连接 -- RSS 刷新现在并发执行(`asyncio.gather`),多源时快约 10 倍 -- 种子文件下载现在并发执行,多种子时快约 5 倍 -- 重命名模块并发获取文件列表,快约 20 倍 -- 通知发送现在并发执行,移除 2 秒硬编码延迟 -- 添加 TMDB 和 Mikan 解析器结果缓存,避免重复 API 调用 -- 为 `Torrent.url`、`Torrent.rss_id`、`Bangumi.title_raw`、`Bangumi.deleted`、`RSSItem.url` 添加数据库索引 -- RSS 批量启用/禁用使用单个事务而不是逐项提交 -- 预编译种子名称解析和过滤匹配的正则表达式模式 -- `SeasonCollector` 在循环外创建,复用单次认证 -- RSS 解析去重从 O(n²) 列表查找改为 O(1) 集合查找 -- `Episode`/`SeasonInfo` 数据类使用 `__slots__` 减少内存占用 +- Shared HTTP client connection pool, reuses TCP/SSL connections +- RSS refresh now concurrent (`asyncio.gather`), ~10x faster with multiple sources +- Torrent file download now concurrent, ~5x faster for multiple torrents +- Rename module concurrent file list fetching, ~20x faster +- Notification sending now concurrent, removed 2-second hardcoded delay +- Added TMDB and Mikan parser result caching to avoid duplicate API calls +- Database indexes added for `Torrent.url`, `Torrent.rss_id`, `Bangumi.title_raw`, `Bangumi.deleted`, `RSSItem.url` +- RSS batch enable/disable uses single transaction instead of per-item commits +- Pre-compiled regex patterns for torrent name parsing and filter matching +- `SeasonCollector` created outside loops, reuses single authentication +- RSS parsing deduplication changed from O(n²) list lookup to O(1) set lookup +- `Episode`/`SeasonInfo` dataclasses use `__slots__` for reduced memory footprint -### 变更 +### Changes -- 升级 WebAuthn 依赖到 py_webauthn 2.7.0 -- `_get_webauthn_from_request` 优先使用浏览器 Origin 头,修复跨端口开发环境中的验证问题 -- `auth_user` 和 `update_user_info` 转换为异步函数 -- `TitleParser.tmdb_parser` 转换为异步函数 -- `RSSEngine` 方法全面异步化(`pull_rss`、`refresh_rss`、`download_bangumi`、`add_rss`) -- `Checker.check_downloader` 转换为异步函数 -- `ProgramStatus` 从 threading 迁移到 asyncio(Event、Lock) +- Upgraded WebAuthn dependency to py_webauthn 2.7.0 +- `_get_webauthn_from_request` prioritizes browser Origin header, fixing verification issues in cross-port development environments +- `auth_user` and `update_user_info` converted to async functions +- `TitleParser.tmdb_parser` converted to async function +- `RSSEngine` methods fully async (`pull_rss`, `refresh_rss`, `download_bangumi`, `add_rss`) +- `Checker.check_downloader` converted to async function +- `ProgramStatus` migrated from threading to asyncio (Event, Lock) -### Bug 修复 +### Bugfixes -- 修复下载器连接检查添加最大重试限制 -- 修复添加种子时的瞬时网络错误添加重试逻辑 -- 修复搜索和订阅流程中的多个问题 -- 改进种子获取可靠性和错误处理 -- 修复 `aaguid` 类型错误(py_webauthn 2.7.0 中现在是 `str`,不再是 `bytes`) -- 修复缺失的 `credential_backup_eligible` 字段(替换为 `credential_device_type`) -- 修复 `verify_authentication_response` 接收无效 `credential_id` 参数导致 TypeError -- 修复程序启动阻塞服务器(修复 #891、#929、#886、#917、#946) -- 修复搜索界面导出与组件预期不匹配 -- 修复海报端点路径检查错误拦截所有请求(修复 #933、#934) -- 修复 OpenAI 解析器安全问题 -- 修复数据库测试使用异步会话与同步代码不匹配 -- 修复从 3.1.x 升级到 3.2 时配置字段冲突导致设置丢失(修复 #956) - - `program.sleep_time` / `program.times` 自动迁移到 `rss_time` / `rename_time` - - 移除已弃用的 `rss_parser` 字段(`type`、`custom_url`、`token`、`enable_tmdb`) - - 修复 `ENV_TO_ATTR` 环境变量映射指向不存在的模型字段 - - 修复 `DEFAULT_SETTINGS` 与当前配置模型不一致 -- 修复版本升级迁移逻辑错误(所有升级都调用 3.0→3.1 迁移) - - 添加基于源版本的版本感知迁移调度 - - 添加 `from_31_to_32()` 迁移函数用于数据库 schema 变更 +- Fixed downloader connection check with max retry limit +- Fixed transient network errors when adding torrents with retry logic +- Fixed multiple issues in search and subscription flow +- Improved torrent fetch reliability and error handling +- Fixed `aaguid` type error (now `str` in py_webauthn 2.7.0, no longer `bytes`) +- Fixed missing `credential_backup_eligible` field (replaced with `credential_device_type`) +- Fixed `verify_authentication_response` receiving invalid `credential_id` parameter causing TypeError +- Fixed program startup blocking the server (fixes #891, #929, #886, #917, #946) +- Fixed search interface export not matching component expectations +- Fixed poster endpoint path check incorrectly intercepting all requests (fixes #933, #934) +- Fixed OpenAI parser security issue +- Fixed database tests using async sessions with sync code mismatch +- Fixed config field conflicts when upgrading from 3.1.x to 3.2 causing settings loss (fixes #956) + - `program.sleep_time` / `program.times` auto-migrated to `rss_time` / `rename_time` + - Removed deprecated `rss_parser` fields (`type`, `custom_url`, `token`, `enable_tmdb`) + - Fixed `ENV_TO_ATTR` environment variable mapping pointing to non-existent model fields + - Fixed `DEFAULT_SETTINGS` inconsistency with current config model +- Fixed version upgrade migration logic errors (all upgrades calling 3.0→3.1 migration) + - Added version-aware migration dispatch based on source version + - Added `from_31_to_32()` migration function for database schema changes -## 前端 +## Frontend -### 功能 +### Features -- 完整的 UI 设计系统重新设计 - - 统一设计令牌(颜色、字体、间距、阴影、动画) - - 明/暗主题切换支持 - - 全面的无障碍支持(ARIA、键盘导航、焦点管理) - - 移动设备响应式布局 -- 添加首次运行设置向导页面 - - 多步骤向导组件(进度条 + 步骤导航) - - 路由守卫自动检测并重定向到设置页面 - - 下载器/RSS/通知连接测试反馈 - - 中英文 i18n 支持 -- 添加 Passkey 管理面板(设置页面) - - WebAuthn 浏览器支持检测 - - 自动设备名称识别 - - Passkey 列表显示和删除 -- 在登录页面添加 Passkey 指纹登录按钮(支持无用户名登录) -- 添加日历视图页面 -- 添加下载器管理页面 -- 添加番剧卡片悬停覆盖层(显示标题和标签) -- 添加 `resolvePosterUrl` 工具函数统一处理外部 URL 和本地路径(修复 #934) -- 重新设计搜索面板,使用模态框和过滤系统 -- 重新设计登录面板,使用现代毛玻璃风格 -- 在日志视图中添加日志级别过滤 -- 重新设计 LLM 设置面板(修复 #938) -- 重新设计设置、下载器、播放器和日志页面样式 -- 添加搜索提供者设置面板 - - 在 UI 中查看、添加、编辑、删除搜索源 - - 默认源(mikan、nyaa、dmhy)不可删除 - - URL 模板验证确保有 `%s` 占位符 -- 添加 iOS 风格通知徽章系统 - - 黄色徽章 + 紫色边框表示需要审核的订阅 - - 组合显示支持(如 `! | 2` 表示警告 + 多个规则) - - 需要关注的卡片有黄色发光动画 -- 编辑模态框警告横幅,支持一键自动检测和忽略 -- 规则选择模态框高亮显示有警告的规则 -- 日历页面番剧分组:同一动画多个规则合并,点击选择特定规则 -- 番剧列表页面可折叠"已归档"部分 -- 番剧列表页面骨架加载动画 -- 规则编辑器集数偏移字段添加"自动检测"按钮 -- RSS 管理页面连接状态标签:健康时显示绿色"已连接",错误时显示红色"错误"并带工具提示显示详情 -- 全新移动优先响应式设计 - - 三层断点系统:移动端(<640px)、平板(640-1023px)、桌面端(≥1024px) - - 移动端底部导航栏(带图标和文字标签) - - 平板迷你侧边栏(56px 图标导航) - - 移动端弹窗自动切换为底部抽屉 - - 支持下拉刷新 - - 支持水平滑动容器 - - 移动端卡片列表替代数据表格(RSS 页面) - - CSS Grid 响应式布局(番剧卡片网格) - - 移动端表单标签垂直堆叠,输入框全宽 - - 触摸目标最小 44px,符合无障碍标准 - - Safe Area 支持(刘海设备) - - `100dvh` 动态视口高度(修复移动浏览器地址栏问题) - - `viewport-fit=cover` 支持全屏设备 +- Complete UI design system redesign + - Unified design tokens (colors, fonts, spacing, shadows, animations) + - Light/dark theme toggle support + - Comprehensive accessibility support (ARIA, keyboard navigation, focus management) + - Responsive layout for mobile devices +- Added first-run setup wizard page + - Multi-step wizard component (progress bar + step navigation) + - Route guard auto-detection and redirect to setup page + - Downloader/RSS/notification connection test feedback + - Chinese and English i18n support +- Added Passkey management panel (settings page) + - WebAuthn browser support detection + - Automatic device name identification + - Passkey list display and deletion +- Added Passkey fingerprint login button on login page (supports usernameless login) +- Added calendar view page +- Added downloader management page +- Added Bangumi card hover overlay (showing title and tags) +- Added `resolvePosterUrl` utility function for unified external URL and local path handling (fixes #934) +- Redesigned search panel with modal and filter system + - Added filter section supporting fansub group, resolution, subtitle type, and season filtering + - Multi-select filters with smart disable for incompatible options (grayed out) + - Result item tags changed to non-clickable colored pill style + - Unified tag styling (pill shape, 12px font) + - Standardized tag values (resolution: FHD/HD/4K, subtitles: CHS/CHT/Dual) + - Filter categories and result variants support expand/collapse + - Poster height auto-matches 4 rows of variant items (168px) + - Click outside modal to auto-close +- Redesigned login panel with modern glassmorphism style +- Added log level filter in log view +- Redesigned LLM settings panel (fixes #938) +- Redesigned settings, downloader, player, and log page styles +- Added search provider settings panel + - View, add, edit, delete search sources in UI + - Default sources (mikan, nyaa, dmhy) cannot be deleted + - URL template validation ensures `%s` placeholder +- Added iOS-style notification badge system + - Yellow badge + purple border for subscriptions needing review + - Combined display support (e.g., `! | 2` for warning + multiple rules) + - Yellow glow animation on cards needing attention +- Edit modal warning banner with one-click auto-detect and dismiss +- Rule selection modal highlights rules with warnings +- Calendar page bangumi grouping: same anime with multiple rules merged, click to select specific rule +- Bangumi list page collapsible "Archived" section +- Bangumi list page skeleton loading animation +- Rule editor episode offset field with "Auto Detect" button +- Empty state on home page now includes "Add RSS Subscription" button to guide new users +- Calendar page poster images now use lazy loading for better performance +- Calendar page "Unknown Air Date" section separated into its own block for better visual rhythm +- RSS management page connection status labels: green "Connected" when healthy, red "Error" with tooltip for details +- New mobile-first responsive design + - Three-tier breakpoint system: mobile (<640px), tablet (640-1023px), desktop (≥1024px) + - Mobile bottom navigation bar (with icons and text labels) + - Tablet mini sidebar (56px icon navigation) + - Mobile popups automatically switch to bottom sheets + - Pull-to-refresh support + - Horizontal swipe container support + - Mobile card list replacing data tables (RSS page) + - CSS Grid responsive layout (Bangumi card grid) + - Form labels stack vertically on mobile, full-width inputs + - Touch targets minimum 44px, meeting accessibility standards + - Safe area support (notched devices) + - `100dvh` dynamic viewport height (fixes mobile browser address bar issue) + - `viewport-fit=cover` for full-screen devices -### 新增组件 +### New Components -- `ab-bottom-sheet` — 触摸驱动底部抽屉组件(拖拽关闭、最大高度限制) -- `ab-adaptive-modal` — 自适应模态框(移动端底部抽屉/桌面端居中对话框) -- `ab-pull-refresh` — 下拉刷新包装组件 -- `ab-swipe-container` — 水平滑动容器(CSS scroll-snap) -- `ab-data-list` — 移动端友好卡片列表(替代 NDataTable) -- `ab-mobile-nav` — 增强底部导航栏(图标 + 标签 + 激活指示器) -- `useSafeArea` — Safe Area 组合式函数 +- `ab-bottom-sheet` — Touch-driven bottom sheet component (drag to close, max height limit) +- `ab-adaptive-modal` — Adaptive modal (bottom sheet on mobile / centered dialog on desktop) +- `ab-pull-refresh` — Pull-to-refresh wrapper component +- `ab-swipe-container` — Horizontal swipe container (CSS scroll-snap) +- `ab-data-list` — Mobile-friendly card list (replacing NDataTable) +- `ab-mobile-nav` — Enhanced bottom navigation bar (icon + label + active indicator) +- `useSafeArea` — Safe area composable -### 性能 +### Performance -- 下载器 store 使用 `shallowRef` 代替 `ref`,避免大数组的深度响应式代理 -- 表格列定义移到 `computed`,避免每次渲染时重建 -- RSS 表格列与数据分离,数据变化时不重建列配置 -- 日历页面移除重复的 `getAll()` 调用 -- `ab-select` `watchEffect` 改为 `watch`,消除挂载时的无效 emit -- `useClipboard` 提升到 store 顶层,避免每次 `copy()` 创建新实例 -- `setInterval` 替换为 `useIntervalFn`,自动生命周期管理 +- Downloader store uses `shallowRef` instead of `ref` to avoid deep reactive proxy on large arrays +- Table column definitions moved to `computed` to avoid rebuilding on each render +- RSS table columns separated from data, column config not rebuilt on data changes +- Calendar page removed duplicate `getAll()` calls +- `ab-select` `watchEffect` changed to `watch`, eliminates invalid emit on mount +- `useClipboard` hoisted to store top level, avoids creating new instance on each `copy()` +- `setInterval` replaced with `useIntervalFn` for automatic lifecycle management -### 变更 +### Changes -- 重构搜索逻辑,移除 rxjs 依赖 -- 搜索 store 导出重构以匹配组件预期 -- 升级前端依赖 -- 断点系统从单一 1024px 扩展到 640px + 1024px 两层 -- `useBreakpointQuery` 添加 `isTablet`、`isMobileOrTablet`、`isTabletOrPC` -- `media-query.vue` 添加 `#tablet` 插槽(回退到 `#mobile`) -- UnoCSS 添加 `sm: 640px` 断点 -- `ab-input` 移动端全宽 + 增大触摸目标样式 -- 布局使用 `dvh` 单位代替 `vh`,支持 safe-area-inset -- 修复日历页面未知列宽 -- 统一下载器页面操作栏按钮尺寸 +- Refactored search logic, removed rxjs dependency +- Search store export refactored to match component expectations +- Upgraded frontend dependencies +- Breakpoint system expanded from single 1024px to 640px + 1024px two-tier +- `useBreakpointQuery` added `isTablet`, `isMobileOrTablet`, `isTabletOrPC` +- `media-query.vue` added `#tablet` slot (falls back to `#mobile`) +- UnoCSS added `sm: 640px` breakpoint +- `ab-input` mobile full-width + increased touch target styling +- Layout uses `dvh` units instead of `vh`, supports safe-area-inset +- Fixed calendar page unknown column width +- Unified action bar button sizes in downloader page +- Fixed mobile settings page horizontal overflow + - Added `max-width: 100%` to inputs to prevent container overflow + - Added width constraint and overflow hidden to fold panels + - Added `min-width: 0` to settings grid to allow shrinking +- Fixed mobile top bar layout + - Search button changed to flex layout, filling space between logo and icons + - Reduced icon button size and spacing for compact layout + - Added "Click to search" text hint +- Fixed mobile search modal close button being cut off + - Reduced modal header padding and element sizes + - Search source selection buttons scaled down for mobile +- Fixed settings page save/cancel buttons missing loading state +- Fixed sidebar expand animation jitter (rotateY → rotate) +- Mobile bottom navigation label font size increased from 10px to 11px for better readability +- Login page background animation added `will-change: transform` for GPU performance -## CI/基础设施 +## CI/Infrastructure -- CI 添加 PR 打开时的构建测试(dev 分支 PR 到 main 自动触发构建) -- CI 升级 `actions/upload-artifact` 和 `actions/download-artifact` 到 v4 -- Docker 构建移除 `linux/arm/v7` 平台(uv 镜像不支持) -- 添加 CLAUDE.md 开发指南 +- CI added build test on PR open (dev branch PRs to main auto-trigger build) +- CI upgraded `actions/upload-artifact` and `actions/download-artifact` to v4 +- Docker build removed `linux/arm/v7` platform (uv image doesn't support it) +- Added CLAUDE.md development guide