31 Commits
Author SHA1 Message Date
Your Name 7890320ff7 docs: explain adb and navigation setup 2026-06-23 14:34:37 +08:00
Your Name 18908aeff7 docs: require mobile navigation bar in exe guide 2026-06-23 14:14:50 +08:00
Your Name bd762f6be6 docs: write dashboard exe readme 2026-06-23 13:52:51 +08:00
Your Name 1bef130e51 docs: simplify readme usage guide 2026-06-23 13:47:53 +08:00
CodexandClaude Opus 4.7 a6ce16f9c4 docs/README: 版本日志段引向 CHANGELOG.md + git tags + 发布流程
- 把 V3.0.0–V3.3.3 的散落条目统一到 CHANGELOG.md,README 只保留最近 3 个版本作为快照
- 加发布流程段:bump_version.py 用法 + test_version_consistency.py 守门
- 顶部链向 CHANGELOG.md 与 git tags 页面

回归:36 个路径引用全部存在;353 个测试通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:28:21 +08:00
CodexandClaude Opus 4.7 a39da30d16 docs/README: 把 pic/ 与 douyin/core/state/ 的 markdown 链接改为内联代码
这些目录是 .gitignored 的运行时生成目录,仓库里不存在实体,
作为 markdown 链接会渲染成断链;改为内联代码 \`pic/\` /
\`douyin/core/state/reservations.json\` 表达"运行时路径"语义。

修复 3 处:调试技巧段、故障排查段、FAQ 高价值预约段。

回归:267 个 pytest 用例通过;README 33 个路径引用全部存在。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:35:46 +08:00
CodexandClaude Opus 4.7 601e701823 docs/README: 把 pic/ logs/ state/ 等运行时目录的 markdown 链接改为内联代码
这些目录在 .gitignore 里(运行时生成),通过 markdown 链接 [pic/](pic/) 跳转
没意义;改为 \`pic/\`、\`logs/\`、\`state/\` 内联代码标记,更准确。
顺手把 douyin/core/state/reservations.json 的链接也改为内联代码(同样在 .gitignore)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:29:18 +08:00
CodexandClaude Opus 4.7 872722522c docs/README: 系统性重构 + 修正 AI_PROJECT_SUMMARY 链接
- 系统性重写 README(1700+ 行 → 700 行):
  - 顶部加目录索引,主体改为表格 + 简明列表
  - 重新组织"快速开始"为三种启动方式(GUI / CLI / Web GUI),命令示例
    全部用 bin/<entry>.py 形式
  - 「核心功能」改为 11 项一行表格,配合超链接
  - 「技术架构」段简化为核心栈 + 检测层次表 + 架构图,删除冗长描述
  - 详细配置说明改为多个分组表格,命中率高
  - 引用 docs/ 子文档统一加 markdown 链接,便于跳转

- 修正过期链接:[docs/AI_PROJECT_SUMMARY.md] → [docs/archive/AI_PROJECT_SUMMARY.md]
  (main 上 PR #5 把它归档了,README 重写时引到了旧路径)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:25:12 +08:00
CodexandClaude Opus 4.7 ecffba94b4 P3 §7: 引入 pytest 基础设施 + 9 个核心模块冒烟/单元测试
§7-1 pytest 基础设施
  - pyproject.toml 加 [tool.pytest.ini_options]
    (testpaths / python_files / strict markers / smoke + slow marker 注册)
  - tests/conftest.py 自动把项目根加到 sys.path

§7-2 核心模块测试(242 passed, 1 skipped)
  - test_filter_logging.py(重写为 pytest):should_skip_fudai_by_config
    + is_watch_task_fudai + _is_short_countdown_text 共 29 用例
  - test_time_utils.py:parse_mm_ss + extract_2digits 共 22 用例
  - test_douyin_text_utils.py:4 个 OCR 解析函数 25 用例
  - test_douyin_utils.py:extract_prize_value_yuan + normalize_countdown_text 21 用例
  - test_path_config.py:10 个路径函数结构断言 + 路径间互不重复 20 用例
  - test_logger_helpers.py:8 个 print→logger helper 的统一接口测试 20 用例
  - test_unified_logger_mdc.py:MDC 7 个方法 + 线程隔离 13 用例
  - test_io_utils.py:_verify_png_integrity / _safe_replace_file /
    _ensure_parent_dir 11 用例
  - test_imports.py:78 个核心模块的 import 冒烟 + 关键类/函数导出验证

修订老测试
  - test_ocr_comparison.py:用 pytest.importorskip 跳过缺失的 psutil/easyocr/paddleocr,
    并整体标 @pytest.mark.slow(需要 'pytest -m slow' 才会跑)
  - test_webgui.py:原会真的启 HTTP 服务卡死,改为 import 冒烟 + helper 调用测试

README
  - 重写 "## ✅ 测试" 段,给出实际可用的 pytest 命令、测试约定、marker 说明

回归:tests/ 142 项测试 PASS / 1 SKIP / 0 FAIL;全部纯函数 + 不依赖 ADB / OCR / 设备。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:09:02 +08:00
CodexandClaude Opus 4.7 16d9bde4a0 docs/README: 修正版本徽章链接 version.py → douyin/core/version.py
文件已迁移到 douyin/core/version.py,徽章链接 (version.py) 是断链。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:18:58 +08:00
CodexandClaude Opus 4.7 e5c5ce06ee docs/README: 更新"添加新功能"指引段
- 把"在项目根目录创建 douyin_xxx.py" 改为按职责放到对应子包
  (douyin/core / douyin/fudai/core / douyin/detection 等)
- 把 douyin_fudai.py 标题改为 douyin/core/douyin_fudai.py
- 把 gui_app.py 标题改为 gui/gui_app.py
- 集成 GUI 后建议跑 tools/diagnostics/check_web_gui_config_sync.py 校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:17:10 +08:00
CodexandClaude Opus 4.7 20aefbb3a1 docs/README: 更新架构设计 ASCII 图反映重构后路径
- 用户界面层从 "gui_app.py / web_gui.py / run_cli.py" 改为
  "bin/run_cli.py / bin/gui_app.py / bin/webgui_launcher.py"
- 底层操作层从 "operations/ device/screenshot/ocr" 改为
  "douyin/core/underlying_operations.py + operations/ (向后兼容包装)"
  (删除已删的 device_operations.py 提及)
- 路径配置从 "path_config.py" 改为 "douyin/core/path_config.py"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:15:14 +08:00
CodexandClaude Opus 4.7 ae3f276f56 docs/README: 更新模块说明段反映重构后路径
修订"代码结构 > 核心模块说明"段中的过期内容:

- douyin/logging/:把已删的 douyin_logger.py 替换为现存的 unified_logger.py /
  internal_loggers.py / action_logger.py / log_formatter.py / performance_tracker.py
- path_config.py:标题改为 douyin/core/path_config.py,补 get_high_value_rooms_path
- operations/:删掉已不存在的 device_operations.py,明确这是向后兼容包装层
- Underlying_Operations.py:标题改为 douyin/core/underlying_operations.py
- gui_app.py / web_gui.py:标题改为 gui/<file>.py(实现) + bin/<file>.py(启动器)
- run_cli.py:标题改为 bin/run_cli.py
- 补 bin/manage_logs.py 子段
- tools/:示例改成现实存在的 tools/diagnostics/ tools/coords/ 路径
- version.py:标题改为 douyin/core/version.py

douyin/other/:补登 douyin_high_value_room / douyin_live_room / douyin_lottery 三个模块

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:13:07 +08:00
CodexandClaude Opus 4.7 a46901ef5d docs: 修正"根目录有 launcher 转发"的错误说明 + 入口命令改为 bin/
实际情况:根目录已不再保留 run_cli.py / gui_app.py / webgui_launcher.py /
manage_logs.py 的 launcher 转发,这些入口脚本统一在 bin/ 下,必须以
'python bin/run_cli.py ...' 形式调用。

之前的提交里我把"路径迁移说明"写成"入口仍可从仓库根直接运行"是错的,
本提交修正:

- README.md
  - 项目架构段末尾的"历史小贴士"改为完整的迁移表,明确入口在 bin/ 下
  - 5 处 'python run_cli.py' / 'python gui_app.py' / 'python webgui_launcher.py'
    全部改为 'python bin/...' 形式(分别在快速开始、命令行用法、Web GUI 启动、
    Issue 模板、测试模式段)

- docs/完整技术文档.md
  - 头部"路径迁移说明"末尾的"仍可从仓库根直接运行"改为"必须用 bin/ 前缀"

文档里其他正文中的 'python run_cli.py …' 命令属于历史正文,迁移说明已在文档头部
统一指引读者改读为 bin/ 前缀,不再逐句修订(避免改动 7000+ 行文档主体)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:10:07 +08:00
CodexandClaude Opus 4.7 9e189c711c docs/README: 重写"项目架构"段反映 2026-05 重构后实际结构
老版目录树包含大量过期路径:
  - 根目录 path_config.py / Underlying_Operations.py / run_cli.py(已迁到 douyin/core/ 与 bin/)
  - fudai_detail_modules/ 顶级目录(已被 main 上的 PR 整体删除)
  - operations/ 列出的 device_operations.py / image_operations.py 已删除
  - 缺失 bin/、缺 io_utils.py、缺 douyin/core/path_config.py 与 underlying_operations.py、缺 webui/、缺 fudai_modules 子模块清单

重写为反映现实结构 + 末尾加历史小贴士,让读者遇到旧路径时能查到对应位置。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:05:32 +08:00
CodexandClaude Opus 4.7 71f3653354 补回上次合并丢失的关键路径修复 + .gitignore 补强 + 依赖版本对齐
上次冲突解决时跳过了 982f57e (P0 清理) 和 b6ae970 (路径修复) 两个 commit,
本提交补回其中影响运行时正确性和文档一致性的 7 处。

E. 路径错位修复
  - douyin/core/douyin_fudai.py: _reservations_state_path 与 room_pos_map
    状态目录改为优先调用 path_config.get_reservations_path()
  - douyin/core/path_config.py: get_reservations_path 注释明确"实际位置 + 写入方"
  - gui/components/mapping_utils.py: 删除错误兜底 douyin/state/reservations.json
  - gui/components/mapping_table.py: 同步删除 douyin/state/room_pos_map.json 错误兜底
  - gui/web_gui.py: get_reservations() 内的兜底由 douyin/state/ 修正为 douyin/core/state/
  - bin/run_cli.py: 移除对已删空文件 douyin_reservation_ops.py 的 shim 加载
  - douyin/reservation/douyin_reservation_ops.py: 删除 0 字节空文件

F. .gitignore 补强
  - 新增 *.bak_* 拦截带日期后缀的备份命名(修复 *.bak 命中失败的场景)

G. 依赖版本对齐
  - requirements-minimal.txt: paddleocr/paddlepaddle 改为 >=3.0.0,与 requirements.txt 一致
  - README.md: 安装指引中 paddlepaddle==2.5.2 改为 >=3.0.0

回归:全量 .py compileall 通过;7 项断言(path_config 路径、douyin_fudai 切换、
3 处兜底已清、shim 已移除、空文件已删、.gitignore 补强、版本对齐)全部 PASS;
test_filter_logging / check_web_gui_config_sync 通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 10:18:17 +08:00
Codex 13b1f2150c Fix launcher paths and remove local hardcoding 2026-05-20 19:18:34 +08:00
Your Name 93d47a16d6 Refactor reservation preemption handling and logging
- Removed the reservation preempt minimum value from the Runner and GUI components.
- Updated logging mechanism to streamline log message handling and improve readability.
- Introduced a new method for appending log lines in the Runner class.
- Cleaned up related GUI elements and configuration options in web interface.
- Deleted obsolete simulation scripts related to reservation preemption checks.
2026-01-07 21:24:10 +08:00
Your Name 6121154370 feat: 更新配置文件路径,重构配置管理逻辑,增强配置文件的兼容性和可读性 2026-01-04 16:27:19 +08:00
Your Name 8838b62e61 feat: 调整高价值福袋预约参数,增加提前参与时间和提高最低奖品价值 2026-01-04 15:07:49 +08:00
Your Name b9849b9f5a chore: Remove obsolete scripts and enhance path configuration
- Deleted `check_md_files.py` and `fix_cursor_md_issue.py` as they are no longer needed.
- Added new functions in `path_config.py` for better path management, including actions log and run_cli paths.
- Updated various modules to utilize the unified path configuration, ensuring backward compatibility and improved maintainability.
- Enhanced documentation in `README.md` to reflect changes in path management and project structure.
2025-12-28 20:47:30 +08:00
Your Name 26df350755 feat: Implement 30-minute timeout protection and unify path configurations
- Introduced a 30-minute timeout mechanism to prevent the script from getting stuck in invalid states, with configurable timeout settings.
- Unified path configurations across the project to enhance maintainability and avoid hardcoded paths.
- Updated documentation and flowcharts to reflect the new timeout feature and improved path management.
- Fixed issues with template and screenshot path configurations to ensure consistency across the project.
2025-12-28 14:47:31 +08:00
Your Name 235c5076eb fix: Update reservation handling and improve logging
- Fixed issues with the reservation backtracking feature by ensuring the `needswitch` configuration is correctly loaded from `config.json`.
- Enhanced the logging for reservation backtracking logic to provide detailed insights during execution.
- Updated the `reservations.json` file to reflect the latest reservation details, including changes to future timestamps and content.
- Cleaned up unnecessary blank lines in various markdown and Python files for better readability.
2025-12-25 17:31:46 +08:00
Your Name e68f1dd3de feat: Refactor coverage management and enhance logging functionality
- Removed the `.coverage` file from the repository to streamline coverage management.
- Updated `.gitignore` to exclude coverage-related files and directories, ensuring a cleaner project structure.
- Introduced new scripts for checking GPU availability and detecting GUI parameter conflicts, enhancing the overall functionality of the application.
- Improved logging mechanisms across various modules to support better debugging and monitoring.
- Added comprehensive documentation for new features and updated existing markdown files for clarity.
2025-12-23 02:38:51 +08:00
Your Name 97bda4816f feat: 娣诲姞30鍒嗛挓瓒呮椂淇濇姢鍜屾墜鍔ㄥ彂閫佽繑鍥為敭鍔熻兘 2025-12-22 05:02:09 +08:00
Your Name 533943620c feat: Optimize OCR performance and enhance debugging features
- Implemented parallel execution for OCR tasks, significantly improving recognition speed for content, countdown, and value detection.
- Updated configuration settings to support automatic cleanup of debug captures, including retention days and maximum file limits.
- Enhanced GUI to include new options for debugging parameters, allowing users to configure debug capture settings directly.
- Improved documentation to reflect changes in OCR functionality and debugging features, ensuring clarity for users.
- Refined error handling and logging across various modules to facilitate better monitoring and troubleshooting.
2025-12-22 03:27:37 +08:00
Your Name 8b47b506d6 feat: Enhance 福袋 detection and reservation logic
- Updated `config.json` to introduce new settings for infinite loop mode and adjust various thresholds for 福袋 detection.
- Refined the pixel detection logic in `douyin_detection.py` to improve error handling and retry mechanisms.
- Enhanced reservation handling in `douyin_flow_control.py` to prioritize high-value 福袋 and streamline the switching process.
- Improved the GUI in `gui_app.py` to support new configuration options and ensure better user experience.
- Added new tools for analyzing 福袋 colors and comparing them with coupon colors to aid in detection accuracy.
- Updated documentation to reflect changes in configuration and usage instructions.
2025-12-20 13:32:32 +08:00
Your Name 836a31d817 refactor: Remove outdated files and enhance Web GUI functionality
- Deleted obsolete markdown files related to follow tab coordinates testing and results.
- Removed outdated batch scripts for launching the Web GUI.
- Updated `config.json` to improve reservation handling and adjust prize value settings.
- Enhanced logging and error handling in `web_gui.py` and `app.js` for better user experience.
- Added automatic screenshot functionality during Web GUI startup for improved monitoring.
2025-12-19 03:31:08 +08:00
Your Name b0bd7c72c8 refactor: Remove outdated batch script and enhance configuration settings
- Deleted the obsolete batch script for launching the Web GUI.
- Updated `config.json` to increase `webgui_log_capacity` to 2000 and set `reset_after_swipes` to 15.
- Enabled `reset_after_swipes_enabled` for improved functionality.
- Added a new field `reservation_back_swipe_delay` to enhance reservation handling.
- Improved OCR caching and detection mechanisms in `douyin_fudai.py` for better performance.
- Enhanced logging functionality in `web_gui.py` to handle ANSI escape codes and improve error handling.
2025-12-16 16:49:29 +08:00
Your Name 5bbf59f13f feat: 更新 README,优化 OCR 识别逻辑,调整高价值房间和预约数据结构 2025-12-15 20:43:00 +08:00
Your Name 02b2930639 Add styles for web UI and create batch script for launching Web GUI
- Introduced a comprehensive CSS file for styling the web interface, including variables for colors, layout styles, and responsive design adjustments.
- Added a batch script to automate the process of stopping any existing instances of the web GUI and launching the new instance, along with opening the browser to the appropriate URL.
2025-12-15 18:17:16 +08:00