Commit Graph
62 Commits
Author SHA1 Message Date
Your Name 29cef2c578 refactor(gui): 抽 realtime_tab UI 创建到 components/realtime_tab (2037 → 1878) 2026-05-30 16:25:51 +08:00
Your Name 6bac014c3d refactor(gui): 抽 load_config_to_ui + save_ui_to_config 到 components/config_io (3538 → 3052) 2026-05-30 15:41:27 +08:00
Codex 2fab3f238e fix: entry-point scripts douyin.* import 失败 — sys.path 在 import 之后才设置
bin/run_cli.py 的 _BASE_DIR+sys.path.insert 原在 logging import 之后,
导致 No module named 'douyin' 警告。tools/ 下 5 个脚本完全缺失 sys.path
设置,auto_connect_wifi_adb.py 层级算错只跳到 tools/ 而非项目根。
2026-05-23 18:11:18 +08:00
CodexandClaude Opus 4.7 e35e8a85bd 建立版本管理体系:CHANGELOG + bump 脚本 + pyproject 元数据 + 一致性测试
新增:
- CHANGELOG.md:Keep a Changelog 1.1.0 格式,回填 V3.0.0–V3.3.3 历史
- tools/dev/bump_version.py:一键 bump major/minor/patch,
  同步 version.py / pyproject.toml / CHANGELOG.md,并创建 git tag。
  支持 --dry-run / --no-tag。
- tests/test_version_consistency.py:9 个用例确保
  version.py、pyproject.toml、CHANGELOG.md 三处版本号一致

修改:
- pyproject.toml 加 [project] 元数据,version=3.3.3(PEP 440 形式,
  与 douyin/core/version.py 同步;后者带 V 前缀,是单一事实来源)

后续会给 V3.0.0 → V3.3.3 补打 git tag。

回归:353 个 pytest 用例通过;bump_version dry-run 三种模式(patch/minor/major/set)
全部输出正确。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:17:56 +08:00
CodexandClaude Opus 4.7 7fb0c3849c P0 死代码清理:删 .backup / 空文件 / GUI 占位桩 / 占位目录 / 失效测试
A. 删除 3 个 .backup 文件(约 3.4K 行)
  - douyin/detection/douyin_pixel.py.backup
  - douyin/stage/douyin_stage_handler.py.backup
  - gui/components/log_color_config.py.backup

B. 删除 0 字节文件
  - douyin/other/douyin_stuck_guard.py
  - docs/功能差异对比.md
  - docs/archive/模块化代码对比说明.md

C. 删除 9 个 TODO + pass 占位组件(全仓零外部引用)
  - gui/components/{config_manager,image_viewer,stats_display,
    reservation_display,high_value_rooms_display,ocr_panel,main_window}.py
  - gui/web_components/{proc_runner,http_handler}.py

D. 删除占位目录与失效测试入口
  - douyin/detection/core/  仅 re-export 占位
  - douyin/fudai/finder/    仅 re-export 占位
  - tests/run_test.py       指向已删的 deleted_tests_backup/

附加:tools/diagnostics/check_web_gui_config_sync.py --help 字符串里
      tools/web_gui_config_manifest.json 旧路径修正为 tools/dev/...

回归:154 → 141 个 .py,全量 compileall 通过;AST 扫描 0 处 import 残留;
gui.gui_app/web_gui/gui_core 仍可加载;fudai_analyse / should_skip_fudai_by_config
业务函数链路正常;test_filter_logging / check_web_gui_config_sync 通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 10:36:59 +08:00
CodexandClaude Opus 4.7 7f33d45df6 fix: tools/diagnostics/check_web_gui_config_sync 路径回归
main 上脚本被迁到 tools/diagnostics/,manifest 被迁到 tools/dev/,
但 ROOT/MANIFEST_PATH 仍按旧位置(tools/ 根、parents[1])计算,
导致脚本运行时报 FileNotFoundError 找不到 gui_app.py。

- ROOT: parents[1] -> parents[2]
- MANIFEST_PATH: tools/web_gui_config_manifest.json -> tools/dev/web_gui_config_manifest.json

