Codex and Claude Opus 4.7
5966f461c3
feat(wifi_adb): 启动重连失败时自动扫描子网 + 智能匹配
...
新增 pick_best_match(devs, last) 纯函数,按优先级匹配上次设备:
1. target 完全一致(IP 没换)
2. 同 model + 同 port(换 IP 但同一台手机)—— 多台同型号时返回 None 让用户选
3. 同主机段 + 同 port(弱兜底,仅唯一时返回)
4. 唯一一台 connected(扫到就一台时认定)
GUI _try_reconnect_last_wifi 流程升级:
- verify_adb_target 失败(不可达)→ 自动 discover_adb_devices 扫子网
- pick_best_match 命中 → 选中 + 更新 last_wifi_target
- 命中且 IP 已变 → 日志写"上次目标 X 已变 → 智能匹配到 Y(已更新记忆)"
- 没命中 → 列出候选 + 提示点'扫描 WiFi'手选
实际场景:换 WiFi 网段(家里 → 公司 / 192.168.1 → 192.168.5)后
GUI 启动时自动找回同一台手机,无需任何手动操作。
新增 15 个 pick_best_match 单元测试覆盖所有规则 + 边界。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:46:23 +08:00
Codex and Claude Opus 4.7
b3a41db029
feat(wifi_adb): WiFi-ADB 设置对话框三个连接路径都记 last_wifi_target
...
补齐之前 main commit a71f6fa 漏的几处:
- "连接"按钮:成功后保存 ip:port + 设备型号到 last_wifi_target
- "自动连接"按钮:从 USB → WiFi 切换成功后保存
- "断开连接"按钮:如果断开的就是上次记住的 IP,清掉记录避免下次启动徒劳重试
行为现在统一:所有"连上一台 WiFi 设备"的入口都会更新记忆,所有"主动断开"
的入口都会清除记忆。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:21:24 +08:00
Codex and Claude Opus 4.7
a71f6faed0
feat(wifi_adb): 记住上次成功的 WiFi 设备,GUI 启动时自动重连
...
新增 gui/gui_core_pkg/config.py 三个 helper:
- get_last_wifi_target / set_last_wifi_target / clear_last_wifi_target
配置以 last_wifi_target = {target, model, saved_at} 形式存在 config.json 顶层。
GUI 行为:
- "扫描 WiFi" 选中或自动连上一台 connected 设备 → 写入 last_wifi_target
- WiFi 选择对话框"使用选中"也写入
- 主窗口启动后延迟 300ms 后台尝试 verify_adb_target(last.target)
- 已有设备:不打扰
- 重连成功:自动设为当前设备
- unauthorized:提示需手机端授权
- 不可达:提示换网了,引导点'扫描 WiFi'
新增 12 个 last_wifi_target 单元测试覆盖读写/清除/损坏值/缺文件等场景。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:16:37 +08:00
Codex and Claude Opus 4.7
db7a78876b
feat(gui): 主窗口加"扫描 WiFi"一键按钮
...
主窗口设备行的"刷新设备"按钮旁加"扫描 WiFi"按钮。后台线程扫描局域网,
按结果数智能处理:
- 0 个发现 → 日志提示
- 1 个 connected → 自动设为当前设备
- N 个 unauthorized → 提示需手机端授权
- 多个候选 → 弹简化版列表对话框让用户选
省去打开 WiFi-ADB 设置对话框的步骤,常见单机场景一键完成。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:09:01 +08:00
Codex and Claude Opus 4.7
e89393693b
feat(wifi_adb): 加局域网 ADB 设备扫描发现
...
新增 gui/gui_core_pkg/wifi_adb_scan.py(356 行):
- get_local_subnet:从本机 WLAN 出口 IP 推 /24 子网
- parse_subnet_spec:解析 192.168.5.0/24 / 192.168.5.1-100 / 192.168.5.5 / 逗号组合
- probe_adb_port:并发 TCP 探测(默认 0.3s 超时,64 线程并发)
- verify_adb_target:对每个开放端口的 IP 调 adb connect 区分 connected / unauthorized / failed
- discover_adb_devices:主入口,端到端只需 1.5 秒扫完 /24
GUI(gui/gui_app.py)"扫描局域网"按钮加在 WiFi 设备操作区:
- 自动推子网(默认)+ 手动输入支持 CIDR / 范围 / 单 IP / 逗号
- 后台线程扫描,进度条 + 阶段提示
- 列表展示 IP / 状态 / 设备型号 / adb connect 输出,列表中手动选
- 选中已 connected 的设备 → 回填 IP 到主对话框
- unauthorized 设备明确提示需手机端授权
新增 25 个 wifi_adb_scan 单元测试。真机端到端验证通过:1.5s 扫完
192.168.5.0/24 子网,发现 192.168.5.2:5555(PEPM00)connected。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 19:59:19 +08:00
Codex and Claude Opus 4.7
0d01dabb69
P2 §5.3: 23 处 importlib.import_module → 静态 from import
...
把剩余 5 个文件里所有动态导入 douyin_screenshot_manager 的 importlib 调用
替换为顶部静态 from import 模式:
- douyin/detection/douyin_pixel.py 7 处
- douyin/detection/douyin_detection.py 8 处
- douyin/fudai/douyin_fudai_finder.py 4 处
- douyin/fudai/core/fudai_attend.py 2 处
- gui/gui_app.py 2 处
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 5 个文件
无循环依赖。bin/run_cli.py 的剩余 1 处 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销(detection 模块在热路径上调用密集)
- 死代码减少 ~92 行(5 个文件合计 -115 / +23)
回归:140 .py 编译通过;importlib 残留只剩 bin/run_cli 故意 1 处;
5 个模块导入 + 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 12:06:23 +08:00
Codex and Claude Opus 4.7
d5c9936c88
gui_app + base_interface: 内部错误 print → logger
...
gui/gui_app.py(8 处 sys.stderr print → _LOGGER):
- 配置读取失败、日志文件权限/写入错误(warning/error 级)
- pump_logs 内日志插入失败、循环异常、调度下次更新失败(error/warning 级)
- 顶部 import logging + 模块级 _LOGGER
douyin/core/fudai_modules/base_interface.py(2 处 print → _LOGGER):
- BaseFudaiMixin._safe_log 在主类无 _enhanced_log_kv 时的兜底改为 logger.info
- 顶部 import logging + 模块级 _LOGGER
保留为 stdout 的合理场景:
- bin/run_cli.py 的 [TEST]/[YANGHAO-ONLY] CLI 输出
- bin/manage_logs.py 的 CLI 工具输出
- gui/webgui_launcher.py: GUI 同时把 log 输出到控制台
- douyin/logging/internal_loggers.py: logger 模块自身的初始化失败兜底
- douyin/logging/douyin_logging{,_wrapper}.py: 日志系统内部的格式化输出
回归:140 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
gui.gui_app/web_gui/gui_core/base_interface 全部可加载,_LOGGER 名称正确。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 11:43:44 +08:00
Codex and Claude Opus 4.5
ba4c131b2d
refactor: 简化 gui_app.format_gui_log_line 为薄包装
...
原本 64 行的 fallback 实现实际上是死代码——
gui.components.log_viewer.format_gui_log_line 一直存在,
import 失败几乎不可能发生。
简化为薄包装函数,import 失败时返回原字符串。
文件行数:5857 -> 5804(减 53 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:42:27 +08:00
Codex and Claude 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
Codex
caa24ea8ca
保持Web端和桌面端参数同步
2026-05-20 20:32:23 +08:00
Your Name
6933c0b4fe
优化:调整参与按钮区域坐标,修正按钮覆盖范围
2026-01-25 20:50:16 +08:00
Your Name
272dcab91d
优化:调整参与按钮区域坐标,增强对部分机型底部按钮的覆盖;更新调试截图逻辑以使用新坐标
2026-01-25 16:58:15 +08:00
Your Name
4903e50ff2
优化:调整代码格式,增强可读性
2026-01-23 15:29:09 +08:00
Your Name
c79c50ffe4
优化:添加购物红包背景红色占比阈值配置,增强红包弹窗检测功能
2026-01-18 14:38:38 +08:00
Your Name
96c5cd50ec
优化:调整_mapping_tree_columns函数的格式,提升代码可读性
2026-01-18 13:42:20 +08:00
Your Name
eb23d2d8e6
GUI: 自动调整映射表列宽以适配内容
2026-01-17 22:00:14 +08:00
Your Name
272f3ddae0
GUI: 修复映射表容器,避免列挤压并修复滚动条问题
2026-01-17 21:40:20 +08:00
Your Name
3ce0aa73dd
feat: 优化当前直播间标题获取逻辑,提升匹配准确性
2026-01-17 19:34:57 +08:00
Your Name
3488624b8f
feat: 优化预约逻辑,增强映射表记录功能,提升用户体验
2026-01-17 18:46:13 +08:00
Your Name
db75248b98
feat: 优化滑动重置回退延迟,从2秒减少到0.1秒;完善预约系统二次回退机制
2026-01-16 21:54:09 +08:00
Your Name
54f9b39d2e
feat: 优化滑动重置和返回键回退逻辑,完善预约系统二次回退机制
2026-01-16 21:53:05 +08:00
Your Name
ca77862a86
feat: 添加滑动坐标配置功能,优化滑动操作的灵活性
2026-01-16 19:18:37 +08:00
Your Name
7c839c5d39
feat: 优化直播间标题识别逻辑,增强缓存管理和错误处理
2026-01-16 16:15:40 +08:00
Your Name
3723c39a58
feat: 优化福袋详情记录逻辑,提升代码可读性
2026-01-16 03:44:53 +08:00
Your Name
df65adfe4e
feat: 更新配置文件以启用调试捕获,调整福袋相关坐标,优化预约处理逻辑,增强界面显示信息
2026-01-16 03:04:11 +08:00
Your Name
362b7c841c
fix: 修复代码格式问题,提升可读性
2026-01-16 02:31:34 +08:00
Your Name
0862a92dc5
feat: 优化 diagnose_stage_from_current_screen 函数的调用格式,提升代码可读性
2026-01-15 23:04:53 +08:00
Your Name
d2c5ca57e8
feat: 更新房间状态管理,优化直播间标题记录逻辑,移除过时的房间位置映射文件
2026-01-15 23:03:56 +08:00
Your Name
d1f675073f
feat: 更新房间位置映射表,修改标题为海宁齐总
2026-01-15 16:19:08 +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
a84836a6c7
refactor: 优化代码格式,提升可读性
2026-01-15 01:12:20 +08:00
Your Name
df96e5fc83
feat: 添加确保输入框获得焦点的选项,优化文本粘贴功能
2026-01-15 01:10:54 +08:00
Your Name
54f3b35a26
Refactor code structure for improved readability and maintainability
2026-01-11 23:31:38 +08:00
Your Name
2f01200887
feat: 更新高价值房间数据,调整房间信息和时间戳;优化红包弹窗检测函数,增加返回详细信息参数
2026-01-09 16:35:23 +08:00
Your Name
0830c08fca
feat: 更新高价值房间数据,调整房间信息和检测耗时
2026-01-09 15:09:06 +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
5738d29bd6
feat: 添加预约回退功能完整测试脚本和错误场景测试脚本
2026-01-08 00:15:00 +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
eb96d6869e
feat: 优化日志搜索功能,增强用户体验和性能
2026-01-07 19:31:26 +08:00
Your Name
c6b6745e3e
feat: 优化日志记录格式,增强循环次数和运行时间限制的可读性
2026-01-07 19:06: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
a962a164e4
feat: 优化日志监控配置代码格式,提升可读性
2026-01-06 17:06:40 +08:00
Your Name
2c9513ebd4
feat: 添加日志监控阈值配置选项,优化日志管理功能
2026-01-06 17:04:45 +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
0c3a763d63
feat: 调整连续无福袋退出阈值和启用返回键回退配置,优化界面布局
2026-01-05 23:27:00 +08:00
Your Name
5e94990275
feat: 添加启用返回键回退的配置选项,优化无福袋处理逻辑
2026-01-05 22:57:01 +08:00
Your Name
551951dc01
feat: 优化设备刷新和实时查看按钮的创建方式,提高代码可读性
2026-01-05 22:37:17 +08:00