胡绍康 and Copilot
450fc6dd45
release: v1.4.0 — 账号导入导出无缝迁移
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-04 20:38:07 +08:00
胡绍康 and Copilot
973412d44c
feat: 账号导入导出无缝迁移(PRD-00006/FD-00006)
...
- 新增 auto 智能混合导入模式:自动识别 Outlook/IMAP/GPTMail 行类型
- 域名推断 provider(gmail/qq/163/126/yahoo/aliyun/outlook)
- 自动按 provider 创建/复用分组
- 支持重复策略(skip/overwrite)和兜底 IMAP 设置
- 导出升级为 v2:头部元信息 + GPTMail 分段 + 时间戳文件名
- 前端导入模态框支持 auto 模式 UI 交互
- 新增 41 个单元测试(163 总测试全部通过)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-04 20:33:19 +08:00
胡绍康 and Claude Opus 4.6
d9a6889bd8
style: 修复代码格式以通过 Black 检查
...
- 修复多行 SQL 查询字符串的格式
- 移除不必要的括号
- 统一代码风格以符合 Black 规范
修复的文件:
- outlook_web/controllers/accounts.py
- outlook_web/controllers/system.py
- outlook_web/db.py
- outlook_web/repositories/accounts.py
- outlook_web/repositories/groups.py
- outlook_web/services/refresh.py
- outlook_web/services/scheduler.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 13:42:26 +08:00
胡绍康 and Claude Opus 4.6
2b3897df68
style: 修复测试文件的代码格式
...
- 使用 Black 格式化测试文件
- 修复 Code Quality CI/CD 检查
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 13:25:56 +08:00
胡绍康 and Claude Opus 4.6
f7a8817970
style: 使用 Black 和 isort 格式化代码
...
- 使用 Black 格式化 47 个 Python 文件
- 使用 isort 修复 import 排序
- 修复 Code Quality CI/CD 检查失败问题
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 13:12:16 +08:00
胡绍康 and Claude Opus 4.6
3e800c6198
release: v1.3.0 — 多邮箱统一管理系统
...
新增功能:
- 支持 Gmail/QQ/163/126/Yahoo/阿里邮箱/自定义 IMAP
- IMAP 通用服务与提供商配置系统
- 验证码提取支持 IMAP 邮箱
- 前端动态表单与账号类型标识
修复:
- 数据库 Schema v2 → v3 安全升级
- 定时刷新任务只处理 Outlook 账号
- IMAP 邮箱禁止远程删除保护
测试:122 个测试全部通过
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 22:58:09 +08:00
胡绍康 and Claude Opus 4.6
64d8a6c357
feat(multi-mailbox): 实现多邮箱统一管理功能(PRD-00005)
...
核心变更:
- 数据库:Schema v3,accounts 表新增 account_type/provider/imap_host/imap_port/imap_password 字段
- 后端:新增通用 IMAP 服务(imap_generic.py)与邮箱提供商配置(providers.py)
- 导入:支持 Outlook/QQ/163/Gmail/自定义 IMAP 多格式批量导入,兼容注释行与导出格式
- 导出:按邮箱类型分组导出,保留 provider 信息便于重新导入
- 邮件读取:IMAP 账号走通用 IMAP 服务,Outlook 保持原 Graph/XOAUTH2 链路
- 验证码提取:IMAP 账号通过 IMAP 获取邮件详情后提取
- 安全约束:IMAP 账号禁用远程删除,敏感字段(imap_password)加密存储
- 前端:新增邮箱类型下拉、自定义 IMAP 配置区、provider 标签显示
- 调度器:定时刷新仅处理 Outlook 账号(IMAP 无 OAuth token 刷新语义)
- 日志:配置 outlook_web 命名空间日志输出到 stderr
技术细节:
- 保持 Outlook 旧格式完全兼容(四段式:email----password----client_id----refresh_token)
- IMAP 账号使用空字符串占位 client_id/refresh_token(满足 DB NOT NULL 约束)
- 支持导出格式智能识别(5 段 custom、3 段 provider、2 段配合输入框)
- 前端 DOMPurify 未加载时回退为基本 HTML 过滤(CDN 不可达场景)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-03 22:54:39 +08:00
胡绍康 and Copilot
4df3d5fecd
feat(accounts): add Outlook register button and auto-fill token
...
Add a '🔑 注册' button to account panel header; show only when a non-temp group selected; on successful OAuth exchange auto-open Add Account modal and pre-fill client_id + refresh_token.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-03 22:53:16 +08:00
胡绍康 and Claude Opus 4.6
6a511d76ff
docs: 添加 README 界面截图
...
- 添加仪表盘、邮箱界面、提取验证码、设置界面 4 张截图
- 从 .gitignore 中移除 img/ 目录以便截图可以被提交
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 12:37:24 +08:00
胡绍康 and Claude Opus 4.6
ccef534a8c
release: v1.2.1 — 修复 SECRET_KEY 持久化问题
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 12:24:10 +08:00
胡绍康 and Claude Opus 4.6
8d5c8a04d6
feat: 增强启动脚本智能初始化 + 更新文档截图
...
- 新增 start.py 环境变量智能初始化功能
- 自动从 .env.example 复制配置文件
- 自动生成安全的 SECRET_KEY
- 添加详细的用户提示和安全警告
- 更新 README.md 添加界面截图展示
- 仪表盘、邮箱管理、验证码提取、系统设置
- 清理旧的中文命名图片文件
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 12:21:42 +08:00
胡绍康 and Copilot
ca14996c3b
release: v1.2.0 — UI全局美化重设计 + CI/CD修复
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 22:35:36 +08:00
胡绍康 and Copilot
6d267816b9
fix(ci): 修复 Docker Build Push secrets 检测问题
...
将 job-level if 条件替换为独立的 check-secrets job,
通过 shell 环境变量检测 secrets 是否存在,更可靠。
同时将 workflow 文件变更加入 paths 触发器。
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 22:08:59 +08:00
胡绍康 and Copilot
766a56f3ae
chore: 移除包含密钥的 start_temp.bat 并加入 .gitignore
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 21:58:44 +08:00
胡绍康 and Copilot
771e8f69c8
chore: 移除 Dependabot 自动 PR 配置
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 21:57:47 +08:00
胡绍康 and Copilot
c70d2b97dd
chore: 代码质量修复 + CI升级
...
- black 格式化 (1 file)
- isort 排序修复 (30 files, --profile black)
- 升级 actions/checkout v4 → v6 (全部 3 个 workflow)
- 添加 pyproject.toml (black/isort 配置)
- isort CI 命令添加 --profile black 参数
- 114 测试全部通过
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 21:52:44 +08:00
胡绍康 and Claude Opus 4.6
f36d84c1b1
feat: 在前端侧边栏添加 GitHub 仓库链接
...
- 在侧边栏底部添加 GitHub 图标按钮
- 点击后在新标签页打开项目仓库
- 添加蓝色主题样式,与界面风格统一
- 支持响应式设计,移动端适配
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-01 21:41:24 +08:00
胡绍康 and Copilot
cf7817bb95
feat: UI全局美化重设计 + 恢复CI/测试/文档
...
UI 改进:
- 设置页面内嵌显示(不再弹窗)
- 临时邮箱卡片添加验证码提取按钮
- 导入账号弹窗 textarea 样式优化
- 账号头像 8 色渐变轮转
- 临时邮箱页顶栏邮箱点击复制
- 邮箱管理页自动选中默认分组
- 切换分组时重置邮件列 UI
- 修复收件箱/垃圾邮件 Tab 切换(.folder-tab → .email-tab)
- 修复从临时邮箱返回后账号列数据残留
- 仪表盘分组列表可点击导航
恢复:
- 恢复 .github/ CI 工作流
- 恢复 tests/ 测试目录
- 恢复 docs/ 文档目录
- 恢复 CONTRIBUTING.md, SECURITY.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-01 21:24:06 +08:00
胡绍康 and Claude Opus 4.6
ba83ca3bf6
chore: 准备开源发布 - 只保留源代码
...
移除所有非源代码文件:
- 删除 docs/ 目录(所有内部文档)
- 删除 tests/ 目录(所有测试文件)
- 删除 .github/ 目录(CI/CD 配置)
- 删除 .kiro/ 目录(IDE 配置)
- 删除 CONTRIBUTING.md, SECURITY.md
更新项目文件:
- 重写 README.md,简洁清晰(从 1600+ 行压缩到 237 行)
- 更新 .gitignore,忽略所有非源代码文件
- 使用 ASCII art 展示界面布局
- 添加 Shields.io 徽章美化项目
保留的文件:
- 源代码:outlook_web/, static/, templates/
- 入口文件:web_outlook_app.py, start.py, outlook_mail_reader.py
- 配置文件:requirements.txt, Dockerfile, .dockerignore, .env.example
- 项目文档:README.md, LICENSE, .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-01 21:11:55 +08:00
胡绍康 and Claude Opus 4.6
39854520e6
chore: 准备开源发布 - 清理项目文件
...
- 更新 .gitignore,忽略所有文档和临时文件
- 删除迁移痕迹文件(AI提示词、PRD文档等)
- 更新 README.md,移除截图引用
- 只保留源代码用于开源发布
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-01 20:41:51 +08:00
胡绍康
7c6a794dfa
chore(release): v1.1.1
2026-02-28 20:21:49 +08:00
胡绍康
a96fc69124
ci(docker): switch image publish to Docker Hub (guangshanshui)
2026-02-28 20:13:43 +08:00
胡绍康
20aa93be22
chore(release): v1.1.0
2026-02-27 17:04:20 +08:00
胡绍康 and Claude Opus 4.6
0ab50db85f
feat: 实现可调整布局系统
...
- 新增布局管理器支持拖拽调整面板宽度
- 新增状态管理器实现布局持久化
- 重构前端页面结构优化四栏式布局
- 新增 Jest 测试框架和完整测试用例
- 完善项目文档(PRD/FD/TDD/TODO/LOG)
- 清理 Python 缓存文件并更新 .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-27 14:49:36 +08:00
胡绍康 and Claude Opus 4.6
0eb36f5175
style: 运行 Black 格式化所有 Python 代码
...
- 格式化 66 个 Python 文件以符合 Black 代码风格
- 修复 GitHub Actions Code Quality 工作流失败问题
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 18:23:57 +08:00
胡绍康 and Claude Opus 4.6
5af073caa8
fix: 修复 CSRF token 导入错误并豁免临时邮箱 API
...
- 在 csrf.py 添加模块级别 generate_csrf() 函数,解决 /api/csrf-token 端点导入错误
- 为临时邮箱 API 路由添加 CSRF 豁免,避免 Session 认证下的 CSRF token 缺失错误
- 重构 temp_emails.py 路由注册逻辑,支持统一应用 csrf_exempt 装饰器
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 17:56:45 +08:00
胡绍康 and Claude Opus 4.6
a448637477
chore: add GitHub templates and community files
...
- Add Issue templates (bug report, feature request) with bilingual support
- Add PR template with bilingual support
- Add Dependabot configuration for Python, Docker, and GitHub Actions
- Add labels configuration with 30+ standardized labels
- Add code quality workflow (Black, isort, Flake8, Bandit)
- Add LICENSE (Apache 2.0)
- Add CONTRIBUTING.md with development guidelines
- Add SECURITY.md with vulnerability reporting process
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 17:10:54 +08:00
胡绍康 and Claude Opus 4.6
2aca6d9954
fix: 修复安全问题和错误处理改进
...
P0 安全修复:
- 添加 IP 信任链验证,防止 X-Forwarded-For 伪造攻击
- 导出验证 token 增加 IP 和 User-Agent 绑定校验
- 改用请求头传递导出 token,避免 URL 泄露
P1 改进:
- 错误响应自动使用正确的 HTTP 状态码(400/500)
- 4xx 错误使用 WARNING 日志级别,5xx 使用 ERROR
P2 文档更新:
- 更新 CLAUDE.md 架构说明,体现 controllers 层
- 添加 TRUSTED_PROXIES 和 PROXY_FIX_ENABLED 配置说明
- 修正登录锁定时长为 5 分钟
P3 工程卫生:
- 清理乱码字符
- 删除意外创建的 nul 文件
测试修复:
- 更新测试以适应新的 HTTP 状态码行为
- 添加测试前清理登录限制记录的逻辑
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 16:11:33 +08:00
胡绍康 and Claude Opus 4.6
828d31f949
refactor: 删除 legacy.py - 完成模块化迁移
...
- 所有 API 路由已迁移到 controllers 层
- 中间件已迁移到 middleware 模块
- 调度器已迁移到 services/scheduler.py
- 95 个测试全部通过
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 12:48:44 +08:00
胡绍康 and Claude Opus 4.6
8738bd1fff
refactor: 移除 legacy 依赖,迁移调度器到 services
...
新增文件:
- services/scheduler.py: 定时任务调度器服务
- init_scheduler(): 初始化调度器
- configure_scheduler_jobs(): 配置定时任务
- scheduler_heartbeat_task(): 心跳任务
- scheduled_refresh_task(): 定时刷新任务
- should_autostart_scheduler(): 判断是否自动启动
更新文件:
- app.py: 移除 legacy 导入,使用 middleware 和 services/scheduler
- controllers/settings.py: 使用 services/scheduler 替代 legacy
- web_outlook_app.py: 直接从各模块导出兼容函数,移除 impl 代理
测试修复:
- tests/test_core_features.py: 修复 mock 从 impl 到 graph_service
架构改进:
- 完全移除对 outlook_web.legacy 的运行时依赖
- legacy.py 现仅作为参考保留,不再参与运行时调用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 12:14:16 +08:00
胡绍康 and Claude Opus 4.6
c0562ef721
refactor: 迁移中间件到 middleware 模块
...
创建 outlook_web/middleware/ 目录,从 legacy.py 迁移:
新增文件:
- middleware/__init__.py - 模块导出
- middleware/trace.py - trace_id 中间件
- ensure_trace_id(): 为每个请求生成/透传 trace_id
- attach_trace_id_and_normalize_errors(): 统一写入 X-Trace-Id,标准化错误格式
- middleware/error_handler.py - 错误处理中间件
- handle_http_exception(): 处理 HTTP 异常
- handle_exception(): 处理未捕获异常
更新文件:
- app.py: 从 middleware 模块导入,替代 legacy 引用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 11:47:45 +08:00
胡绍康 and Claude Opus 4.6
f31f042d89
feat: 迁移 accounts 模块批次 2 到 controllers 层 - 完成 accounts 全部迁移
...
迁移的路由(8个):
- Token 刷新:api_refresh_account, api_refresh_all_accounts,
api_retry_refresh_account, api_refresh_failed_accounts,
api_trigger_scheduled_refresh
- 刷新日志:api_get_refresh_logs, api_get_account_refresh_logs,
api_get_failed_refresh_logs, api_get_refresh_stats
架构改进:
- 移除 routes/accounts.py 中的 impl 参数依赖
- 移除 app.py 中 accounts 蓝图的 legacy 传递
- 使用 services/refresh.py 的流式刷新服务
- 使用 repositories/settings.py 获取设置
- 使用 repositories/refresh_logs.py 记录刷新结果
里程碑:
- accounts 模块全部 20 个路由迁移完成
- 所有 54 个 API 路由迁移完成(100%)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 10:56:47 +08:00
胡绍康 and Claude Opus 4.6
5e4e5dcb64
feat: 迁移 accounts 模块批次 1 到 controllers 层
...
迁移的路由(12个):
- 基础 CRUD:api_get_accounts, api_get_account, api_add_account,
api_update_account, api_delete_account, api_delete_account_by_email
- 批量操作:api_search_accounts, api_batch_update_account_group,
api_batch_delete_accounts, api_batch_manage_tags
- 导出功能:api_export_all_accounts, api_export_selected_accounts,
api_generate_export_verify_token
修复:
- parse_account_string 函数支持 refresh_token 包含 '----' 分隔符
- api_generate_export_verify_token 使用正确的 auth 模块函数
剩余 accounts 模块路由(8个)暂保留 legacy 实现:
- Token 刷新相关:refresh, refresh-all, retry-refresh, refresh-failed
- 刷新日志相关:refresh-logs, account-refresh-logs, refresh-stats, trigger-scheduled-refresh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 10:23:07 +08:00
胡绍康 and Claude Opus 4.6
4c1920d7c1
feat: 迁移 emails 模块到 controllers 层
...
- 迁移 4 个 emails 相关 API 到 controllers/emails.py:
- api_get_emails
- api_delete_emails
- api_get_email_detail
- api_extract_verification
- 更新 routes/emails.py 移除 impl 参数
- 更新测试用例以 mock repositories 和 services 模块
- 保持 Graph API → IMAP 回退机制
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 08:58:36 +08:00
胡绍康 and Claude Opus 4.6
d7c274e5eb
feat: 迁移 temp_emails 模块到 controllers 层
...
- 迁移 8 个 temp_emails 相关 API 到 controllers/temp_emails.py:
- api_get_temp_emails
- api_generate_temp_email
- api_delete_temp_email
- api_get_temp_email_messages
- api_get_temp_email_message_detail
- api_delete_temp_email_message
- api_clear_temp_email_messages
- api_refresh_temp_email_messages
- 更新 routes/temp_emails.py 移除 impl 参数
- 更新测试用例以 mock outlook_web.services.gptmail 而非 legacy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 08:44:55 +08:00
胡绍康 and Claude Opus 4.6
6110badd7a
feat: 迁移 oauth 模块到 controllers 层
...
- 迁移 2 个 oauth 相关 API 到 controllers/oauth.py:
- api_get_oauth_auth_url
- api_exchange_oauth_token
- 更新 routes/oauth.py 移除 impl 参数
- OAuth 配置常量从 config 模块读取
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 08:29:20 +08:00
胡绍康 and Claude Opus 4.6
2ab1721946
feat: 迁移 scheduler 模块到 controllers 层
...
- 迁移 api_get_scheduler_status 到 controllers/scheduler.py
- 更新 routes/scheduler.py 移除 impl 参数
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 08:19:27 +08:00
胡绍康 and Claude Opus 4.6
fa99c48ef6
feat: 迁移 pages 模块到 controllers 层
...
- 迁移 4 个 pages 相关路由到 controllers/pages.py:
- login (GET/POST)
- logout
- index
- get_csrf_token
- 更新 routes/pages.py 移除 impl 参数
- 保留 csrf_exempt 装饰器支持
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:49:47 +08:00
胡绍康 and Claude Opus 4.6
3bab297aac
feat: 迁移 audit 模块到 controllers 层
...
- 迁移 api_get_audit_logs 到 controllers/audit.py
- 更新 routes/audit.py 移除 impl 参数
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:40:14 +08:00
胡绍康 and Claude Opus 4.6
3228661a93
feat: 迁移 system 模块到 controllers 层
...
- 迁移 4 个 system 相关 API 到 controllers/system.py:
- healthz (无需登录)
- api_system_health
- api_system_diagnostics
- api_system_upgrade_status
- 更新 routes/system.py 移除 impl 参数
- 添加 utcnow 辅助函数和 REFRESH_LOCK_NAME 常量
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:33:46 +08:00
胡绍康 and Claude Opus 4.6
97ceaac64e
feat: 迁移 settings 模块到 controllers 层
...
- 迁移 3 个 settings 相关 API 到 controllers/settings.py:
- api_get_settings
- api_update_settings
- api_validate_cron
- 更新 routes/settings.py 移除 impl 参数
- 暂时通过延迟导入 legacy 模块的 init_scheduler 和 configure_scheduler_jobs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:24:28 +08:00
胡绍康 and Claude Opus 4.6
4d28546de7
feat: 迁移 tags 模块到 controllers 层
...
- 迁移 3 个 tags 相关 API 到 controllers/tags.py:
- api_get_tags
- api_add_tag
- api_delete_tag
- 更新 routes/tags.py 移除 impl 参数
- api_batch_manage_tags 暂保留在 legacy,将在 accounts 模块迁移时处理
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:12:30 +08:00
胡绍康 and Claude Opus 4.6
163c262945
feat: 迁移 groups 模块到 controllers 层
...
- 创建 outlook_web/controllers/ 目录
- 迁移 6 个 groups 相关 API 到 controllers/groups.py:
- api_get_groups
- api_get_group
- api_add_group
- api_update_group
- api_delete_group
- api_export_group
- 更新 routes/groups.py 移除 impl 参数
- 更新 app.py 使用新的 Blueprint 注册方式
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-25 00:01:40 +08:00
胡绍康 and Claude Opus 4.6
5e7651ba7f
docs: 更新项目文档 - 批量操作与自动化增强功能
...
更新内容:
- project-overview.md: 添加批量操作、验证码提取、自动轮询功能说明
- architecture.md: 添加 verification_extractor.py 服务层说明
- 同步更新已完成功能列表
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-24 21:45:20 +08:00
胡绍康 and Claude Opus 4.6
66d9b9749b
feat: 批量操作与自动化增强 - 全选/复制验证码/自动轮询
...
功能实现:
- 全选功能:跨分组保持选中状态,使用全局 Set 存储
- 验证码提取:支持 Graph API → IMAP 回退策略
- 自动轮询:新邮件通知、红点提示、连续错误自动停止
BUG 修复 (BUG-001 ~ BUG-008):
- Toast 通知位置移至右下角
- 切换分组时保持全选状态
- 添加批量删除邮箱功能
- 验证码提取支持 IMAP 回退
- 修复轮询开关类型不一致 (boolean vs string)
- 完善轮询通知内容与红点位置
- 轮询次数校验改为 0-100 (0 表示持续)
- 复制按钮添加加载状态与反馈
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-24 21:03:53 +08:00
胡绍康 and Claude Opus 4.6
a9b3e4254f
fix: 修复临时邮箱生成失败的BUG (BUG-00001)
...
【问题描述】
- 用户生成临时邮箱时返回笼统错误:生成临时邮箱失败,请稍后重试
- 错误码:LEGACY_ERROR,无法定位具体失败原因
- 可能原因:API Key未配置、网络问题、API服务不可用等
【修复内容】
1. 改进 gptmail_request 函数
- 添加 API Key 配置检查
- 区分 10+ 种错误类型(CONFIG_ERROR, AUTH_ERROR, TIMEOUT_ERROR等)
- 返回结构化错误信息
2. 改进 generate_temp_email 函数
- 返回值改为 (email_addr, error_msg) 元组
- 保留详细错误信息
3. 改进 api_generate_temp_email 函数
- 使用详细错误信息返回给前端
- 添加日志记录
4. 更新前端错误提示
- 显示详细的错误信息
5. 编写单元测试
- 新增 11 个单元测试
- 更新 2 个现有测试的 mock
【测试结果】
- 所有测试通过:51/51 ✅
【相关文档】
- BUG文档:docs/BUGS/BUG-00001-临时邮箱生成失败.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-23 20:52:27 +08:00
胡绍康 and Claude Opus 4.6
14b1a7fa09
refactor: P1阶段优化 - 收敛全局变量与清理legacy代码
...
- 收敛前端全局变量:将 window.lastRefreshTime 和 window._lastFetchErrorDetails 改为模块变量
- 将内联 onclick 事件改为事件监听器,消除对全局变量的依赖
- 删除 legacy.py 中已被 re-export 覆盖的旧函数实现(settings 和 groups 相关,约140行)
- 所有测试通过(40/40)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-23 19:30:02 +08:00
胡绍康 and Claude Opus 4.6
192240436d
refactor: 模块化架构重构 & 完善测试与文档体系
...
- 架构重构:拆分为 routes/services/repositories/security 分层结构
- 新增测试:添加完整的单元测试套件(烟雾测试/核心功能/错误处理等)
- 完善文档:添加开发者指南、运行验证、回归清单、性能基线等文档
- 前后端分离:静态资源独立,模板组件化
- CI/CD:添加 GitHub Actions 自动化测试
- Docker 优化:添加健康检查,修复调度器启动问题
- 配置增强:支持 SCHEDULER_AUTOSTART 环境变量
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-23 18:54:16 +08:00