回归:脚本输出 [OK] WebUI and gui_app.py config keys are synchronized (125 shared keys)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 09:47:53 +08:00
CodexandClaude Opus 4.5 8fe7ff0585 refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
将 4 个根目录核心模块迁移到合理位置:
- path_config.py    -> douyin/core/path_config.py
- version.py        -> douyin/core/version.py
- Underlying_Operations.py -> douyin/core/underlying_operations.py
- unified_logger.py -> douyin/logging/unified_logger.py

配套更新所有 import:
- path_config: 41 处 import 改为 douyin.core.path_config
- version: 4 处改为 douyin.core.version
- unified_logger: 5 处改为 douyin.logging.unified_logger
- Underlying_Operations: 14 处改为 douyin.core.underlying_operations

修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。

验证:python -m compileall 全项目通过。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-21 00:23:14 +08:00
CodexandClaude Opus 4.5 a19fa35a0f chore: 整理 tools/ 47 个脚本按功能分组
- diagnostics/ 11 个:环境/配置/依赖诊断
- logs/ 7 个:日志分析与查看
- coords/ 6 个:坐标拾取与区域选择
- cleanup/ 3 个:代码清理工具
- adb/ 2 个:ADB / 输入法相关
- windows/ 4 个:Windows 系统修复(备份)
- dev/ 9 个:开发辅助 / 运行时探测

并更新 tools/README.md 描述新结构。
删除 3 个明显的临时调试脚本 (_dump_lines.py / tmp_*.py)。

