Commit Graph
4 Commits
Author SHA1 Message Date
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