tools/ 不被业务代码 import,分组仅为人工浏览方便。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-20 23:25:28 +08:00
CodexandClaude Opus 4.5 5ce314b41c chore: 清理死文件和裸 except
- 删除空文件 sitecustomize.py
- 修复 tools/simple_region_selector.py 中的裸 except:

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-20 22:46:02 +08:00
Codex 1fdec7a548 整理项目文件分类 2026-05-20 20:49:19 +08:00
Codex 38e2b399d4 增加Web和桌面参数自动同步清单 2026-05-20 20:35:58 +08:00
Codex caa24ea8ca 保持Web端和桌面端参数同步 2026-05-20 20:32:23 +08:00
Codex e7a7d3f888 Fix device selection and adb command safety 2026-05-20 18:43:58 +08:00
Your Name d057c1d84e 优化:调整WiFi ADB连接逻辑,支持ip:port格式;改进USB设备选择逻辑,增强连接稳定性 2026-01-25 15:33:32 +08:00
Your Name 4903e50ff2 优化:调整代码格式,增强可读性 2026-01-23 15:29:09 +08:00
Your Name df65adfe4e feat: 更新配置文件以启用调试捕获,调整福袋相关坐标,优化预约处理逻辑,增强界面显示信息 2026-01-16 03:04:11 +08:00
Your Name 504410f7b9 feat: 优化映射表加载与导出功能,确保数据一致性与可视化更新 2026-01-15 16:18:10 +08:00
Your Name 2358682216 feat: 添加持久化映射加载和状态文件序列化功能,优化 GUI 显示 2026-01-15 14:25:54 +08:00
Your Name a48e4004da feat: 添加检测动作后停留时间设置,支持随机范围 2026-01-13 00:46:47 +08:00
Your Name 540c30f90c feat: 添加彩色日志查看器,支持关键字过滤和行数限制 2026-01-13 00:38:31 +08:00
Your Name d1f1c8f682 Refactor detailed_time_analysis.py for improved readability and add log_filter.py for keyword-based log filtering
- Cleaned up code formatting and improved readability in detailed_time_analysis.py.
- Introduced a new script, log_filter.py, to filter log files based on user-defined keywords, with options for outputting results to a file.
2026-01-12 23:48:10 +08:00
Your Name 735a04722d feat: 优化福袋内容过滤逻辑,移除凌晨时段不过滤的判断;新增详细时间分析工具 2026-01-12 14:08:55 +08:00
Your Name fb0c07c91a Add shopping red packet detection tests and sample image
- Implemented a test script for shopping red packet detection using pixel analysis and OCR.
- Created a sample image to simulate a shopping red packet for testing purposes.
- Added functions to test pixel detection, coordinate definitions, and OCR keyword matching.
- Included detailed print statements for test results and summaries.
2026-01-08 20:37:49 +08:00
Your Name b3011dd9ce feat: Implement high-value room revisit feature and enhance fudai tracking
- Added tracking for previously seen fudai in Runner and ProcRunner classes to avoid duplicate recognition.
- Extracted room title during fudai recognition for better tracking.
- Updated high_value_rooms.json with new room entries and adjusted total count.
- Introduced new GUI elements for configuring icon coordinates in webui.
- Created comprehensive documentation for the high-value room revisit functionality.
- Added tests for delay settings and icon detection logic to ensure functionality.
- Implemented a tool for analyzing step times in logs to identify performance bottlenecks.
2026-01-08 14:27:38 +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 c6eb76845f feat: 优化代码格式,提升可读性和一致性 2026-01-06 22:39:58 +08:00
Your Name 68295e564e feat: 优化配置和日志提取逻辑,增强用户体验和数据准确性 2026-01-06 22:39:27 +08:00
Your Name 917438af2e feat: 优化代码格式和可读性,增强日志清理策略配置 2026-01-06 17:00:54 +08:00
Your Name dcded08796 feat: enhance swipe and back navigation logic
- Adjusted configuration for reset after swipes to 10 seconds and added action to go back.
- Updated flow control to skip back action if a recent reset was triggered within 5 seconds.
- Implemented a mechanism to enable back navigation when consecutive misses reach a threshold.
- Added GUI options to enable or disable back navigation on misses, ensuring consistency with user settings.
- Introduced new diagnostic tools for runtime flag checks and screenshot diagnostics.
- Created PowerShell scripts for restoring Start Menu shortcuts and performing system health checks.
- Added tests for swipe operations and back navigation to validate new logic.
2026-01-06 16:55:00 +08:00
Your Name 43e39f4db6 feat: 添加工具以查找重复的异常处理,增强代码质量检查;新增验证 GUI 回退方式的自检脚本 2026-01-05 21:32:50 +08:00
Your Name 4620d28364 feat: 增加合并配置文件的工具,支持从旧版配置文件合并缺失的键并备份原文件 2026-01-04 20:36:46 +08:00
Your Name e42e6e6d3b feat: 更新配置文件,禁用养号相关功能并修复相关逻辑;优化文档和代码可读性 2026-01-04 20:33:55 +08:00
Your Name 6121154370 feat: 更新配置文件路径,重构配置管理逻辑,增强配置文件的兼容性和可读性 2026-01-04 16:27:19 +08:00
Your Name 2847b8359e feat: 优化数字处理逻辑,提升代码可读性和维护性;更新预约状态数据结构 2026-01-04 15:07:49 +08:00
Your Name 8838b62e61 feat: 调整高价值福袋预约参数,增加提前参与时间和提高最低奖品价值 2026-01-04 15:07:49 +08:00
Your Name 9009b15a2b refactor: 优化代码格式,合并多行赋值为单行,调整异常处理逻辑 2026-01-04 09:06:55 +08:00
Your Name a61ba62864 feat: Enhance yanghao detection with polygon support and template matching
- Updated config.json to include new parameters for yanghao template paths and match thresholds.
- Adjusted default icon match threshold in config to 0.70 for better detection.
- Implemented polygon detection logic in yanghao_idle function to allow for flexible ROI configurations.
- Added support for per-action ROI scaling and sizes in the configuration.
- Introduced new methods in fudai_analyse for capturing ROI screenshots and matching templates.
- Created a test script to validate polygon detection against provided templates.
- Improved error handling and logging for better debugging during detection processes.
2026-01-04 09:06:25 +08:00
Your Name d100ac0a66 refactor: 优化代码格式,调整多个文件中的换行和缩进 2026-01-03 19:18:57 +08:00
Your Name 95b4517bdd feat: Enhance logging and parameter tracking capabilities
- Refactor `gui_core.py` to improve code readability and maintainability by adding line breaks for long statements.
- Introduce `inspect_lines.py` script for inspecting specific line ranges in files.
- Add `generate_param_locations.py` to scan the repository and generate a report of function definitions, argparse parameters, and tracking calls.
- Implement `param_usage_tool.py` for analyzing `param_usage.json` records and scanning code for tracking calls.
- Create `simulate_reservation_preempted_flow.py` and `simulate_reservation_preempted_flow_dynamic.py` to validate behavior of reservation logic under specific conditions.
- Add global parameter tracking feature in `run_cli.py` to enable detailed usage tracing.
2026-01-03 19:12:58 +08:00
Your Name 9e08ed3bd0 chore: remove OCR archive, delete collect_ocr_failures, update docs 2026-01-03 03:50:45 +08:00
Your Name 768f04c5d5 refactor(logging): 统一字符串引号风格,优化日志处理输出格式 2026-01-03 01:10:59 +08:00
Your Name 3d93f7f723 feat(logging): enhance logging configuration and file handling
- Updated the maximum log file size to 10MB and reduced backup count to 5.
- Introduced a `per_run` option to generate independent log files for each run.
- Improved log file naming conventions based on the `per_run` setting.
- Added support for both size-based and time-based log rotation configurations.
- Implemented error handling for OCR click execution in `douyin_helpers.py`.
- Added new CSV report for OCR regions and updated logging for click actions.
- Introduced a temporary script to check logging configurations and handlers.
- Added a new log file for unified logs dated 2025-12-27.
- Updated reservations timestamp in JSON state file.
2026-01-03 01:06:49 +08:00
Your Name 0b5f150691 Refactor and clean up code across multiple scripts
- Removed trailing whitespace and ensured files end with a single newline in cleanup_unused_files.py.
- Added fix_trailing_whitespace.py to batch remove trailing whitespace from Python files.
- Updated install_dependencies.py to improve dependency installation prompts.
- Cleaned up pick_coords.py by removing unnecessary whitespace and improving code readability.
- Enhanced region_selector.py by disabling specific pylint checks for better compatibility with third-party libraries.
- Improved WPS流程图生成工具.py by cleaning up whitespace and enhancing readability.
- Updated __init__.py in typings to remove unnecessary lines.
- Modified app.js to adjust default configuration values and clean up unused code.
2026-01-02 23:57:03 +08:00
Your Name 9131c48633 Refactor screenshot service for improved performance and error handling; add simplified version to avoid linter issues. Update tests and documentation accordingly. 2026-01-02 02:17:33 +08:00
Your Name a0aad21835 feat: Optimize ADB exec-out and OCR performance
- Introduced performance enhancements for ADB exec-out, reducing execution time by 10-20% through the use of Popen with streaming reads, increased buffer sizes, and removal of unnecessary fsync calls.
- Implemented optimizations in OCR processing, cutting recognition time by 50% by refining button recognition logic and improving image loading and preprocessing methods.
- Added detailed performance diagnostics and configuration options to facilitate further optimizations.
- Created new documentation files outlining the performance improvements and recommendations for future enhancements.
2026-01-02 02:06:01 +08:00
Your Name c7b5d6be0f 后台保存debug图像 2026-01-01 13:25:50 +08:00
Your Name 7b93413af7 回退到直接截图 2026-01-01 11:30:59 +08:00
Your Name 478ae69052 chore: Clean up blank lines and enhance code organization
- Removed excessive blank lines from multiple Python scripts and configuration files to improve readability and maintainability.
- Ensured consistent formatting across the project, contributing to a more organized codebase.
- Added new files for testing and analysis, including `test_screenshot_error_handling.py` and `test_screenshot_reuse_optimization.py`, to improve testing coverage and functionality.
2026-01-01 10:04:32 +08:00
Your Name 07c387751d chore: Clean up blank lines across multiple files to enhance readability
- Removed excessive blank lines in various Python scripts, markdown files, and configuration files to improve overall code clarity and maintainability.
- Ensured consistent formatting throughout the project, contributing to a more organized codebase.
2025-12-31 17:00:58 +08:00
Your Name ace3bbfa04 优化后台截图功能 2025-12-31 11:55:01 +08:00