Your Name
1202dffa32
chore(release): bump version to V3.3.11
Windows Package CI / package-fresh-install (push) Has been cancelled
2026-06-29 02:19:44 +08:00
Your Name
e24b0bdd1e
fix(updater): use visible full installer by default
2026-06-29 02:19:14 +08:00
Your Name
1c686a6595
chore(release): bump version to V3.3.10
2026-06-29 01:31:57 +08:00
Your Name
9c8a037c4e
fix(logs): allow larger diagnostic uploads
2026-06-29 01:07:50 +08:00
Your Name
94e0c6432f
fix(fudai): stabilize reservation fansclub prejoin
2026-06-29 01:01:48 +08:00
Your Name
51c1c2da39
fix(dashboard): refresh live screenshot and package driver helper
2026-06-29 00:53:50 +08:00
Your Name
60306dd4e0
fix(screenshot): recover adb after empty screencap output
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-29 00:35:07 +08:00
Your Name
329b7756f4
fix(gui): 增强 WiFi ADB 发现和更新进度
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-29 00:15:13 +08:00
Your Name
16019ee649
fix(gui): 自动恢复 ADB server 端口
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-28 23:57:10 +08:00
Your Name
60332db82b
fix(gui): 保留 WiFi ADB 随机端口
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-28 23:44:14 +08:00
Your Name
c2cbee9592
Polish dashboard table styling
2026-06-28 23:30:09 +08:00
Your Name
ab37165baf
Improve delta update failure logging
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-28 22:16:12 +08:00
Your Name
c0cb274728
Improve dashboard diagnostics and update UI
2026-06-28 21:26:48 +08:00
Your Name
a870e0cbf9
fix: fall back to full installer after delta update failure
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-28 18:41:40 +08:00
Your Name
13aa60c06a
feat: add manual update check button
2026-06-28 14:22:35 +08:00
Your Name
f010853b97
fix: harden screenshot capture and diagnostics
2026-06-28 13:44:40 +08:00
Your Name
ee3424cd9e
fix: harden license server and web gui security
2026-06-28 09:24:22 +08:00
Your Name
7c6189fd5e
docs: add full security audit
2026-06-28 09:12:31 +08:00
Your Name
7745f9a57f
ci: add fresh install package smoke test
Windows Package CI / package-fresh-install (push) Waiting to run
2026-06-28 09:03:13 +08:00
Your Name
f5a77867ee
fix: require license gate before gui entry
2026-06-28 08:50:05 +08:00
Your Name
407c3b37c2
fix: allow first-run license activation
2026-06-28 07:55:02 +08:00
Your Name
e315aaf80b
feat: support delta update packages
2026-06-28 00:32:01 +08:00
Your Name
7234bf0cac
style: unify dashboard scrollbars
2026-06-27 23:40:25 +08:00
Your Name
39996405d5
fix: require license for dashboard gui
2026-06-27 23:35:24 +08:00
Your Name
383c947a03
style: refine dashboard toolbar and license feedback
2026-06-27 23:25:47 +08:00
Your Name
63c726ddea
build: include android runtime helpers
2026-06-27 19:33:27 +08:00
Your Name
f257c4e3fc
build: bundle adb platform tools
2026-06-27 17:59:36 +08:00
Your Name
ecbd07cea0
style: tune dashboard typography
2026-06-27 17:59:19 +08:00
Your Name
5aeeef4aee
style: polish dashboard wifi adb ui
2026-06-27 13:00:03 +08:00
Your Name
9a75b9b481
docs: audit server and anti-reverse security
2026-06-26 21:50:34 +08:00
Your Name
872d114a0f
chore(release): bump version to V3.3.4
2026-06-26 21:11:36 +08:00
Your Name
a7d6bc87b6
style: polish dashboard app UI
2026-06-25 08:49:52 +08:00
Your Name
cf2b71f831
fix: harden redeem link flow
2026-06-24 22:03:04 +08:00
Your Name
3ab15e69f9
feat: add redeem links for external sales
2026-06-24 18:49:21 +08:00
Your Name
8e8a14cf69
build: allow reusing pyinstaller cache
2026-06-24 03:47:38 +08:00
Your Name
164f76658c
fix reservation fansclub prejoin timing
2026-06-24 02:20:20 +08:00
Your Name
ffebc8d0dc
add direct attend button ocr fallback
2026-06-24 00:56:36 +08:00
Your Name
61d3ad5d83
fix pixel button detection for rgba screenshots
2026-06-24 00:47:55 +08:00
Your Name
df46d723c3
avoid back exit during reservation direct attend
2026-06-24 00:17:45 +08:00
Your Name
e41796d43a
keep reservation after coupon popup during direct attend
2026-06-24 00:10:20 +08:00
Your Name
2b12ddbec3
fix reservation action log tag
2026-06-23 23:54:03 +08:00
Your Name
d0166d27d3
security: harden license server and packaging checks
2026-06-23 23:47:19 +08:00
Your Name
9062ee7204
fix fudai countdown full-line ocr
2026-06-23 23:32:20 +08:00
Your Name
008d7f82b3
build: package dashboard with cythonized core
2026-06-23 23:30:29 +08:00
Your Name
4dea1328ec
fix one-task countdown config crop
2026-06-23 22:49:30 +08:00
Your Name
dc34b7484b
fix one-task countdown box root cause
2026-06-23 22:18:54 +08:00
Your Name
ed0aca5f28
fix fansclub recheck and countdown fallback
2026-06-23 22:00:31 +08:00
Your Name
33c6f7a54f
fix normal fansclub recovery flow
2026-06-23 20:28:41 +08:00
Your Name
91a3aa5abf
fix fansclub join wait protection
2026-06-23 20:10:13 +08:00
Your Name
a2a899bb9f
fix countdown frame fallback
2026-06-23 19:54:40 +08:00
Your Name
3ace80dcca
add countdown OCR voting fallback
2026-06-23 19:18:12 +08:00
Your Name
ab664e4da8
fix countdown digit extraction regression
2026-06-23 19:05:07 +08:00
Your Name
7086ab1d6e
fix: stabilize fudai countdown OCR crops
2026-06-23 15:11:29 +08:00
Your Name
5ebca337eb
fix: require obfuscation for release packaging
2026-06-23 15:11:29 +08:00
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
Your Name
5d3d58a2f9
fix: retry reservation direct attend icon scan
2026-06-23 12:07:36 +08:00
Your Name
25df550304
fix: prioritize reservation conflicts by value
2026-06-23 11:46:02 +08:00
Your Name
4af2adc4d6
fix: preserve fudai detail countdown detection
2026-06-23 11:22:23 +08:00
Your Name
77413fa7d1
docs: add full security review
2026-06-23 11:15:57 +08:00
Your Name
aeeabd8ba2
security: use domain for license endpoints
2026-06-23 10:57:35 +08:00
Your Name
25876bd25a
update server defaults and package assets
2026-06-23 10:48:02 +08:00
Your Name
a449b7634c
fix: speed up fansclub reservation prejoin
2026-06-23 10:43:17 +08:00
Your Name
0efdc83d0b
chore: migrate license server defaults
2026-06-23 10:11:45 +08:00
Your Name
920c51d460
fix: broaden fansclub reservation prejoin match
2026-06-23 10:00:56 +08:00
Your Name
ba9ac4cb0e
fix: prejoin fansclub before reservation
2026-06-23 09:57:06 +08:00
Your Name
f95832579a
fix: avoid live-room back on fudai retry
2026-06-23 03:09:14 +08:00
Your Name
5c7d341d9b
feat: add server managed auto updates
2026-06-23 03:06:55 +08:00
Your Name
ba2e159cad
use text inputs for dashboard numeric fields
2026-06-23 03:00:06 +08:00
Your Name
fe53debeb1
auto refresh dashboard reservations
2026-06-23 02:45:54 +08:00
Your Name
d81e00ddbc
add pause resume controls to ui
2026-06-23 02:38:08 +08:00
Your Name
3c7cb45bec
fix: parse paddle live tab ocr boxes
2026-06-23 02:30:10 +08:00
Your Name
86bf5cefb1
fix: recognize joined recommendation live tab ocr
2026-06-23 02:17:05 +08:00
Your Name
debf016d23
update dashboard stats without rebuilding
2026-06-23 02:15:03 +08:00
Your Name
0c91367c07
improve dashboard live stats and controls
2026-06-23 02:08:38 +08:00
Your Name
25f7f9af9e
fix: use ocr live tab and merge stuck room titles
2026-06-23 02:06:53 +08:00
Your Name
e286cd46c8
fix dashboard mapping auto refresh
2026-06-23 01:47:39 +08:00
Your Name
8389f85124
fix: speed up reservation direct attend
2026-06-23 01:43:17 +08:00
Your Name
84b9143fa6
Fallback WiFi ADB connect to mdns port
2026-06-23 01:08:03 +08:00
Your Name
20e438ee13
Clarify WiFi ADB scan failure hint
2026-06-23 00:29:34 +08:00
Your Name
5c98bb8353
Support reconnecting multiple WiFi ADB devices
2026-06-23 00:25:56 +08:00
Your Name
b533c4e96e
Fix reservation direct attend timing guard
2026-06-19 21:52:32 +08:00
Your Name
8fac904ba9
use runtime counters for dashboard statistics
2026-06-19 20:49:01 +08:00
Your Name
680c02d362
expand dashboard statistics page
2026-06-19 20:38:28 +08:00
Your Name
4891f3b019
improve dashboard nav scroll and reservation details
2026-06-19 20:24:59 +08:00
Your Name
0f1baac92f
Prevent stale run from restoring room map
2026-06-19 20:24:11 +08:00
Your Name
f129206df7
Clear runtime state at fudai startup
2026-06-19 20:18:15 +08:00
Your Name
d4931b6820
simplify dashboard license input
2026-06-19 20:14:01 +08:00
Your Name
48b0a32e24
Guard fudai retry and reservation seek verification
2026-06-19 20:01:46 +08:00
Your Name
a06218dd16
Clear stale reservation direct attend state
2026-06-19 19:37:24 +08:00
Your Name
23abd486af
fix dashboard mapping table coverage
2026-06-19 19:32:55 +08:00
Your Name
17068c7928
Use runtime screenshot in dashboard preview
2026-06-19 19:28:21 +08:00
Your Name
b3d3f28ff3
Reduce fudai detection overhead
2026-06-19 19:16:25 +08:00
Your Name
58c1856fad
Keep live title OCR in fudai detail path
2026-06-19 18:12:28 +08:00
Your Name
78a75d4843
Tune fudai detail OCR strategy
2026-06-19 14:44:17 +08:00
Your Name
32fcbc4c24
Skip full countdown OCR in fudai critical path
2026-06-19 14:30:47 +08:00
Your Name
6b987fd04f
Keep task OCR out of fudai detail critical path
2026-06-19 14:12:23 +08:00
Your Name
aa3690fecf
Fix fudai wrong-target retry and detail OCR delay
2026-06-19 13:54:18 +08:00
Your Name
207748a901
Improve screenshot fallback and miss samples
2026-06-19 12:54:57 +08:00
Your Name
040ccd8161
feat: enforce online license verification
2026-06-19 11:49:57 +08:00
Your Name
c5b7198145
Fix fudai return guards and sample selection
2026-06-19 11:42:34 +08:00
Your Name
0c8166d616
Cold start Douyin before CLI fudai runs
2026-06-19 02:27:47 +08:00
Your Name
2042c56257
Add run log scroll mode control
2026-06-19 02:24:40 +08:00
Your Name
2a7f4f38ab
Improve dashboard action log display
2026-06-19 02:17:10 +08:00
Your Name
9ed73bf64b
Default fudai regression collection to samples
2026-06-19 02:13:42 +08:00
Your Name
ce0e9a3585
Fix dashboard controls and log pages
2026-06-19 02:08:05 +08:00
Your Name
9c329caf72
Add fudai regression artifact collector
2026-06-19 02:03:29 +08:00
Your Name
b850afae2c
Polish dashboard app visual style
2026-06-19 01:38:15 +08:00
Your Name
240f49825f
feat: add license admin web login
2026-06-19 01:29:41 +08:00
Your Name
a39545ed5d
fix: harden license server security
2026-06-19 01:11:10 +08:00
Your Name
ec51772cf0
Fix fudai countdown and room mapping guards
2026-06-18 19:25:46 +08:00
Your Name
d6312d8813
feat: expand license admin dashboard
2026-06-18 19:04:07 +08:00
Your Name
28709d2d97
Fix fudai diagnostics and redpacket guard
2026-06-18 18:41:27 +08:00
Your Name
cb74a23e81
feat: simplify license activation flow
2026-06-18 18:38:51 +08:00
Your Name
05be83d289
feat: add simple license activation server
2026-06-18 17:39:56 +08:00
Your Name
b2db5ed499
Show runtime metrics and screenshot on dashboard
2026-06-18 17:26:00 +08:00
Your Name
a25336770f
Show live action status on dashboard
2026-06-18 17:15:57 +08:00
Your Name
00821d0926
Refine dashboard overview readability
2026-06-18 17:12:47 +08:00
Your Name
c557ce0dfb
Fix GUI launch entries
2026-06-18 16:49:38 +08:00
Your Name
8dbaab9d27
Fix v2 fudai detail recognition
2026-06-18 13:27:27 +08:00
Your Name
fc96549bd2
fix(packaging): disable paddlex model source checks
2026-06-18 13:24:55 +08:00
Your Name
b9b580f521
Refine dashboard app UI
2026-06-18 12:51:03 +08:00
Your Name
22e2ed1508
Clear stale fudai cache when leaving room
2026-06-18 12:44:19 +08:00
Your Name
160b4f1a2d
Fix pixel stage finalize details propagation
2026-06-18 12:27:04 +08:00
Your Name
8e7be541d3
fix(packaging): split gui and cli collection
2026-06-18 12:21:24 +08:00
Your Name
89fb278988
Generalize coupon overlay rejection for fudai detection
2026-06-18 12:18:25 +08:00
Your Name
b9c5106f62
Harden fudai icon detection against coupon taps
2026-06-18 11:50:50 +08:00
Your Name
b74baef555
fix(packaging): keep distribution minimal
2026-06-18 11:14:04 +08:00
Your Name
c97e4edc74
Fix reservation backtracking after failed title verify
2026-06-18 11:06:21 +08:00
Your Name
fe1a62e92d
Fix fudai live flow state and icon fallback
2026-06-18 10:40:47 +08:00
Your Name
e977f6054d
Add dashboard desktop UI entry
2026-06-18 10:22:12 +08:00
Your Name
b61f766ea6
fix(updater): harden forced startup updates
2026-06-18 08:38:21 +08:00
Your Name
55d38c46ec
Fix fudai coupon misclick detection
2026-06-18 08:35:04 +08:00
Your Name
d48fa4eec3
Add forced startup updater
2026-06-18 07:57:38 +08:00
Your Name
9ffbe47bdb
Improve fudai live flow diagnostics
2026-06-18 04:48:16 +08:00
Your Name
daa4d1709d
Fix installer smoke runtime packaging
2026-06-18 04:43:36 +08:00
Your Name
079bf8537a
style(webui): refine typography and spacing
2026-06-18 04:35:19 +08:00
Your Name
1adaefdce6
Add lightweight fudai flow diagnostics
2026-06-18 03:52:18 +08:00
Your Name
dbf9b14fac
style(webui): apply strict modular ui redesign
2026-06-18 03:29:34 +08:00
Your Name
cc4caef6e1
Fix encrypted package runtime validation
2026-06-18 02:59:00 +08:00
Your Name
abcee63776
Add guarded UPX exe packing flow
2026-06-18 00:25:21 +08:00
Your Name
11de0f75c7
Add PyArmor obfuscation packaging flow
2026-06-17 23:42:15 +08:00
Your Name
5166678590
Add license key entry to UI
2026-06-17 23:01:21 +08:00
Your Name
b1c2128d72
Add local license verification and distribution checks
2026-06-17 22:22:04 +08:00
Your Name
8d1bb28531
make inno installer independent of language pack
2026-06-10 01:33:14 +08:00
Your Name
87838daad4
add windows installer packaging workflow
2026-06-09 21:58:35 +08:00
Your Name
6279b129cb
scan wifi adb random port across subnets
2026-06-08 18:17:29 +08:00
Your Name
207cf0eadb
improve fudai ocr debug captures
2026-06-05 15:50:00 +08:00
Your Name
62c84939ee
add fudai detail and reservation verdict markers
2026-06-05 15:46:43 +08:00
Your Name
cd7615db3c
limit wifi adb reconnect to lightweight ports
2026-06-05 15:45:37 +08:00
Your Name
e3bf99149d
wire webui region coordinate edit toggle
2026-06-05 15:45:20 +08:00
Your Name
9b03556b7d
expose fudai detail thresholds and regions
2026-06-05 15:36:10 +08:00
Your Name
37a2f94486
detect fudai detail body and dacheng task count
2026-06-04 12:27:14 +08:00
Your Name
5e2ca0587b
preserve simple and detail logs
2026-06-04 12:05:38 +08:00
Your Name
f07fbb305b
fix false fudai detail pixel detection
2026-06-04 11:51:12 +08:00
Your Name
1d564000ca
add detail OCR performance diagnostics
2026-06-04 11:39:29 +08:00
Your Name
dc6ae7d1e4
fix task count digit detection
2026-06-04 11:15:45 +08:00
Your Name
0c77bf9e0e
Keep debug capture history for px and overview
2026-06-03 22:46:53 +08:00
Your Name
ca7d64d54b
test: isolate region overrides in ui checks
2026-06-03 20:39:47 +08:00
Your Name
4797fa046e
feat: expose fudai region coordinates in gui
2026-06-03 20:29:10 +08:00
Your Name
bcc4d1151f
修复WiFi ADB随机端口扫描
2026-06-03 17:52:02 +08:00
Your Name
daf0c49288
统一日志详细度入口
2026-06-03 17:39:53 +08:00
Your Name
198a30dce1
完善新UI适配与日志简化
2026-06-03 12:40:06 +08:00
Your Name
71a9f4a25f
精简简单模式日志输出
2026-06-03 12:15:47 +08:00
Your Name
40f9812ab1
收口像素检测调试图输出
2026-06-03 12:05:27 +08:00
Your Name
3bcb5cb259
优化详情调试标注与截图复用
2026-06-03 11:36:47 +08:00
Your Name
42aa0f214d
修正调试图标注对齐
2026-06-03 10:47:39 +08:00
Your Name
24b58a8c6d
优化WiFi ADB快速扫描
2026-06-03 08:50:43 +08:00
Your Name
e51d37890a
精简像素调试图与日志
2026-06-03 02:11:45 +08:00
Your Name
168ab4e1f8
调整调试图像开关语义
2026-06-03 01:48:02 +08:00
Your Name
098083a354
修正福袋详情调试图与图标检测
2026-06-03 01:34:30 +08:00
Your Name
1d37d57c90
修复福袋详情OCR v2与调试日志
2026-06-03 01:22:13 +08:00
Your Name
2c6f024a24
test: 增补回顶保留映射与同房三连映射回归
2026-06-01 21:18:28 +08:00
Your Name
02a4dc625a
test: 增加映射合并与同房三连回顶回归用例
2026-06-01 21:16:42 +08:00
Your Name
147892a144
fix: 根因修复同房三连与映射合并,避免双切房
2026-06-01 21:13:58 +08:00
Your Name
05b9d17951
fix: remove recursive run_once reentry after desktop recovery
2026-06-01 20:58:24 +08:00
Your Name
879bb70075
docs: add chinese txt migration guide
2026-06-01 18:41:27 +08:00
Your Name
36e374ef67
refactor: split large modules and harden live-room fudai flow
2026-06-01 18:39:44 +08:00
Your Name
1845561405
docs: add quick deploy txt and one-click dependency bootstrap
2026-06-01 18:20:10 +08:00
Your Name
5d2d39b3e6
docs: 新增迁移部署指南并补充文档入口
2026-06-01 18:08:10 +08:00
Your Name
eaa14ce52f
Align web UI with gui_app features and normalize fonts
2026-06-01 17:03:35 +08:00
Your Name
7ebbdd6c1e
polish premium monitor reservations logs
2026-06-01 16:42:02 +08:00
Your Name
c2010084cf
fix(fudai): root-fix countdown minute misread with full-line mm:ss priority
2026-06-01 16:37:11 +08:00
Your Name
33d05fac54
polish premium keywords and debug layouts
2026-06-01 16:28:12 +08:00
Your Name
5ae113cc18
polish premium yanghao settings layout
2026-06-01 16:19:51 +08:00
Your Name
c7d6829219
polish premium filter settings layout
2026-06-01 16:09:43 +08:00
Your Name
fa7e5070b3
polish premium run settings layout
2026-06-01 16:03:11 +08:00
Your Name
439aa944c7
polish premium stats dashboard
2026-06-01 15:51:10 +08:00
Your Name
6df926eabd
refine premium webui command bar
2026-06-01 15:39:10 +08:00
Your Name
a0bfb70b34
polish premium webui typography and logs
2026-06-01 15:25:52 +08:00
Your Name
d696f2c974
fix(countdown): harden minute OCR selection and normalization
2026-06-01 15:15:01 +08:00
Your Name
3ce3a03f62
clean mobile premium webui backdrop
2026-06-01 14:59:29 +08:00
Your Name
93d950e78f
fix: 根治倒计时分钟误识别并统一候选解析策略
2026-06-01 14:48:36 +08:00
Your Name
a35b0371ae
quiet premium webui chrome
2026-06-01 14:48:03 +08:00
Your Name
a6563c11f4
refine premium webui details
2026-06-01 14:32:31 +08:00
Your Name
204ed24c67
polish premium webui layout
2026-06-01 14:10:32 +08:00
Your Name
60741369f2
polish premium webui visuals
2026-06-01 13:45:07 +08:00
Your Name
eea0c48a44
refactor webui dashboard layout
2026-06-01 13:35:50 +08:00
Your Name
5a51c951a2
fix(fudai): treat notice text as attended and harden attend/log parsing
2026-06-01 12:33:33 +08:00
Your Name
61dfc1c15c
fix: keep parallel OCR stable and add unknown-button fallback
2026-06-01 12:18:21 +08:00
Your Name
a68307d7fd
fix(wifi-adb): restore hi-port fallback path and harden reconnect/import edge cases
2026-06-01 11:05:47 +08:00
Your Name
e33b42597c
fix(wifi-adb): force openscreen mdns backend for scan discovery
2026-06-01 09:49:32 +08:00
Your Name
f76232f2fc
fix(wifi-adb): improve scan with multi-subnet fallback and mdns discovery
2026-06-01 09:40:44 +08:00
Your Name
de21921d03
refactor(paths): remove cwd-based mapping path fallbacks
2026-06-01 09:15:41 +08:00
Your Name
37f736c158
fix(webgui): harden config bool parsing and action error handling
2026-06-01 09:07:03 +08:00
Your Name
3659d5b7da
refactor: centralize web gui host/port config in path_config
2026-06-01 07:08:47 +08:00
Your Name
1ef7325ead
refactor(webgui): extract request and static helpers
2026-06-01 01:05:45 +08:00
Your Name
e03dcaa183
docs(webui): record HTML partial split decision
2026-06-01 01:02:54 +08:00
Your Name
458779e809
refactor(webui): extract CSS feature panels
2026-06-01 00:59:47 +08:00
Your Name
c361eb4db6
refactor(webui): extract CSS layout and shared components
2026-06-01 00:56:00 +08:00
Your Name
4db6431757
refactor(webui): extract CSS tokens and base rules
2026-06-01 00:46:06 +08:00
Your Name
8351908232
refactor(webui): reduce app script to initialization glue
2026-06-01 00:41:16 +08:00
Your Name
3bc997a4d7
refactor(webui): extract runtime actions and polling
2026-06-01 00:35:49 +08:00
Your Name
48d18daef8
refactor(webui): extract config form bindings
2026-06-01 00:26:39 +08:00
Your Name
c6a4410180
refactor(webui): extract dashboard renderers
2026-06-01 00:19:29 +08:00
Your Name
a8d1b24dc9
refactor(webui): extract log view behavior
2026-06-01 00:14:49 +08:00
Your Name
a94a6d2a71
refactor(webui): extract API client helpers
2026-05-31 11:13:28 +08:00
Your Name
3491970090
refactor(webui): extract DOM and format helpers
2026-05-31 11:07:39 +08:00
Your Name
01ce77eaa6
refactor(webui): extract frontend constants
2026-05-31 10:47:49 +08:00
Your Name
034e55072a
refactor(webui): add static module split structure
2026-05-31 10:40:06 +08:00
Your Name
ec2f044d8c
docs(webui): 制定大文件拆分计划
2026-05-31 10:32:56 +08:00
Your Name
18b75ceda4
refactor(gui): 合并顶部 Y 偏移到设备栏组件
2026-05-31 10:08:02 +08:00
Your Name
e9b003f906
refactor(gui): save_logging_config 内置到 left_config_area (169 → 159)
2026-05-30 20:13:22 +08:00
Your Name
95459607dc
refactor(gui): format_gui_log_line 内置到 log_pipeline,主文件保留兼容 re-export (178 → 169)
2026-05-30 20:08:35 +08:00
Your Name
0d4796744d
docs(specs): gui_app 拆分最终成果(5476 → 178, -96.7%)
2026-05-30 20:04:15 +08:00
Your Name
1cd94e9705
refactor(gui): 删除已不用的 logging/re/_LOGGER + RIGHT/Y 常量 (183 → 178)
2026-05-30 20:01:36 +08:00
Your Name
8c2d93a79f
refactor(gui): 删除已不再被 main 使用的 log_color_config fallback 段 (201 → 183)
2026-05-30 19:49:37 +08:00
Your Name
92d60f9931
refactor(gui): 清理 16 个未使用的 _impl 别名 import (223 → 201)
2026-05-30 19:45:27 +08:00
Your Name
29b9788371
refactor(gui): 清理 12 个未使用的 import (239 → 223)
2026-05-30 19:41:14 +08:00
Your Name
7eeaab9a6e
refactor(gui): 抽右侧主区域(notebook + 9 tabs + actions + pump_logs)到 components/right_main_area (348 → 239)
2026-05-30 19:30:11 +08:00
Your Name
089cb32e1c
refactor(gui): 抽左侧配置区(PanedWindow + 7 Tabs + load/save IO)到 components/left_config_area (389 → 348)
2026-05-30 19:18:43 +08:00
Your Name
a06ece4e15
refactor(gui): _open_realtime_viewer 直接定义,删除 forward-declare 模式 (396 → 389)
2026-05-30 19:13:52 +08:00
Your Name
6cebed599d
refactor(gui): _async_refresh_preview 闭包内联到 periodic_refreshers (398 → 396)
2026-05-30 19:09:37 +08:00
Your Name
da5e000006
refactor(gui): 抽 root window + ttkbootstrap fallback 到 components/root_window (415 → 398)
2026-05-30 19:04:50 +08:00
Your Name
065d73ff9a
refactor(gui): _open_realtime_viewer lambda 去重(2 处 → 1 个本地变量) (419 → 415)
2026-05-30 19:00:35 +08:00
Your Name
adbd8a2d6e
refactor(gui): theme_getter lambda 去重(3 处 → 1 个本地变量) (418 → 419)
2026-05-30 18:54:20 +08:00
Your Name
1235c5910f
docs(specs): gui_app 拆分最终成果(5476 → 418, -92%)
2026-05-30 18:49:55 +08:00
Your Name
84c5731cc3
refactor(gui): 抽 on_line + Runner + log_writer 到 components/log_pipeline (440 → 418)
2026-05-30 18:47:36 +08:00
Your Name
8e0ae9396d
refactor(gui): actions_log + ocr_results 内置到 simple_tabs (450 → 440)
2026-05-30 18:42:26 +08:00
Your Name
a6648c5ce8
refactor(gui): reservation/high_value 用 setup_text_tab_with_refresh 复用 (452 → 450)
2026-05-30 18:37:12 +08:00
Your Name
f75d3ae368
refactor(gui): refresh_stats 内置到 setup_stats_tab (470 → 452)
2026-05-30 18:33:21 +08:00
Your Name
d9920f1cee
refactor(gui): 抽运行日志 Tab UI 到 components/log_tab (487 → 470)
2026-05-30 18:29:00 +08:00
Your Name
e763cdc302
refactor(gui): 删除已不用的 BOTTOM/W 兜底常量 (492 → 487)
2026-05-30 18:24:34 +08:00
Your Name
fd694f8ce5
refactor(gui): 清理 6 个未使用的 _impl 别名 import (498 → 492)
2026-05-30 18:17:58 +08:00
Your Name
547228fa2d
refactor(gui): 清理未使用的 gui_core_pkg + wifi_adb_scan import (508 → 498)
2026-05-30 18:03:30 +08:00
Your Name
e7d848023c
refactor(gui): 清理 gui_core 中已不再直接用的 8 个 import (518 → 508)
2026-05-30 17:59:46 +08:00
Your Name
a1562a513d
refactor(gui): 抽顶部常驻按钮区到 components/top_buttons (527 → 518)
2026-05-30 17:55:20 +08:00
Your Name
b8f2806ffc
refactor(gui): _main_nb 直接引用 show_actions_var 等,删除 3 行 unpack (530 → 527)
2026-05-30 17:48:34 +08:00
Your Name
9642b7b0f8
refactor(gui): 抽顶部设备栏到 components/top_device_bar (607 → 530)
2026-05-30 17:45:01 +08:00
Your Name
9896eb676a
refactor(gui): 抽周期性刷新+关闭处理到 components/periodic_refreshers (630 → 607)
2026-05-30 17:40:58 +08:00
Your Name
e0c68883dd
refactor(gui): 清理 4 个未使用的 stdlib import (634 → 630)
2026-05-30 17:37:12 +08:00
Your Name
e0cad29daf
refactor(gui): 清理已抽走 var 后的死注释段 (677 → 634)
2026-05-30 17:33:14 +08:00
Your Name
6a8296cab1
refactor(gui): 删除 125 个无用的 _vars_ unpack(只保留 y_var/gui_theme_var) (802 → 677)
2026-05-30 17:30:05 +08:00
Your Name
3626e9cf6f
refactor(gui): save_logging_config 复用 _vars_,删除子集 dict (825 → 802)
2026-05-30 17:26:31 +08:00
Your Name
29d930b1de
refactor(gui): get_params 复用 _vars_ + device_var,删除子集 dict (855 → 825)
2026-05-30 17:23:43 +08:00
Your Name
df758cf224
refactor(gui): config_io 复用 _vars_ 全集,删除 _config_io_vars 子集字典 (982 → 855)
2026-05-30 17:20:52 +08:00
Your Name
47865f5dfa
refactor(gui): setup_*_tab 调用直接传 _vars_ 全集 (1110 → 982)
2026-05-30 17:17:55 +08:00
Your Name
9744b75878
refactor(gui): 抽 127 个 Var 声明到 components/config_vars 工厂 (1373 → 1110)
2026-05-30 17:14:39 +08:00
Your Name
200f3a53fc
docs(specs): 更新 gui_app 拆分最终成果(5476 → 1373, -75%)
2026-05-30 17:09:08 +08:00
Your Name
7a840120b3
refactor(gui): 抽底部操作按钮区到 components/action_buttons (1417 → 1373)
2026-05-30 17:06:36 +08:00
Your Name
e314161b6c
refactor(gui): 抽右侧主 Notebook + 实时工具栏到 components/main_notebook (1444 → 1417)
2026-05-30 17:02:35 +08:00
Your Name
3a7a7a3b75
refactor(gui): 抽 keywords_tab UI 到 components/keywords_tab (1461 → 1444)
2026-05-30 16:58:53 +08:00
Your Name
8575f04ab9
refactor(gui): 抽截图预览 Tab 整段 UI 到 components/preview_tab (1537 → 1461)
2026-05-30 16:54:53 +08:00
Your Name
728ef3cd79
refactor(gui): 5 个简单文本 Tab 用 simple_tabs 模板复用 (1571 → 1537)
2026-05-30 16:49:01 +08:00
Your Name
32e374e2c2
refactor(gui): 抽行为日志工具栏到 components/actions_log_toolbar (1649 → 1571)
2026-05-30 16:45:02 +08:00
Your Name
aa0f4e05f2
refactor(gui): 抽中奖记录 Tab 整段 UI 到 components/win_record_tab (1739 → 1649)
2026-05-30 16:40:49 +08:00
Your Name
5e3015f59b
refactor(gui): 抽日志搜索工具栏到 components/log_search_toolbar (1813 → 1739)
2026-05-30 16:36:43 +08:00
Your Name
dc1744a93f
refactor(gui): 重排 log_text 创建到搜索栏之前(为下一步抽搜索栏铺路)
2026-05-30 16:33:00 +08:00
Your Name
b686a4e3d5
refactor(gui): 抽 log_text 颜色配置到 components/log_text_colors (1878 → 1813)
2026-05-30 16:29:27 +08:00
Your Name
29cef2c578
refactor(gui): 抽 realtime_tab UI 创建到 components/realtime_tab (2037 → 1878)
2026-05-30 16:25:51 +08:00
Your Name
e784efd5f8
refactor(gui): 抽 filter_tab UI 创建到 components/filter_tab (2122 → 2037)
2026-05-30 16:18:29 +08:00
Your Name
6c7bbf0945
refactor(gui): 抽 run_tab UI 创建到 components/run_tab (2192 → 2122)
2026-05-30 16:15:24 +08:00
Your Name
fe27063913
refactor(gui): 抽 reservation_tab UI 创建到 components/reservation_tab (2334 → 2192)
2026-05-30 16:11:47 +08:00
Your Name
3f04bb23c2
refactor(gui): 抽 yanghao_tab UI 创建到 components/yanghao_tab (2456 → 2334)
2026-05-30 16:06:40 +08:00
Your Name
bcb0e363d1
refactor(gui): 抽 logging_tab UI 创建到 components/logging_tab (2656 → 2456)
2026-05-30 15:54:46 +08:00
Your Name
b447b6a6a4
refactor(gui): 抽 debug_tab UI 创建到 components/debug_tab (3052 → 2656)
2026-05-30 15:50:58 +08:00
Your Name
3ac8664817
docs(specs): 更新 gui_app 拆分最终成果(5476 → 3052, -44.3%)
2026-05-30 15:42:56 +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
Your Name
3d433080c2
docs(specs): 更新 gui_app 拆分最终成果(5476 → 3538, -35.4%)
2026-05-30 15:27:44 +08:00
Your Name
f6d382b0e7
refactor(gui): 抽 get_params 到 components/run_params_builder (3563 → 3538)
2026-05-30 15:26:17 +08:00
Your Name
2a05be2319
refactor(gui): 抽 save_logging_config 到 components/logging_config_io (3590 → 3563)
2026-05-30 15:22:29 +08:00
Your Name
f9839f3dee
docs(specs): 补充 gui_app 拆分实际成果(5476 → 3590, -34%)
2026-05-30 15:18:13 +08:00
Your Name
97935d9c48
refactor(gui): 抽 _generic_search_widget 到 components/text_search (3669 → 3590)
2026-05-30 15:16:42 +08:00
Your Name
64c210dd5a
refactor(gui): 抽 refresh_run_log 到 components/run_log_view (3715 → 3669)
2026-05-30 15:12:38 +08:00
Your Name
68d1224b53
refactor(gui): 抽 _on_scan_one_click + _handle_scan_result 到 components/wifi_adb_one_click_scan (3775 → 3715)
2026-05-30 15:08:35 +08:00
Your Name
92d524297b
refactor(gui): 抽预览 Tab 全部 8 个动作到 components/preview_view (3891 → 3775)
2026-05-30 15:03:45 +08:00
Your Name
59ebe8c1e7
refactor(gui): 抽 win_record Tab 全部 7 个动作到 components/win_record_view (4044 → 3891)
2026-05-30 14:53:11 +08:00
Your Name
a7ef92fc7c
refactor(gui): 抽 pump_logs 到 components/log_pump (4117 → 4044)
2026-05-30 14:37:03 +08:00
Your Name
c5df7a05d2
refactor(gui): 抽 update_ocr_results 到 components/ocr_results_view (4148 → 4117)
2026-05-30 14:30:42 +08:00
Your Name
b3380042b8
refactor(gui): 抽 _try_reconnect_last_wifi 到 components/wifi_adb_reconnect (4268 → 4148)
2026-05-30 14:24:19 +08:00
Your Name
4993fad004
refactor(gui): 抽 _open_scan_pick_dialog 到 components/wifi_adb_pick_dialog (4337 → 4268)
2026-05-30 14:18:19 +08:00
Your Name
44b091466d
refactor(gui): 抽 actions_log 视图相关到 components/actions_log_view (4463 → 4337)
2026-05-30 14:10:30 +08:00
Your Name
8ea676562c
refactor(gui): 抽 do_screenshot + OCR_REGIONS 到 components/screenshot_action (4635 → 4463)
2026-05-30 14:03:31 +08:00
Your Name
a07ef00b5e
refactor(gui): 抽 refresh_high_value_rooms 到 components/high_value_view (4656 → 4635)
2026-05-30 13:56:36 +08:00
Your Name
5329561b3a
refactor(gui): 抽 refresh_reservations 到 components/reservations_view (4913 → 4656)
2026-05-30 13:52:39 +08:00
Your Name
6bffcae2de
refactor(gui): 抽 open_wifi_adb_dialog 到 components/wifi_adb_dialog (5274 → 4913)
2026-05-30 13:48:22 +08:00
Your Name
ac464788e1
refactor(gui): 抽 open_scan_dialog 到 components/wifi_adb_scan_dialog (5476 → 5274)
2026-05-30 13:43:17 +08:00
Your Name
8dace383ec
docs(plans): 添加 gui/gui_app.py 拆分实施计划
2026-05-30 13:26:42 +08:00
Your Name
26f9e5a553
docs(specs): 添加 gui/gui_app.py 拆分设计文档
2026-05-30 13:24:07 +08:00
Codex and Claude Sonnet 4.5
bb90e2983f
fix(pil): 补充修复剩余 PIL Image 资源泄漏
...
覆盖 14 个文件中的 Image.open() 未正确关闭问题:
- fansclub_handler: 5 处(pic/pic_rgb/img 未 close)
- image_ops: 2 处(crop 后 pic 未 close)
- douyin_popups: 2 处(pic.convert 重赋值泄漏原始句柄)
- douyin_fudai: 1 处(open().convert() 链式调用泄漏)
- douyin_robot: 2 处(同上)
- save_files/direct_attend/finder/stage/find_open/detail/_common/ocr_preprocess: 各 1-2 处
统一修复模式:分离 open 与 convert,try/finally 确保原始句柄关闭。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 22:49:50 +08:00
Codex and Claude Sonnet 4.5
c3746b0207
fix(pil): 修复 PIL Image 资源泄漏
...
Image.open() 后未 close() 导致文件句柄泄漏,用 _raw + try/finally 模式修复。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 22:42:22 +08:00
Codex and Claude Sonnet 4.5
b1fa6af9ce
fix(gui): 修复启动后 GUI 卡死约 1.2 秒
...
delayed_refresh_preview 在 mainloop 启动 300ms 后同步加载大图(PIL
Image.open + load + convert),阻塞主线程。改为:
1. 延迟到 3 秒后再触发预览(GUI 已完全初始化)
2. 图片加载放到后台线程,完成后通过 root.after 回主线程更新
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 21:58:50 +08:00
Codex and Claude Sonnet 4.5
96fdc96f24
refactor(cleanup): 移除剩余死代码模块
...
- 删除 douyin/utils/douyin_text_utils.py 及其测试
- 移除 performance_tracker.py 中未使用的 track_function 方法
- 移除 param_usage_tracer.py 中未使用的 stop_tracing / is_enabled
- 清理 bin/run_cli.py 和 tests/test_imports.py 中的残留引用
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 21:58:41 +08:00
Codex and Claude Sonnet 4.5
c4544489ac
refactor(coords): 提取点击坐标常量,消除硬编码
...
在 coords.py 添加 DETAIL_OUTSIDE_CLICK、PARTICIPATE_BTN_CLICK、
FANSCLUB_JOIN_CLICK、FANSCLUB_JOIN_FALLBACK_CLICK 常量,
替换 fudai_attend/fansclub_handler/join_decision 中的硬编码坐标。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 21:20:17 +08:00
Codex and Claude Sonnet 4.5
d19d5bfc56
refactor(cleanup): 移除 logging 模块死代码
...
- unified_logger.py: 删除 5 个从未使用的装饰器/函数
- internal_loggers.py: 删除 3 个未使用方法和工厂函数
- action_logger.py: 删除 3 个未使用方法
- log_formatter.py: 删除 6 个未使用格式化函数(保留 GUI 依赖的 4 个)
- 同步更新 __init__.py 和测试文件
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 21:04:35 +08:00
Codex and Claude Sonnet 4.5
703da834fb
fix(security): 修复 shell 注入风险和类型转换未捕获问题
...
- path_config.py: find_executable Unix 回退路径使用 shlex.quote 防注入
- underlying_operations.py: try_set_ime IME ID 使用 shlex.quote 防注入
- screenshot_direct.py: 环境变量 float/int 转换添加 try/except 容错
- device_select.py: 用户输入 int() 转换添加 try/except 容错
- read_once.py / image_acquirer.py / detail_verifier.py: PIL Image 添加 close()
- detector.py: 移除 return 后不可达死代码
- optimized_entry.py: 统一返回值类型 int,失败时返回 0
- read_once.py: 移除 try/except 中重复的相同代码
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 20:50:26 +08:00
Codex and Claude Sonnet 4.5
4908df19d4
refactor(cleanup): 移除死代码和冗余导入
...
- douyin_fudai_core.py: 移除未使用的 ThreadPoolExecutor/check_contain 导入
和被覆盖的 fudai_result_checker 导入
- ocr_executor.py: 移除重复的 _fudai_ocr_executor_state 初始化
- flow_control_pkg: 移除 stage_handler/no_fudai/find_open 中未使用的导入
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 20:27:41 +08:00
Codex and Claude Sonnet 4.5
ca00258bf3
fix(code-quality): 修复 NameError 风险和死代码清理
...
- detect_by_template.py: 添加缺失的 os 和 path_config 导入
- join_decision.py: 添加缺失的 is_watch_task_fudai 导入
- read_once.py: 添加缺失的 Optional 类型导入
- fudai_detail_validator.py: 使用 extract_2digits 做更健壮的数字解析
- screenshot_manager: 移除未使用的导入和死代码
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 20:22:52 +08:00
Codex and Claude Sonnet 4.5
e62314fa25
fix(import): 修复 fudai_attend 相对导入路径错误
...
join_decision.py 在 fudai_filter_pkg 子包内,用 .fudai_attend 会查找
fudai_filter_pkg.fudai_attend(不存在),实际模块在上层 core 包。
改为 ..fudai_attend。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 19:26:58 +08:00
Codex and Claude Sonnet 4.5
df69c6ab67
fix(countdown): 修复长倒计时被截断到15分钟的bug
...
check_countdown 中 >900s 的上限过于激进,将实际的58分钟福袋截断到14:50。
改为 >3600s(1小时)上限,兼容抖音的60分钟福袋。
同时修复 _extract_digits 取后N位的问题,改为取前N位,
避免当子图意外捕获额外数字时(如 "1458")被误提取为 "58"。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 19:22:20 +08:00
Codex and Claude Sonnet 4.5
a50f08de5a
fix(fudai): 验证失败时按钮可操作则继续参与
...
验证失败(如内容识别被禁用导致内容为空)时,若按钮状态为
"可以参与"/"需要加入粉丝团"等可操作状态,继续走参与流程而非
直接返回,避免漏参与有效福袋。同时修正 basic_join_decision 调用签名。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 19:03:51 +08:00
Codex and Claude Sonnet 4.5
8fd38dd30b
fix(fudai): validator 内容检查正确尊重 disable 配置
...
当 config.json 中 fudai_disable_content_recognition=true 时,
跳过内容为空的检查。原实现在 except 块中丢失 disable_content
状态,导致配置生效时仍误判内容为空为验证失败。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 19:00:32 +08:00
Codex and Claude Sonnet 4.5
d850af2c44
fix(fudai): 验证器不再因内容为空而拒绝有效福袋
...
当奖品价值>0且倒计时合理时,内容为空是正常的(部分福袋无文字
内容),不应判定验证失败导致跳过参与。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 18:39:13 +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
Codex
f750969df3
fix(deps): pin protobuf==3.20.3 修复 PaddleOCR 初始化失败回退到慢速 EasyOCR
2026-05-23 17:43:01 +08:00
Codex
842dd254e3
fix: correct import path for check_detail_height in detect_fudai_detail_page
...
The relative import from .douyin_detection was looking in the
douyin/detection/pixel/ package, but douyin_detection.py lives
at douyin/detection/douyin_detection.py. This caused every fudai
detail page detection to fail with detection_exception, making the
system always treat successful detail page opens as misclicks.
2026-05-23 17:05:43 +08:00
Codex and Claude Sonnet 4.5
6f38907119
fix(fudai/reservation): 修 3 处拆模块遗留 NameError
...
- douyin_fudai_core.py: get_fudai_contain 引用 TASK_LIST / PARTICIPATE_BUTTON
但只导入了 LIVE_ROOM_TITLE,运行时必触发 NameError
- douyin_reservation_verify.py: match_reservation 末尾日志引用
current_title,但该变量仅在 if expected_title 块内赋值,
expected_title 为空时 NameError(被 try/except 吞掉但丢失日志)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 13:28:54 +08:00
Codex and Claude Sonnet 4.5
470c68a252
fix(fudai/stage): 修 reservation_check_start NameError + ocr_detection 缩进 + stage 默认值
...
- douyin_fudai.py: 补回 reservation_check_start 初始化(ffd048f 拆 helper 时丢失)
- ocr_detection.py: 修 _confirm_live_list 中 OCR 变量在 if 块外赋值的缩进 bug
- ocr_detection.py: shopping_redpacket_ocr_confidence_threshold 改 getattr 兜底 0.35
- douyin_stage.py: enable_ocr_mode1 默认值 False→True;像素检测未命中补 return
- config.json: 同步 enable_ocr_mode1 默认值
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-05-23 11:22:03 +08:00
Codex and Claude Opus 4.7
fe97e82104
fix(gui): 实时查看器/状态 Tab 的耗时解析支持 ms 单位
...
问题:实际 actions.log 写的是 `耗时=10.00ms`(毫秒),但 _parse_minimal
和 parse_action_duration 的正则只匹配 `s`,导致:
- 实时查看弹窗永远显示"暂无动作"
- 实时状态 Tab 同样空白
同时存在的副 bug:兜底正则在整行匹配,前缀里的 `192.168.5.2:5555` /
日志时间戳 `2026-05-21` 都可能被误识别成耗时。
修复:
- 解析窗口限定到 line.find("耗时") 之后的子串 (tail)
- 优先匹配 ms(顺序很重要:\s*s 会先吃掉 "10ms" 的 m)
- s 单位加 (?![a-zA-Z]) 负向后顾,避免匹配 "ms" / "second" 之类
- 同步修复 gui_app.py:3685 的 parse_action_duration(实时状态 Tab)
测试:
- _parse_minimal 加 4 个新测试覆盖 ms / 整数 ms / 优先级 / 前缀干扰
- 全量 1426 passed (+5)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 09:08:58 +08:00
Codex and Claude Opus 4.7
9f330572cc
test(gui): 加 gui_app.main() 启动冒烟测试
...
背景:d759921 抽 _open_realtime_viewer_impl 时误删 16 行搜索工具栏定义,
gui_app 启动时报 NameError,但 pytest 1421 passed 没抓住——def main()
里的 NameError 只有真正调用 main() 才触发,单纯 import 不会执行函数体。
新测试通过 patch tk.Misc.mainloop 让 GUI 创建完所有控件后立刻 quit,
覆盖 def main() 内部所有顶层语句,能抓住 NameError / AttributeError /
ImportError 这类启动期失败。
已验证:临时 revert ca6c2e4 后该测试 FAIL(精确指向 L3994 NameError),
恢复 ca6c2e4 后 PASS。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 08:59:30 +08:00
Codex and Claude Opus 4.7
4277bf7fa4
fix(gui): WiFi 扫描显示 adb 真实返回,state=failed 不再误导为"请授权"
...
问题:扫描提示 "192.168.5.2:5555 当前状态=failed,请先在手机上授权后重试",
但 failed 表示 adb connect 既不成功也不是 unauthorized(通常是 adb 服务异常 /
设备短暂不可达),不是授权问题。手机不会弹窗,用户照提示去手机上找授权窗
口,永远不会成功。
修复:
- _handle_scan_result: 区分 failed 分支,逐项打印 adb 真实返回(去掉换行
方便单行显示),并提示用户排查 adb 服务而非"请授权"。
- _open_scan_pick_dialog: 表格新增 "adb 返回" 列(截断 200 字符);
Toplevel 拓宽到 680x320 容纳新列。
- use_selected: 根据 state 给出针对性提示——unauthorized 让用户授权,
failed 显示对应 message,其他状态保持通用提示。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 08:55:15 +08:00
Codex and Claude Opus 4.7
ca6c2e4d20
fix(gui): 恢复运行日志 Tab 搜索工具栏定义
...
d759921 抽 _open_realtime_viewer_impl 时误删了紧随其后的 16 行
"搜索工具栏"块(log_search_frame / log_filter_var / log_search_var /
log_search_entry),导致 gui_app 启动时在 L3964 报
NameError: name 'log_search_entry' is not defined。
恢复这 16 行到原位置,gui_app 可正常启动。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 08:37:30 +08:00
Codex and Claude Opus 4.7
7884132743
test(pkg): 补充 _pkg 子模块单元测试
...
覆盖 screenshot_manager.save_files / reservation_logic._common /
logging_wrapper_pkg._common 共 14 个测试。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 07:05:23 +08:00
Codex and Claude Opus 4.7
9fbfcb5ed2
chore(gitignore): 忽略 output/ 测试与诊断产物
...
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 07:05:11 +08:00
Codex and Claude Opus 4.7
87bac9e548
chore(config): 补充新增功能默认配置
...
新增 GUI realtime_status / swipe_down_back / log_unified 默认值,
与代码中 cfg.get(..., default) 兜底保持一致。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 07:04:59 +08:00
Codex and Claude Opus 4.7
d759921442
refactor(gui): 抽 _open_realtime_viewer_impl 到 components/realtime_viewer (5539 → 5370)
...
gui_app.py 嵌套函数 _open_realtime_viewer_impl 是 170 行的"实时查看"对话框:
弹 Toplevel 显示当前 pic/screenshot.png + 列表展示 actions.log 中含"耗时"的
最近 80 行,每秒刷新。
抽到 gui/components/realtime_viewer.py:
- open_realtime_viewer(root) 主入口
- _tail_read(path, max_bytes) 末尾字节读取
- _parse_minimal(line) 提取 (动作名, 耗时) 二元组
- 全局单例 _active_win 替代原嵌套 def 的属性式 _win
gui_app.py 中嵌套 def 缩成 4 行委托。
新增 13 个单元测试覆盖 _tail_read 4 种情况 + _parse_minimal 8 种格式。
1421 passed (+13)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:47:58 +08:00
Codex and Claude Opus 4.7
be1eb6eda7
refactor(web_gui): 抽 ProcRunner._update_stats_from_line 解析逻辑到 stats_log_parser (2429 → 1806)
...
ProcRunner._update_stats_from_line 是 624 行的"日志行 → 计数器更新"方法,与
gui_core.Runner 同名方法行为接近但有差异:
- web_gui 解析 traceId / MDC 信息(gui_core 没有)
- web_gui 没有 _lock / _last_log_ts 字段(不需要锁保护)
- web_gui 没有 unique_keys_* / *_room_pos 这些去重数据结构
- web_gui 有"进入直播间到识别福袋耗时"事件解析
抽到独立的 gui/web_gui_pkg/stats_log_parser.py(不与 gui_core_pkg 版本共享,
避免在两边各加缺失字段,行为差异显式保留在两个文件中):
- update_stats_from_line(runner, line) 主入口
- 16 个 _parse_* 子函数(含 traceId/MDC、enter_to_fudai_seen 等 web_gui 专属段)
ProcRunner._update_stats_from_line 从 624 行变成 4 行委托。
1408 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:41:52 +08:00
Codex and Claude Opus 4.7
3b8f85b9cb
refactor(gui_core): 抽 _update_stats_from_line 解析逻辑到 stats_log_parser (1207 → 541)
...
Runner._update_stats_from_line 是 666 行的"日志行 → 计数器更新"巨型方法。
按业务事件分类 14 个独立段(福袋字段 / 打开-参与计数器 / 跳过原因 /
错误统计 / 粉丝团 / 预约 / 开奖结果 / 直播间切换 / 阶段诊断 / OCR / 性能 /
详情识别 / 福袋查找 / 回退操作)。
抽到 gui/gui_core_pkg/stats_log_parser.py:
- update_stats_from_line(runner, line) 主入口
- 14 个 _parse_* 子函数按事件分组
- 通过 runner.* 调用保持与原 Runner 方法/状态一致
Runner._update_stats_from_line 从 666 行变成 4 行委托。模块级测试更易于
单独覆盖各分类的解析逻辑。
1408 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:35:04 +08:00
Codex and Claude Opus 4.7
fb35670032
refactor(gui): 抽 ThreadSafeLogWriter 到 components/log_writer (5649 → 5537)
...
gui_app.py 的 ThreadSafeLogWriter 类(109 行)是自包含的日志文件写入器:
threading.Lock 保护、按日期分割、配置开关、PermissionError/Exception 兜底。
抽到 gui/components/log_writer.py,原 gui_app 中的 109 行类定义 + 1 行实例化
替换为 3 行导入 + 实例化。read_config 通过 staticmethod _read_config 延迟导入,
避免循环依赖。
新增 15 个单元测试覆盖:
- __init__:默认 log_dir / 配置开关 / dated_logs / 相对路径解析 / 配置异常兜底
- write:正常写 / 禁用跳过 / 空行跳过 / 时间戳前缀 / 已格式化行原样写
- 100 线程 × 10 行的并发安全测试(确认 1000 行无丢失)
- PermissionError / 通用异常下不抛 + warn 一次
1408 passed (+15)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:29:25 +08:00
Codex and Claude Opus 4.7
230c0d4049
refactor(gui): 抽 refresh_stats 字符串格式化到 stats_formatter (6339 → 5634)
...
gui_app.py 的 refresh_stats 闭包是 705 行纯字符串构建:把 runner.get_stats()
的字典格式化成多个分段(基本信息/快速汇总/核心统计/跳过/OCR/详情/福袋查找/
性能/粉丝团/切换/预约/错误/价值/最近福袋/中奖记录)。
抽到 gui/components/stats_formatter.py:
- format_stats(stats: Dict) -> List[str] 主入口
- 14 个 _append_* 子段构建器(每段一个,按需追加)
- _section_lines(title, body) 标题包装
闭包改为 16 行委托:调 format_stats + 写入 ScrolledText。
新增 32 个单元测试覆盖:
- 空 dict / 缺字段时的兜底
- 基本运行状态(uptime / pid / exit_code 各种格式)
- 各分段的"有数据 / 无数据"条件
- 关键率计算(打开成功率/点击率/参与成功率/中奖率/跳过率/错误频率)
- 边界情况(attend_ok > clicks 检测到已参与,结果未开奖警告,wins 截断到 10 条)
1393 passed (+32)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:23:53 +08:00
Codex and Claude Opus 4.7
a864f6e23a
refactor(fudai): 抽 __init__ 配置默认值到 init_helpers (1559 → 1323)
...
fudai_analyse.__init__ L119-354 是 236 行配置字段默认值 + 运行时状态初始化:
- ~80 个 self.X = <default_value> 配置字段
- 30+ 个运行时状态字段
- _reservations_state_path 解析 + room_pos_map 旧文件清理
抽到 douyin/core/fudai_modules/init_helpers.py:
- apply_fudai_defaults(self): 主入口
- _apply_yanghao_defaults(self): 推荐页养号子段
- _resolve_reservations_state_path(self): 解析路径,path_config 失败时
兜底用 ".." 回退(不再用 dirname(__file__) + "state")
- _cleanup_old_room_pos_map_files(self): 清理上次运行的 JSON/CSV/MD 导出
__init__ 中保留:
- L57-117 设备/分辨率/operation/日志系统初始化(依赖较深,难抽)
- L356-357 self.load_config()
行为完全保留:所有字段值、解析顺序、异常兜底全部不变。
test_runtime_path_anchors.test_reservations_state_path_uses_path_config 已更新
为同时检查 douyin_fudai.py 和 init_helpers.py。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:13:46 +08:00
Codex and Claude Opus 4.7
3a9f01ad74
refactor(fudai_modules): 抽 swipe 兜底重复逻辑到 fudai_device_control (1238 → 1147)
...
handle_detail_helpers.py 中 _handle_error_status 内联段(L266-318,53 行)
和 _fallback_swipe_up 顶层函数(L1187-1239,53 行)做的是完全一样的事:
没有 swipe_up_to_next_live 时直接 ADB shell input swipe,失败再回退到
operation.swipe。重复 1:1。
新增 douyin/core/fudai_modules/fudai_device_control.py:
- fallback_swipe_up_via_adb(self): 纯 ADB 兜底 swipe
- swipe_up_or_fallback(self): 优先 swipe_up_to_next_live,否则 fallback
handle_detail_helpers 两处都改成 4 行委托。原文件去掉 os/subprocess
import,仅保留 time。
行为完全保留:分辨率换算公式、ADB 路径解析、subprocess 超时 5s、operation.swipe
最终兜底全部不变。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:07:41 +08:00
Codex and Claude Opus 4.7
8ecd2783db
refactor(reservation): 抽 _write_state 闭包到顶层 _write_reservations_state
...
_run_reservation_attend_window 内嵌的 _write_state 闭包是 75 行 JSON 状态文件
写盘逻辑(含 1s 节流),独立性强,纯写文件无副作用。
抽到顶层 _write_reservations_state(self) helper,原闭包改为单行委托。
内部用到的 import json/os/datetime 移到 helper 内部,主函数顶部去掉。
行为完全保留:
- 1s 节流(避免高频写盘)
- 缺路径时 makedirs
- 异常时通过 self._log_kv 记录 + 不抛
文件总行数 1492 → 1495(+3):闭包变成委托后总行数略增 3,但消除了
1 层嵌套,给后续测试 _write_reservations_state 留出空间(可独立测试)。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 03:03:19 +08:00
Codex and Claude Opus 4.7
e737002b1e
refactor(stage): 抽 "不在直播间" OCR 检测分支到 ocr_detection (1245 → 807)
...
diagnose_stage_from_current_screen L336-774 是 438 行 "if not in_live_room:"
分支:
- 步骤 2.5:购物红包 OCR 复查(像素命中红包背景时再用 OCR 二次确认)
- 步骤 3:OCR 推荐页/关注列表/直播列表标签栏(含两次精确确认子流程)
抽到 douyin_stage_handler_pkg/ocr_detection.py:
- detect_pages_via_ocr(...) 入口,内部化 in_live_room 检查
- _check_redpacket_ocr_when_not_in_live_room 步骤 2.5
- _confirm_follow_list 关注列表精确截图 + OCR 模式 0/1
- _confirm_live_list 直播列表精确截图 + OCR 模式 0/1
返回 Optional[Tuple[str, str]]:
- ("RECOMMEND_PAGE"/"FOLLOW_LIST"/"LIVE_LIST"/"SHOPPING_REDPACKET_POPUP"
/"IN_LIVE_ROOM", reason) → caller 立即 return
- None → in_live_room=True,caller 继续后续逻辑
主函数对应位置替换为 17 行委托,_log/_log_summary/_log_separator 通过
参数传入,保持日志格式完全一致。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:59:02 +08:00
Codex and Claude Opus 4.7
df273ab231
refactor(stage): 抽 OCR 弹窗确认段到 popup_verification (1385 → 1230)
...
diagnose_stage_from_current_screen L1203-1358 是 156 行"未命中任何阶段
但像素检测到弹窗背景"段,用 OCR 二次确认避免直播间背景色误判:
- 优惠券弹窗:OCR "参与按钮" 区域找"开心收下"(支持模式 0+1 并行)
- 购物红包弹窗:OCR "診斷購物紅包" 区域找"购物红包/邀你抢/抢红包"
抽到 douyin_stage_handler_pkg/popup_verification.py:
- verify_popup_via_ocr(...) 入口,返回 Optional[Tuple[str, str]]
- ("COUPON_POPUP", reason) / ("SHOPPING_REDPACKET_POPUP", reason)
→ caller 立即 return 该元组
- None → 没有可疑弹窗或 OCR 确认失败,caller 继续后续逻辑
主函数对应位置替换为 17 行委托,保留原 _log / _log_summary 嵌套闭包通过参数传入,
保持日志格式完全一致。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:54:00 +08:00
Codex and Claude Opus 4.7
d60b83af68
refactor(reservation): 抽回退校验+二次回退到 attend_window_verify (1437 → 898)
...
attend_window.process_reservation_attend_window 中 L754-1293 是 540 行
"if ok:"分支:回退操作成功后等待直播间加载 → 调
douyin_reservation_verify.validate_back_to_reservation 校验 → 校验失败时
通过映射表重定位 + 二次回退。
抽到 reservation_logic/attend_window_verify.py:
- handle_back_verify(...) 入口,返回 Optional[bool]
- True/False → 主函数应立即返回该值
- None → 校验通过/禁用/异常,主函数继续设置锁定期
- _handle_verify_failure: 校验失败的处理流程
- _remap_target_via_room_titles: 映射表重定位(target + 当前直播间位置)
- _retry_seek_with_mapped_diff: 根据 mapped_pos_diff 决定是否二次回退
- diff=0 + room_pos_before_map 不一致 → 设置 _seek_direction_hint 重试
- diff=0 + 一致 → 跳过二次回退
主函数对应位置替换为 14 行委托。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:49:37 +08:00
Codex and Claude Opus 4.7
e46497ea80
refactor(underlying): 抽 cut_pic 图片裁剪到 image_ops (1574 → 1327)
...
underlying_operations.cut_pic L474-721 是 248 行图片裁剪管道:
- 默认/命名两个分支共享重试 3 次的截图加载验证
- 默认分支裁出 cut.png 或 ocr/<name>.png;命名分支裁出 pic/<target>/<name>.png
- 写入 _ocr_coords_cache 供 analyse_pic_word 调试图像引用
- SAVE_CUT_PIC_DEBUG_IMAGES=1 时保存 cut_pic 调试图
抽到 underlying_operations_pkg/image_ops.py:
- cut_pic(self, left_up, right_down, target, name) -> bool
- _ensure_parent_dir / _validate_coords / _save_cut_debug_images 内部 helper
主类方法替换为 4 行委托。
更新两个旧的源码断言测试以适配抽离:
- test_cut_pic_path:从 inspect.getsource(op.cut_pic) 改为读 image_ops.py 文件源码
- test_runtime_path_anchors:把 path_config.get_pic_dir() 检查范围从单一文件
扩展到 underlying_operations.py + image_ops.py + ocr_pipeline.py 三处
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:43:36 +08:00
Codex and Claude Opus 4.7
8457219241
refactor(underlying): 抽 analyse_pic_word OCR 管道到 ocr_pipeline (1939 → 1560)
...
underlying_operations.analyse_pic_word L723-1102 是 380 行 OCR 主管道:
路径解析 + 字节缓存 + PIL 加载 + change_color 预处理 + 调试图像保存
+ EasyOCR/PaddleOCR 调用 + 置信度提取 + 缓存写回 + 成功识别落盘。
抽到 underlying_operations_pkg/ocr_pipeline.py:
- analyse_pic_word(self, picname, change_color, pic_path, return_confidence)
- _save_debug_preprocessed: 预处理后的调试图保存(仅 SAVE_OCR_DEBUG_IMAGES=1)
- _save_debug_after_ocr: 含 OCR 文本预览 + 置信度的 after_ocr 调试图
- _save_success_pic: 成功识别落盘到 ocr/<category>/<picname>_success.png
主类方法替换为 4 行委托。原行为完全保留:缓存 / 二值化 / EasyOCR vs Paddle
predict/ocr 兜底 / [None] 短路 / 异常返回空 / picname 失败诊断日志。
新增 16 个单元测试覆盖:
- 早出 4 种(pic_path 空/不存在/带 confidence/OCR 未初始化)
- OCR 调用路径(EasyOCR / Paddle predict / Paddle ocr 兜底 / [None] 短路 / 异常)
- 缓存命中跳过 OCR / 缓存未命中写回
- change_color 0/1/2 三种模式
- return_confidence True/False 返回类型
- autouse fixture 清 OCR 模块级缓存防止测试污染
1361 passed (+16)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:36:47 +08:00
Codex and Claude Opus 4.7
b200002a00
refactor(finder): 抽 OpenCV 模板匹配兜底到 finder_template_match (635 → 417)
...
check_have_fudai_with_ready_screenshot L288-513 是像素检测都失败时的最后
兜底(226 行):cv2.matchTemplate(TM_CCOEFF_NORMED) + minMaxLoc 在
156..269 × 351..451 搜索区域里找 fudai.png 模板。
抽到 douyin/detection/detection_pkg/finder_template_match.py:
- match_template(analyser, pic_new, rx, ry, y_pianyi_val, loop) → (det, x)
- _resolve_template_path 从 path_config / 项目根 assets 解析模板路径
(兜底走 .. 回退,避免推到 detection_pkg/assets)
- _save_search_roi 提取 last_match.png 的保存逻辑
主 finder.py 替换为 7 行委托,从 635 → 417 行。
新增 9 个单元测试覆盖:
- _resolve_template_path:用 path_config / 兜底
- 早出条件:模板路径不存在 / cv2.imread 返回 None / 搜索区域无效
- 命中:max_val>=threshold 时 detected_x 是 1080 基准
- 不命中:max_val<threshold 时返回 False
- 模板太大:cv2.resize 被调用
- cv2 不可用时安全返回 False
1345 passed (+9)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:26:49 +08:00
Codex and Claude Opus 4.7
ab846dae0f
refactor(finder): 抽逐像素兜底扫描到 finder_pixel_scan (817 → 635)
...
check_have_fudai_with_ready_screenshot L279-461 是 numpy 失败时的逐像素
兜底(183 行):optimal_x 从历史 / 默认热区中心选起 → 检查 5 个 y 偏移
(0/±1/±2)→ 每行从 optimal 向两侧交替搜索 → 最后从左到右兜底。
抽到 douyin/detection/detection_pkg/finder_pixel_scan.py:
- scan_pixel_by_pixel(analyser, pic_new, rx, ry, y_pianyi_val) → (detected, x)
- _is_target_pixel / _safe_check_pixel / _pick_optimal_x / _search_along_y
4 个独立纯函数,每个职责单一
颜色范围常量与 finder_numpy_scan 对齐(_R_MIN/_MAX 等)。
主 finder.py 替换为 8 行委托。
新增 15 个单元测试覆盖:
- _is_target_pixel 边界 / _safe_check_pixel 异常兜底
- _pick_optimal_x 历史命中/越界/无历史 3 种路径
- scan_pixel_by_pixel 主路径成功 / y 偏移 / 越界失败 / pic 异常兜底
1336 passed (+15)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:20:25 +08:00
Codex and Claude Opus 4.7
07cdd662c2
refactor(finder): 抽 numpy 加速扫描段到 finder_numpy_scan (937 → 811)
...
check_have_fudai_with_ready_screenshot L271-397 是"numpy 加速水平带扫描"
逻辑(126 行):ROI 裁剪 → RGB 颜色掩码 → 列聚合 → 从最优起始列向两侧
交替搜索第一个匹配列 → 写回 last_fudai_x。
抽到 douyin/detection/detection_pkg/finder_numpy_scan.py:
- scan_with_numpy(analyser, pic_new, rx, ry, y_pianyi_val, optimal_x_scaled)
→ (detected, detected_x)
- numpy ImportError / 异常时返回 (False, None),让 caller 走逐像素兜底
主 finder.py 替换为 7 行委托。
新增 8 个单元测试(用真实 PIL.Image + numpy 构造小图):
- 空图返回 False
- 整图目标色命中 + last_fudai_x 写回
- 仅在某段列有目标色,命中位置在该段
- y_pianyi_val 偏移正确传递到扫描带
- ROI 越界返回 False
- optimal_x_scaled 在命中区时优先返回该位置
1321 passed (+8)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:15:43 +08:00
Codex and Claude Opus 4.7
1514122981
chore(finder): 删 check_have_fudai_with_ready_screenshot 末尾 501 行死代码 (1438 → 937)
...
L938-1438 全部位于 L936 `return False` 之后,永远不会执行:
- 旧版重复参数初始化(retry_delay_s / max_wait_s 等)
- 已被弃用的模板匹配兜底代码块
- 末尾的"以下为旧的像素检测代码"注释块
文件大小直接砍 35%,无任何行为变化。
1313 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:09:36 +08:00
Codex and Claude Opus 4.7
f718dfe2e4
refactor(fudai_attend): 抽 1057 行粉丝团门槛分支到 fansclub_handler (1629 → 573)
...
attend_choujiang 中"加入粉丝团/粉丝团"按钮分支占 1057 行,含一个 751 行的
内嵌闭包 _recover_to_fudai_detail_after_fansclub 处理"加入页"恢复。该分支
是文件中最大的单一逻辑块,独立性高(没有共享主流程的局部变量,全靠 analyser
属性传递状态)。
新建 fudai_attend_pkg/fansclub_handler.py(1070 行)作为整段抽出后的目的地。
导出顶层函数 handle_fansclub_branch(analyser, attend_button_text) -> bool。
attend_choujiang 中原 elif 块替换为 4 行委托:
elif attend_button_text and (
"加入粉丝团" in attend_button_text or "粉丝团" in attend_button_text
):
return handle_fansclub_branch(analyser, attend_button_text)
行为完全保留:
- 设置 analyser.last_attend_fail_reason = "fansclub_required"
- 第一步点参与按钮 (543, 2070)
- 第二步 OCR 找加入粉丝团按钮 + bbox 中心点击(fallback 区域中心)
- 第三步关闭详情页 (500, 470)
- 第四步根据 auto_join_fansclub 等待
- 第五步 _recover_to_fudai_detail_after_fansclub 在加入页再点击 + 返回直播间
新增 9 个单元测试覆盖:
- 总返回 True
- 设置 fail_reason = "fansclub_required"
- 必经的两次坐标点击 (543,2070) / (500,470)
- 截图缺失/OCR 抛异常时的兜底
- auto_join 启用/禁用分支
1313 passed (+9)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 02:05:38 +08:00
Codex and Claude Opus 4.7
2f0eb90d98
refactor(fudai_core): 抽 6 个 fallback OCR 闭包到 OcrTaskRunnerFallback (1350 → 1194)
...
主并行 OCR 失败时走的备用路径里有 6 个 ocr_*_fallback 闭包,结构与
OcrTaskRunner 类似但更简单(不计耗时、countdown 不做数字提取、日志
tag 改为"备用OCR..."),共 156 行。
复用 ocr_tasks.py 模块新增 OcrTaskRunnerFallback 类,与 OcrTaskRunner
共享 _safe_preprocess / _BUTTON_KEYWORDS / _read_disable_flag。
主流程 6 个闭包定义换成 14 行 runner 实例化 + 方法绑定。
新增 10 个单元测试覆盖 Fallback 的所有方法(disable 跳过 / 异常 /
countdown 不提取数字 / button 关键词短路 + retry)。
1304 passed (+10)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:58:13 +08:00
Codex and Claude Opus 4.7
f38b373636
refactor(fudai_core): 抽 7 个并行 OCR 闭包到 ocr_tasks 模块 (1659 → 1328)
...
get_fudai_contain L222-553 有 7 个 ocr_* 闭包:task_list / content /
countdown_mm / countdown_ss / value / button / live_room_title。每个都遵循
同样的模板(计时 + analyse_pic_word/digits + perf 字典 + 异常日志),共 330 行。
抽到 douyin_fudai_core_pkg/ocr_tasks.py 的 OcrTaskRunner 类:
- 7 个方法对应 7 个并行任务
- 共享耗时 dict + lock 在构造器传入
- _record_duration / _log_warn 提取出共有的 finally + except 模板
- _BUTTON_KEYWORDS 关键词常量化(原本是闭包里硬编码 tuple)
- _safe_preprocess 顶层 helper
主流程从 7 个闭包定义 + 配置开关重复读取(330 行)变成 22 行 runner 实例化 +
方法绑定,并保留 ocr_task_list / ocr_content / ... 名字给后续 executor.submit
当作 Callable 传入,行为完全不变。
新增 22 个单元测试覆盖:
- _safe_preprocess 兜底
- 7 个方法的成功 / disable 跳过 / 异常 / 边界
- ocr_button 关键词短路 + 重试逻辑
- 所有方法都正确记录耗时到 perf_durations
1294 passed (+22)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:52:22 +08:00
Codex and Claude Opus 4.7
457edcfdc8
refactor(fudai_core): 合并 4 个 renwu 分支截图准备到 cut_regions (1825 → 1651)
...
get_fudai_contain L160-334 按 renwu (1/2/3/其他) 重复 4 次相似的 175 行
分支,每个分支都做"内容/倒计时(切两段)/价值"4 次 cut_pic + 可选调试截图,
唯一差异只是 countdown_box 常量。
抽到 douyin_fudai_core_pkg/cut_regions.py:
- _select_countdown_box(renwu) 选坐标
- cut_detail_regions(analyser, renwu, save_debug_images) 统一切割
原 175 行 4 个重复分支替换为 8 行调用,净减 167 行。
新增 12 个单元测试覆盖:
- _select_countdown_box 4 种 renwu
- cut_detail_regions 调 cut_pic 4 次 / 名称顺序 / 30%-30% 分割比例
- save_debug_images 开关效果
1272 passed (+12)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:47:36 +08:00
Codex and Claude Opus 4.7
03b471513d
refactor(fudai_core): 抽 _run_heavy_ocr 闭包到 heavy_ocr 模块 (1953 → 1822)
...
_run_heavy_ocr 是 get_fudai_contain 中的 142 行闭包,按需对 6 个字段
(task_list / content / countdown_mm / countdown_ss / value / button)
跑较重的 OCR 模型补齐轻量 OCR 漏掉的字段。
抽到 douyin_fudai_core_pkg/heavy_ocr.py:
- run_heavy_ocr(analyser, fields) 顶层主函数
- _read_disable_flag(analyser, attr, cfg_key) 提取重复的 attr→config.json
fallback 配置开关读取(原闭包里 task_list 和 content 各重复一次)
- _ocr_digits_with_fallback(analyser, picname) 提取 mm/ss 分支共有的
digits→word 兜底数字提取逻辑
原闭包改为 4 行委托。配置开关、日志和异常兜底行为完全一致。
新增 18 个单元测试覆盖:
- _read_disable_flag 4 种状态(attr 优先 / config 兜底 / 都缺 / 文件不存在)
- _ocr_digits_with_fallback 5 个分支
- run_heavy_ocr 9 个字段组合 + disable 跳过路径
1260 passed (+18)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:39:24 +08:00
Codex and Claude Opus 4.7
2707773b15
refactor(fudai_core): 抽 _read_countdown_split 闭包到 countdown_split 模块 (2124 → 1953)
...
douyin_fudai_core.py 的 get_fudai_contain 函数体只有 1 个,但里面嵌了
多个闭包做 OCR 子任务。最大的 _read_countdown_split (172 行) 把倒计时
区域分割成"分钟"+"秒"两段分别识别再组合 mm:ss。
抽到 douyin_fudai_core_pkg/countdown_split.py 的 read_countdown_split
顶层函数(203 行,含独立的 _extract_digits 纯函数)。原闭包改为薄壳委托,
保留 box 默认绑定 analyser/save_debug_images 闭包变量的语义。
新增 16 个单元测试覆盖:
- _extract_digits 纯函数(前导零 / 非数字 / 边界)
- read_countdown_split 主路径 + OCR 失败 + 秒>=60 警告 + 切图失败
- 切割比例(30% / 30%)正确性
- save_debug_images 开关效果
1242 passed (+16)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:30:35 +08:00
Codex and Claude Opus 4.7
07eee6da52
fix(paths): 修同类型 5 处路径推导 bug + 加回归测试
...
cut_pic 路径 bug 之后再做地毯式排查,发现 5 处类似潜在 bug:
fallback 分支用 dirname(__file__) 推根级目录,path_config 不可用时
会指向错误位置(推到 douyin/core/pic 等子目录而非项目根 pic/)。
修复:
- underlying_operations.py: screenshot_calls.jsonl 路径 + OCR category 目录
改用 path_config.get_logs_dir() / get_pic_dir()
- douyin_fudai.py: 2 处 actions.log 兜底路径
优先 path_config.get_actions_log_path(),兜底加 ".." 回到项目根
- fudai_detail_room_title.py: 截图复用 fallback 路径加 ".." 回退
- fudai_detail_orchestrator_pkg/read_once.py: 同上 2 处 fallback
新增 11 个回归测试覆盖:
- 关键文件不再用单步 dirname/__file__/pic 写法
- path_config 仍把所有路径锚到 PROJECT_ROOT
- 兜底分支必须含 ".." 表示回退
注:douyin_fudai.py:299 的 reservations.json 因 dirname 恰好等于
PROJECT_ROOT/douyin/core,跟 path_config.get_reservations_path() 一致,
不是 bug,未改动。
1226 passed (+11 新增)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:21:27 +08:00
Codex and Claude Opus 4.7
52b811d0cb
feat(scan): WiFi-ADB 扫描支持自定义/多端口(覆盖 Android 11+ 随机端口)
...
之前只扫 5555。Android 11+ "无线调试" 用 37000-44999 随机端口,
固定的 adb tcpip 也可改端口。新接口让扫描适配任意端口规格。
新增 parse_port_spec:解析端口规格字符串
- 5555 单端口
- "5555,5556" 逗号分隔
- "37000-37010" 范围(最大 1024 个)
- 混合格式与序列输入
- 非法/越界 → 退化为默认 5555
- 单个范围 > 1024 端口直接忽略,避免误扫整个端口段
scan_open_ports 重构:
- 接受 ports 参数(list[int]),传 ports 时优先于旧 port=int
- 返回 list[(ip, port)] 而不是 list[ip],按 (IP 数值序, port 升序) 稳定排序
discover_adb_devices 支持 ports 参数,按 (ip, port) 逐个 verify_adb_target
接入 GUI 与 webui:
- gui_app.py 扫描对话框新增"端口"输入框 + 提示
- gui_app.py 启动重连:上次端口非 5555 时把它一并扫描
- web_gui.py /api/wifi/scan 接受 ports;/api/wifi/auto-reconnect 同上次端口逻辑
新增 13 个 parse_port_spec 单测 + 4 个 scan_open_ports 多端口测试 +
2 个 discover_adb_devices 多端口集成测试。
真机验证:6 端口 (5555 + 37000-37005) × 254 IP,~8.5s 扫完,
正确发现 192.168.5.2:5555 (PEPM00)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 01:02:48 +08:00
Codex and Claude Opus 4.7
4ab4504425
fix(cut_pic): 修截图路径错位 — pic 目录从 douyin/core/pic 改回项目根 pic
...
cut_pic 历史 bug:用 os.path.dirname(__file__) + "/pic" 推路径,
误指向 douyin/core/pic/(不存在),实际截图保存在 <project_root>/pic/。
日志中频繁出现"截图文件不存在: .../douyin/core/pic/screenshot.png"。
改为:
- 默认分支用 path_config.get_pic_dir() / get_screenshot_path()
- target 分支用 os.path.join(path_config.get_pic_dir(), target)
补 5 个回归测试覆盖:
- 源码不再含旧的 dirname-based 路径
- path_config 路径解析到 <project_root>/pic
- 截图缺失时 cut_pic 返回 False(重试 3 次后兜底)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-23 00:47:02 +08:00
Codex and Claude Opus 4.7
fb82213d53
refactor(underlying): 抽 _get_screenshot_direct 到 underlying_operations_pkg/screenshot_direct (2416 → 1930)
...
497 行的 ADB 截图实现(含 exec-out 主路径 + 多重兜底 + watchdog)整段抽到
underlying_operations_pkg/screenshot_direct.capture_screenshot_direct,
原方法保留 9 行 thin shim:
def _get_screenshot_direct(self, device_id, path="pic"):
from douyin.core.underlying_operations_pkg.screenshot_direct import (
capture_screenshot_direct,
)
return capture_screenshot_direct(self, device_id, path)
净减 486 行。函数体过深的两层嵌套截图逻辑现在独立成模块,方便单独测试与改进。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 22:55:34 +08:00
Codex and Claude Opus 4.7
ffd048ffa5
refactor(fudai): 抽 run_once_basic 0.1 高价值预约检查到 helper (2079 → 1541)
...
新增 5 个 helper 到 run_once_basic_helpers.py:
- handle_reservation_check 0.1 预约检查主入口
- _maybe_clear_reservations_on_first_run 首次运行清空队列 + 状态文件
- _log_reservation_check_trigger 调试日志:检查触发条件
- _run_reservation_attend_window 队列满处理 / 抢占逻辑
- _log_reservation_attend_check 调试日志:第一个预约信息
净减 538 行重复嵌套样板。新增 7 个单元测试覆盖:
- 高价值未启用 / 队列空 → return False
- 首次运行清空队列
- 正常路径调 process_reservation_attend_window
- 队列满 → return True
- needswitch=False 走单间模式 + cleanup
- 等待开奖标志不阻断流程
至此 run_once_basic 总长 612 → 88 行(-86%),douyin_fudai.py
累计 4121 → 1541(-2580 行 / -63%),不再是项目最大文件。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 22:45:51 +08:00
Codex and Claude Opus 4.7
61cdf7b445
refactor(fudai): 抽 _handle_in_fudai_detail 步骤1 第二次打开分支 (2216 → 2079)
...
新增 handle_second_open_branch helper:
- 取 _last_fudai_detail_tuple;缺失/无效则重新读取(兜底)
- 有效缓存:从 countdown_tuple 提取 future_ts/原始秒数 + 设到 self
- 调 attend_choujiang:成功清标志 / 失败累加计数 / 异常 fall through
顺手修了一个 latent bug:first-open 抽出后 caller 还在用 step3_start /
skip / skip_reason 这些已不在作用域里的变量。改成从 self._last_fudai_detail_tuple
重新取 detail,去掉无意义的 step3_elapsed 日志,step4 的 skip 参数
直接传 (False, "") —— skip 已在 first-open 内部处理完。
净减 146 行嵌套样板。新增 6 个 second-open 单元测试覆盖:
- 缓存缺失重读 + fall through
- 短 tuple 触发重读
- attend 成功清标志清失败计数
- attend 失败累加计数
- attend 异常 fall through
- 缓存有效时正确设置 _current_fudai_future_ts
至此 _handle_in_fudai_detail 总长 506 → 215 行(-58%),
douyin_fudai.py 累计 4121 → 2079(-2042 行 / -50%)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 22:18:33 +08:00
Codex and Claude Opus 4.7
ca953cb4ba
refactor(fudai): 抽 _handle_in_fudai_detail 步骤2+3 第一次打开分支 (2568 → 2216)
...
新增 5 个 helper 到 handle_detail_helpers.py:
- handle_first_open_branch 第一次打开主入口
- _validate_first_open_detail 数据验证失败处理
- _check_skip_and_handle 筛选检查 + 高价值预约 + 切房
- _try_high_value_reservation 高价值倒计时阈值判断(return/continue/still_skip)
- _handle_skip_filter 普通筛选不通过:关详情 + 切房
- _fallback_swipe_up swipe_up_to_next_live 不存在时的兜底
净减 354 行嵌套样板代码。新增 8 个单元测试覆盖:
- detail 无效 / 短 tuple
- 数据验证失败
- 筛选通过保存数据
- 普通筛选不通过 + needswitch true/false
- 高价值阈值内立即参与
- 高价值阈值外记预约
至此 _handle_in_fudai_detail 总长 1010 → 506 行(-50%),
douyin_fudai.py 累计 4121 → 2216(-1905 行 / -46%)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 22:00:24 +08:00
Codex and Claude Opus 4.7
aeb51f73c7
chore(fudai): 清理 _handle_in_fudai_detail 死代码 + 4 处重复 cleanup
...
- 1 处 dead code:is_second_open 重复赋值(同一变量连读两次)
- 4 处内联"清除任务数量标志 + 嵌套 try"块用 _hd_helpers._clear_task_count_flag 替换
净减 50 行重复样板,2614 → 2568 行。
全套 1172 个测试通过。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 21:35:38 +08:00
Codex and Claude Opus 4.7
0540610c75
refactor(fudai): 抽 _handle_in_fudai_detail last_status 检查到 helper (2872 → 2614)
...
新增 3 个 helper:
- check_last_status_branch:根据 _last_fudai_detail_status 路由 4 个状态
(coupon_popup / watch_task / validation_failed / error)
- _clear_task_count_flag:清除 _fudai_detail_task_count_from_stage(多分支共用)
- _handle_error_status:error + reason=task_count_zero 时连续 3 次切直播间
净减 260 行重复样板代码。新增 9 个单元测试覆盖:
- 4 种已知 status 各自分支
- 未知/空 status 不触发
- task_count_zero 第 1 次仅累计、第 3 次强制切房 / needswitch=False 不切
至此 _handle_in_fudai_detail 总长 1010 → 752 行,
douyin_fudai.py 累计 4121 → 2614(-1507 行 / -37%)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 21:23:26 +08:00
Codex and Claude Opus 4.7
7b6dec820b
refactor(fudai): 抽 _handle_in_fudai_detail 步骤3末尾两个小段 (2926 → 2872)
...
新增 2 个 helper:
- check_invalid_detail_fallback:兜底检查(content="" + value=0 → 视为无效详情)
- prepare_for_attend:记 attend_before_ts + 提取 future_ts + 重置 _detail_closed_by_attend
净减 54 行重复样板代码。新增 9 个单元测试覆盖:
- 空内容+0价值识别为无效
- 正常内容不触发兜底
- detail tuple 短或非 tuple 不抛
- prepare_for_attend 正确返回 attend_before_ts 和写入 future_ts
至此 _handle_in_fudai_detail 总长 1872 → 1010 行(-862 行 / -46%),
douyin_fudai.py 4121 → 2872(累计 -1249 行 / -30%)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 21:16:06 +08:00
Codex and Claude Opus 4.7
8a975f2bf6
refactor(fudai): 抽 _handle_in_fudai_detail 步骤4 到 handle_detail_helpers (3174 → 2926)
...
新增 3 个 helper:
- step4_make_join_decision:参与决策入口(detail=None 短路 + 调 basic_join_decision)
- _handle_reservation_completion:参与成功是预约福袋时的锁定期处理 + 队列清理
- _close_detail_after_attend:根据 _detail_closed_by_attend 决定是否点 click_back
净减 251 行重复代码。新增 7 个 step4 单元测试覆盖:
- detail=None 短路
- join_decision 失败不设标志
- countdown 有效设标志 + 关详情
- attend 已关详情时跳过 click_back
- 预约福袋无其他预约 → 清锁定期
- 预约福袋有其他预约 → 设保护期
- countdown 已过期不设标志
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 21:09:24 +08:00
Codex and Claude Opus 4.7
cea3aced73
feat(web_gui): WebUI 启动时自动重连上次 WiFi 设备 + 智能匹配
...
新增 /api/wifi/auto-reconnect 端点,把桌面 GUI 的 _try_reconnect_last_wifi
逻辑搬到服务端:先 verify_adb_target 上次的 target → 失败则 discover_adb_devices
扫描 + pick_best_match 智能匹配。返回结构化 JSON 让前端渲染:
action: noop | already_online | reconnected | matched | failed
target / model / message / devices
webui/app.js DOMContentLoaded 末尾调用 tryAutoReconnectLastWifi(),
不阻塞页面加载。命中后自动刷新设备下拉并选中。
至此桌面 GUI 和 WebUI 在 WiFi 重连体验上完全对齐:换网段也能找回手机。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:53:23 +08:00
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
3d91764f56
feat(webui): WebUI 加"扫描 WiFi"按钮,对齐桌面 GUI
...
- index.html:WiFi ADB 操作行加"扫描 WiFi"按钮 + 扫描结果区域
- app.js:wifiScan() 调 /api/wifi/scan
- 单个 connected:自动填回 IP,刷新设备
- 多个候选:渲染列表,点击就填回 IP
- unauthorized:提示需手机端授权
- 单击列表项 → 填 wifi_ip 输入框 + 刷新设备下拉
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:40:54 +08:00
Codex and Claude Opus 4.7
8c3a162deb
feat(web_gui): WebGUI 对齐桌面 GUI 的 WiFi 扫描和 last_wifi_target 能力
...
新增 4 个端点:
- POST /api/wifi/scan 扫描局域网 ADB 设备
- GET /api/wifi/last 查询上次连接记录
- POST /api/wifi/last 同上(POST 方便 fetch)
- POST /api/wifi/last/clear 清除记录
同步 connect / disconnect 路径行为:
- /api/wifi/connect 成功后写入 last_wifi_target(取设备型号)
- /api/wifi/disconnect 如果断的就是上次记住的设备 → 自动清除记录
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 20:33:22 +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
23d370ae22
fix(wifi_adb): 修 3 处导致 WiFi-ADB 自动连接失败的解析 bug
...
1) get_device_ip 把 ip route 输出里的网段当 IP 返回
原代码看到 "192.168.5.0/24 ... src 192.168.5.2" 时,扫到的第一个含 3 个点的字段是
"192.168.5.0/24",结果用 0/24 当 IP 调 adb connect 必然失败。
改成显式从 "src <ip>" 取,并优先 wlan 接口;加 ip addr show / ifconfig 兜底。
2) auto_connect_wifi_adb 顺序错误
原代码先 tcpip 5555(让设备 adbd 重启、USB 链路断开)再 get_device_ip(需要 USB),
USB 已断必然取不到 IP。改成先 get_device_ip 再 enable_wifi_adb 再 connect。
3) connect_wifi_adb 把"未授权 / 连接被拒"当成功
adb connect 在 unauthorized / cannot connect / failed to authenticate 等场景下
returncode 也是 0;以前只看 returncode + "connected" 子串,未授权也判成功。
改成显式列出失败关键词,并对未授权给清晰的中文提示。
新增 20 个 wifi_adb 单元测试覆盖 3 处回归场景。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 19:32:04 +08:00
Codex and Claude Opus 4.7
a92cec4ff9
refactor(recovery): 抽 3 处桌面自救重复逻辑到 douyin/core/recovery 共享模块
...
新增 douyin/core/recovery.py(113 行):
- is_douyin_foreground(top_pkg): 统一判断前台是否抖音相关包
- recover_to_douyin(analyser, log=...): 桌面自救主入口(先 launch_package,失败回退点击)
- fallback_click_recovery(analyser, log=...): 旧的点击坐标自救兜底
3 处调用点收敛:
- fudai_modules/run_once_basic_helpers.handle_desktop_recovery:80 行 → 18 行
- douyin/other/douyin_yanghao.py: 3 段重复块(原 ~80 行 each)→ 单行调用
总计净减 -269 行重复代码。新增 13 个 recovery 单元测试 + 修测试 mock。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 19:20:29 +08:00
Codex and Claude Opus 4.7
4c1d95d4b5
feat(recovery): 桌面自救改用包名启动抖音,点击坐标降为兜底
...
当检测到不在抖音前台时,原先点击桌面图标 + 直播 + 进入直播间 3 步坐标的方式
依赖图标位置和分辨率,不同设备/桌面常常失败。改为优先调用 ADB 包名启动:
- underlying_operations 新增 launch_package(device_id, pkg):
monkey -p <pkg> -c android.intent.category.LAUNCHER 1(主路径)
失败回退到 am start -n <pkg>/<MainActivity>(多个常见 activity 兜底)
默认按 com.ss.android.ugc.aweme / .lite / TikTok 顺序尝试
- 新增 is_douyin_foreground 便捷方法
- 改造 3 处自救点:
fudai_modules/run_once_basic_helpers.py:handle_desktop_recovery
douyin/other/douyin_yanghao.py(养号循环 + _yanghao_check_and_recover_from_desktop ×2)
包名启动失败时仍走旧的点击逻辑作为兜底,向后兼容
新增 12 个单元测试覆盖 launch_package 主路径/兜底/失败和自救新行为。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 19:08:09 +08:00
Codex and Claude Opus 4.7
3aca02fae4
refactor(fudai): 抽 run_once_basic 2 段独立逻辑到 run_once_basic_helpers (3233 → 3174)
...
新增 2 个 helper:
- handle_just_recorded_reservation:刚记录预约后强制切换直播间
- handle_skip_stage_diagnosis:0.5 跳过阶段检测分支
新增 5 个单元测试。行为保持不变。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 18:37:18 +08:00
Codex and Claude Opus 4.7
695a84d8b5
refactor(fudai): 抽 _handle_in_fudai_detail 入口检查到 handle_detail_helpers (3294 → 3233)
...
抽出 2 个独立函数到 fudai_modules/handle_detail_helpers.py:
- log_entry_flags:进入方法时记录关键 flags
- handle_consecutive_failures_check:连续参与失败次数检查
新增 5 个单元测试覆盖阈值、needswitch 分支。行为保持不变。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 18:31:43 +08:00
Codex and Claude Opus 4.7
5802586b20
refactor(fudai): 拆 run_once_basic 6 段独立逻辑到 run_once_basic_helpers (4121 → 3294)
...
抽出 6 个独立函数到 fudai_modules/run_once_basic_helpers.py:
- handle_waiting_for_lottery_result:等待开奖期间持续 OCR 检测
- handle_no_attend_timeout:30 分钟未参与回到推荐页
- handle_desktop_recovery:桌面检测自救
- screenshot_and_diagnose:截图 + 阶段诊断
- handle_high_value_room_revisit:高价值房间重访
- dispatch_stage_branch:弹窗/详情/直播间/推荐页/开奖结果分发
新增 15 个单元测试覆盖各分支。run_once_basic 体积大幅瘦身但行为保持不变。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 18:22:17 +08:00
Codex and Claude Opus 4.5
66eb05e6b1
补 reservation_logic.cleanup_validate 子模块单元测试(+10 用例)
...
- validate_back_to_reservation / cleanup_expired_reservations 函数签名验证
- reservation_logic 全部 6 个子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-22 01:22:56 +08:00
Codex and Claude Opus 4.5
5a40b49727
补 douyin_yanghao_pkg 剩余子模块单元测试(+7 用例)
...
- _scaled_click / _do_comment 函数签名验证
- douyin_yanghao_pkg 全部 3 个子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:48:38 +08:00
Codex and Claude Opus 4.5
266c7f2932
补 underlying_operations_pkg 剩余子模块单元测试(+14 用例)
...
- analyse_pic_digits / _swipe_with_sendevent_improved 函数签名验证
- underlying_operations_pkg 全部 10 个子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:45:46 +08:00
Codex and Claude Opus 4.5
59ac6a3abc
补 flow_control_pkg + orchestrator_pkg 子模块单元测试(+12 用例)
...
- find_and_open_fudai_detail 函数签名验证
- read_fudai_detail_once / read_fudai_detail_with_retries 函数签名验证
- flow_control_pkg / orchestrator_pkg 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:42:58 +08:00
Codex and Claude Opus 4.5
df628c11dd
补 douyin_fudai_finder_pkg 子模块单元测试(+15 用例)
...
- FudaiClickExecutor / FudaiDetailVerifier / FudaiImageAcquirer 类存在性验证
- check_have_fudai_with_ready_screenshot_optimized 函数签名验证
- douyin_fudai_finder_pkg 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:38:43 +08:00
Codex and Claude Opus 4.5
6996c7813e
补 screenshot_manager 子模块单元测试(+17 用例)
...
- _sanitize_filename_part 纯函数测试(无效字符/中文/路径)
- save_files / save_image 函数签名验证
- screenshot_manager 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:28:26 +08:00
Codex and Claude Opus 4.5
0efcfff545
补 reservation/core + fudai_modules 模块单元测试(+21 用例)
...
- format_reservation_context / validate_reservation_item 纯函数测试
- fudai_modules Mixin 类存在性验证
- reservation/core 包导入测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:24:15 +08:00
Codex and Claude Opus 4.5
b0eccc5171
补 bin 模块单元测试(+19 用例)
...
- format_size / get_log_base_names 纯函数测试
- parse_args 命令行参数解析测试
- manage_logs / run_cli 函数签名验证
- bin 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:21:03 +08:00
Codex and Claude Opus 4.5
e8bf904fc6
补 douyin/stage 模块单元测试(+23 用例)
...
- diagnose_stage_from_current_screen 函数签名验证
- StageHandler 类方法检查
- stage_handler_pkg shim 与子模块导出一致性验证
- stage 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:17:54 +08:00
Codex and Claude Opus 4.5
8d98143df1
补 douyin/core 模块单元测试(+24 用例)
...
- io_utils 纯函数测试(_verify_png_integrity/_ensure_parent_dir/_safe_replace_file)
- path_config 路径配置函数测试
- version 版本信息格式验证
- flow_control shim 与子模块导出一致性验证
- core 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:15:34 +08:00
Codex and Claude Opus 4.5
b5a15ecea4
补 douyin/other 模块单元测试(+28 用例)
...
- _normalize_room_title 纯函数测试(空格/数字/中文)
- high_value_room / popups / lottery 函数签名验证
- yanghao shim 与子模块导出一致性验证
- other 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:12:54 +08:00
Codex and Claude Opus 4.5
73008a9763
补 douyin/reservation 模块单元测试(+23 用例)
...
- _compact_text 纯函数测试(空格/中文/边界值)
- match_reservation / validate_back_to_reservation 函数签名验证
- reservation_handler shim 与子模块导出一致性验证
- reservation 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:09:35 +08:00
Codex and Claude Opus 4.5
5309aa0198
补 douyin/fudai 模块单元测试(+20 用例)
...
- is_abnormal_time_value 纯函数测试(边界值/异常值)
- validate_fudai_detail 函数签名验证
- fudai_detail shim 与子模块导出一致性验证
- fudai/core 子模块存在性测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:07:15 +08:00
Codex and Claude Opus 4.5
85d7bb2525
补 douyin/detection/pixel 模块单元测试(+14 用例)
...
- pixel/popups 弹窗检测函数签名验证
- pixel/buttons 按钮检测函数签名验证
- pixel/stage 阶段检测函数签名验证
- shim 与子模块导出一致性验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:03:35 +08:00
Codex and Claude Opus 4.5
3269d3adf6
补 gui/components 模块单元测试(+22 用例)
...
- log_color_config 纯函数测试(get_operation_type/get_color_config)
- mapping_utils 纯函数测试(_format_timestamp)
- gui/components 子模块存在性验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 22:00:02 +08:00
Codex and Claude Opus 4.5
7ef5bc3e07
补 douyin/logging 模块单元测试(+30 用例)
...
- log_formatter 纯函数测试(format_debug_log/action_log/error_log 等)
- PerformanceTracker 类测试
- logging 子模块存在性验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:56:43 +08:00
Codex and Claude Opus 4.5
2c8879be7a
补 douyin/fudai/core 模块单元测试(+14 用例)
...
- validate_coords 纯函数测试(边界/修正/无效坐标)
- safe_image_load 函数测试
- fudai/core 子模块存在性验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:53:47 +08:00
Codex and Claude Opus 4.5
6ecedbbde1
补 douyin/handlers 模块单元测试(+13 用例)
...
- _adb_path 纯函数测试(环境变量、引号处理、operation 对象)
- SwipeHandler / PopupHandler / ScreenshotHandler 类存在性验证
- swipe_ops 函数签名检查
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:50:02 +08:00
Codex and Claude Opus 4.5
cdf8be0ded
补 operations 模块单元测试(+18 用例)
...
- OCR 缓存机制测试(cache_get/put/clear/stats)
- _img_fingerprint 哈希函数测试
- screenshot_operations / screenshot_service 类存在性验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:42:39 +08:00
Codex and Claude Opus 4.5
a6dee879e7
补 tools/dev/bump_version.py 单元测试(+10 用例)
...
- parse_semver 纯函数测试(含边界/异常)
- compute_next 版本号递增测试
- 集成测试:连续 bump 验证
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:37:19 +08:00
Codex and Claude Opus 4.5
9f7e8da57a
补 reservation_handler_pkg / stage_handler_pkg 单元测试(+12 用例)
...
- 验证 shim 与 pkg 导出一致性
- Handler 类方法签名检查
- 子模块导入测试
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 21:25:50 +08:00
Codex and Claude Opus 4.7
6bdf7b2527
补 5 个剩余子包的综合测试(test_remaining_pkgs.py +20 用例)
...
覆盖 5 个之前没专门测试的拆分子包,每个写"API 兼容 + 不抛异常"级别的测试
(业务函数依赖大量 analyser 状态 + 真实截图,深度业务测试留给端到端):
- detection_pkg
+ _ensure_detection_cache 创建 _detection_cache 与 _detection_cache_ttl
+ _ensure_detection_cache 多次调用幂等(不覆盖既有 cache)
+ 4 个对外 API callable
- fudai_detail_orchestrator_pkg
+ read_fudai_detail_once / _with_retries 可调用
+ 兼容 shim 与子包指向同一函数对象
- logging_wrapper_pkg.misc
+ log_step_time / log_error_with_context / log_performance_step /
log_debug_info 不抛异常
+ get_performance_stats 返回 dict
- flow_control_pkg
+ 4 个对外 API callable
+ 兼容 shim 与子包指向同一函数对象
- detect_by_template (module-level)
+ 签名 (analyser, rx, pic, region) 正确
+ FudaiDetector.detect_by_template 类方法仍可调用(forwarding)
- underlying_operations_pkg 第二轮新增
+ save_reward_pic / set_clipboard_text / _swipe_with_sendevent_improved /
select_device / analyse_pic_digits 可调用
+ set_clipboard_text 空文本短路返回 False(不调用 ADB)
回归:
- 全套 627 → 647(+20 用例)
- 全部 647 passed in 19s
- compileall exit 0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 21:04:14 +08:00
Codex and Claude Opus 4.7
af8145b8a8
补 fudai_filter_pkg / logging_pkg 单元测试 + 修 monitor 缺 datetime import
...
新增测试:
- test_fudai_filter_pkg (24)
覆盖 helpers / should_skip / join_decision 三个子模块
含 _is_short_countdown_text / is_watch_task_fudai / check_contain
+ should_skip_fudai_by_config 5 个业务场景断言(高价值通过 / 观看任务跳过 /
低价值跳过 / 黑名单跳过 / 单间模式必参)
- test_logging_pkg (22)
覆盖 _common 全局状态 + handlers 类构造 + cleanup 纯函数边界 + monitor
类构造 + config 全部对外 API(get_logger 缓存 / get_caller_info /
format_exception_info / LogContext / log_function_call 装饰器)
修复 1 个真实回归 bug:
- douyin/logging/douyin_logging_pkg/monitor.py 缺 from datetime import datetime
(原文件用的是 from datetime import datetime, timedelta;拆分时只写了
import 模块导致 datetime.now() 抛 NameError)
修复后 LogRotationMonitor 可正常构造
回归:
- 全套 581 → 627 (+46 用例)
- 全部 627 passed in 22s
- compileall exit 0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 21:01:15 +08:00
Codex and Claude Opus 4.7
e417acfb7c
为 10 个已拆出的子包补单元测试(+226 用例)
...
新增 tests/ 下 10 个测试文件,把已拆出的子包从"被外部测试间接覆盖"提升到
"独立可测":
- test_web_gui_pkg (52)
覆盖 logger / ansi / adb_compat / nested / stats_helpers
含 _wg_log/_LOGGER 日志、ANSI 清理、点号路径、_parse_countdown_seconds 等
- test_underlying_operations_pkg (35)
覆盖 adb_helpers / bounds / countdown / ocr_content / pic_path
含 _adb_path 环境变量覆盖、check_countdown 多种格式、OCR 字符纠错
- test_reservation_logic_helpers (21)
覆盖 helpers.py 5 个纯函数(_now_ts / _normalize_room_title /
_calculate_string_similarity / _extract_content_core /
_sort_reservations_inplace 排序稳定性)
- test_screenshot_manager_pkg (47)
覆盖 paths.get_category_for_picname(5 类关键词分类)+
get_latest_attempt_path / get_last_success_path(按 operation_type 路径推断)
+ 异步计数器
- test_gui_core_pkg (13)
覆盖 RunParams dataclass 28 字段构造 + adb 函数 + read_config / write_config
roundtrip
- test_fudai_core_pkg (17)
覆盖 _FudaiOcrExecutorState 单例 + _get_fudai_ocr_executor 缓存复用 + 11
个 thin_wrappers 与原实现等价行为
- test_handler_shells (8)
覆盖 ReservationHandler / StageHandler / LoggingWrapper 三个薄壳类的
staticmethod forwarding 完整性
- test_yanghao_pkg (14)
覆盖 _yanghao_log(_log_kv 优先 + logger fallback + broken analyser
兜底 + 未知 level 不抛)+ yanghao_get_recommend_seconds 默认值
- test_pixel_common (6)
覆盖 _safe_open_screenshot_rgb 用 tmp_path 构造合法/损坏/截断/RGBA PNG
- test_fudai_finder_pkg (13)
覆盖 5 个类(FudaiImageAcquirer / FudaiDetector / FudaiClickExecutor /
FudaiDetailVerifier / FudaiFinder)实例化与组合关系,verify
detect_by_template 类方法签名仍兼容(拆出后)
回归:
- 全套测试 355 → 581(+226 用例)
- 全部 581 passed / 1 skipped in 27s
- 新拆出的 12 个子包现在都有专门的单元测试覆盖
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 20:54:35 +08:00
Codex and Claude Opus 4.7
2d928c3856
FudaiDetector.detect_by_template 拆出(957→655,瘦身 302 行)
...
把 douyin/fudai/douyin_fudai_finder_pkg/detector.py 的 FudaiDetector.detect_by_template
(306 行 / 4 个 self.X)搬到独立子模块 detect_by_template.py(321 行)。
策略:
- self.analyser → analyser(参数)
- self.rx → rx(参数)
- 类方法保留为 1 行 forwarding:
def detect_by_template(self, pic, region):
return _impl(self.analyser, self.rx, pic, region)
- detector.py 内顶部 import detect_by_template 模块的实现
回归:
- 2 个文件 compileall 通过
- pytest 355 passed / 1 skipped
- FudaiFinder() 实例化正常,FudaiDetector.detect_by_template 类方法仍可访问
- module-level detect_by_template 可独立调用
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 20:31:27 +08:00
Codex and Claude Opus 4.7
57d99f3459
拆分 douyin_fudai_core (2205 → 2124 + 3 个子模块)
...
把 douyin/fudai/douyin_fudai_core.py 中工具/兼容部分搬到
douyin/fudai/douyin_fudai_core_pkg/ 子包:
- ocr_executor (46) _FudaiOcrExecutorState 类 + _fudai_ocr_executor_state
全局实例 + _get_fudai_ocr_executor 池复用函数
- thin_wrappers (65) 11 个 [兼容] 薄壳 forwarding 函数
(attend_choujiang / check_lucky_draw_result /
is_watch_task_fudai / should_skip_fudai_by_config /
basic_join_decision 等)
巨型 get_fudai_contain (2062 行) 留在原文件。原文件从子包 import 后
re-export,外部全部不需修改:
- should_skip_fudai_by_config 24 处外部引用
- attend_choujiang 15 处 / is_watch_task_fudai 13 处 / basic_join_decision 13 处
- 其他 1-10 处
回归:
- 4 个新/改文件 compileall 通过
- pytest 355 passed / 1 skipped(其中 2 个新 _is_short_countdown_text 测试也通过)
- attend_choujiang shim ⇄ pkg 同一对象
- should_skip_fudai_by_config(高价值) 返回 (False, 'ok')
- _fudai_ocr_executor_state.workers = 0 全局实例正常
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 20:25:34 +08:00
Codex and Claude Opus 4.7
a337b4b93d
underlying_operations 第三轮拆分(2434 → 2351,再瘦身 83 行)
...
新增 2 个子模块:
- device_select (新, 73) select_device 设备选择交互(无 self.X)
- ocr_digits (新, 49) analyse_pic_digits 数字 OCR 识别
(保留 analyser 参数以调 analyser.analyse_pic_word)
策略:
- select_device 的 self.X 全是 _adb_path / _adb_args,已经是 module-level,
搬出后改用 from .adb_helpers import _adb_path, _adb_args 即可。
- analyse_pic_digits 用 self.analyse_pic_word(递归调用类内大方法)。
搬到 module-level 后第一参数从 self 改名 analyser,类内 forwarding
传 self 即可,外部 op.analyse_pic_digits(picname) 完全兼容。
回归:
- 4 个新/改文件 compileall 通过
- pytest 353 passed / 1 skipped
- underlying_operations.select_device / analyse_pic_digits 类方法和 module-level
函数都可访问
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 20:12:40 +08:00
Codex and Claude Opus 4.7
57eacb3219
underlying_operations 第二轮拆分(2582 → 2434,再瘦身 148 行)
...
新增 3 个子模块 + 1 个函数搬到已有子模块:
- adb_helpers (38) 新增 _adb_args(构造 adb -s 命令行)
- reward_pic (新, 73) save_reward_pic(中奖截图保存)
- swipe_sendevent (新, 47) _swipe_with_sendevent_improved(sendevent 滑动)
- clipboard (新, 75) set_clipboard_text(设备剪贴板设置)
策略:4 个方法的 self.X 引用都是 self._adb_path / self._adb_args 这种
"无状态工具方法",可以替换为 module-level 函数调用。类内方法保留为
1 行 forwarding 调用 _impl_X。
外部调用全部不需修改:
- save_reward_pic 4 处外部 self.save_reward_pic 仍工作
- _adb_args / _swipe_with_sendevent_improved / set_clipboard_text 0 外部引用
回归:
- 5 个新/改文件 compileall 通过
- pytest 353 passed / 1 skipped
- 类的 _adb_args / save_reward_pic / set_clipboard_text /
_swipe_with_sendevent_improved 4 个 forwarding 全部正确
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 20:07:23 +08:00
Codex and Claude Opus 4.7
254820e6dc
拆分 underlying_operations (3021 → 5 子模块 + 2582 行原文件)
...
把 douyin/core/underlying_operations.py 中 6 个零 self 引用的方法搬到
douyin/core/underlying_operations_pkg/ 子包,类内方法变成 1 行 forwarding。
原文件保留 underlying_operations 巨型类(>50 个实例方法用 self)。
新建子包:
- adb_helpers (34) _adb_path / _pick_adbkeyboard_ime
- pic_path (65) _find_pic_path 按名称查找图片路径
- ocr_content (228) extract_ocr_content OCR 文本拼接 + 置信度
- countdown (179) check_countdown 倒计时文本解析(含 OCR 字符纠错)
- bounds (17) _parse_bounds 解析 UI dump 的 [x1,y1][x2,y2]
策略:6 个方法的 self 引用全为 0,纯算法逻辑直接搬到 module-level;
类内对应方法保留装饰器和签名,body 改为 1 行 forwarding 调用:
@staticmethod
def _adb_path() -> str:
return _impl_adb_path()
外部调用全部不需修改:
- ``self._find_pic_path(...)`` 实例方法 forwarding 仍工作
- ``cls._adb_path()`` staticmethod forwarding 仍工作
- ``ReservationHandler._parse_bounds(...)`` 外部 5 处引用零修改
修复发现:
- countdown.py 原本 ``import datetime``(应为 ``from datetime import datetime,
timedelta``),导致 datetime.now()/timedelta() 触发 NameError 后被外层
except 吞掉返回 False。修正后 check_countdown('5:30') 正确返回 (330, <ts>)
- 子模块内部用 _uo_log,加本地实现避免对原文件的循环依赖
回归:
- 6 个新文件 + 改写后 underlying_operations.py compileall 通过
- pytest 353 passed / 1 skipped
- check_countdown / extract_ocr_content / _parse_bounds /
_pick_adbkeyboard_ime / _find_pic_path / _adb_path 6 个 forwarding 全部正确
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 19:54:22 +08:00
Codex and Claude Opus 4.7
246c80498e
拆分 douyin_yanghao (922 → 4 子模块 + 788 行原文件保留 yanghao_idle)
...
把 douyin/other/douyin_yanghao.py 中 6 个独立小函数拆出到
douyin/other/douyin_yanghao_pkg/ 子包,巨型函数 yanghao_idle (756 行)
留在原文件,从子包 import 拿 _yanghao_log/_scaled_click/_do_comment 用。
新建子包:
- logger (40) _yanghao_log + module logger
- click_helpers (75) _scaled_click / _do_comment
- entrypoints (82) yanghao_recommend_flow / yanghao_wait /
yanghao_get_recommend_seconds
(yanghao_recommend_flow 通过 lazy import 调用 yanghao_idle)
外部 import 路径不变:
``from douyin.other.douyin_yanghao import yanghao_recommend_flow / yanghao_wait /
yanghao_get_recommend_seconds`` 等仍可用(原文件 from yanghao_pkg import * re-export)。
- _scaled_click 4 处外部引用 / _yanghao_log 1 处 / 其他 0 处
回归:
- 4 个新文件 + 改写后 douyin_yanghao.py compileall 通过
- pytest 353 passed / 1 skipped
- _yanghao_log() / yanghao_get_recommend_seconds() 调用结果正常
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 19:08:49 +08:00
Codex and Claude Opus 4.7
badf64998d
拆分 douyin_flow_control (706 → 4 个子模块 + 23 行 shim)
...
把 douyin/core/douyin_flow_control.py 4 个独立顶层函数拆成
douyin/core/douyin_flow_control_pkg/ 子包:
- stage_handler (34) handle_stage_after_diagnosis 阶段后状态记录
- find_open (537) find_and_open_fudai_detail 找福袋并打开详情(最大头)
- filter (85) filter_fudai_detail 配置筛选决策
- no_fudai (94) handle_no_fudai_situation 无福袋时的简单流程
原文件改为 23 行 re-export shim,4 个公共符号全部保留。
- find_and_open_fudai_detail 4 处外部引用,其他 0 处
全部不需修改。
回归:
- 5 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一函数对象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 19:03:43 +08:00
Codex and Claude Opus 4.7
a6bbdcc400
拆分 web_gui (2251 → 5 子模块 + 2148 行原文件保留 ProcRunner/Handler/main)
...
把 gui/web_gui.py 中 11 个独立 helper 拆出到 gui/web_gui_pkg/ 子包,
ProcRunner 巨型类(1514 行 / 25 实例方法 / 390 处 self)+ Handler 类
(588 行)+ main 留在原文件。
新建子包:
- logger (29) _wg_log + module logger
- ansi (17) strip_ansi_escape_codes + _ANSI_ESCAPE_RE
- adb_compat (44) 5 个 thin wrapper(forward 到 gui.gui_core_pkg)
- nested (18) get_nested_value(点号路径配置读取)
- stats_helpers (71) _parse_countdown_seconds / _bucket / _inc_map(ProcRunner 3 个 @staticmethod)
策略:8 个顶层 helper 直接搬子包;ProcRunner 内 3 个 @staticmethod 也搬,
类内改成 1 行 @staticmethod forwarding 保持 ProcRunner._parse_countdown_seconds
等调用兼容。原文件 import gui.web_gui_pkg 暴露 11 个公共符号。
外部 import 路径全部不变:
- find_adb_executable / read_config / list_adb_devices 等共 70+ 处外部引用
全部不需修改(CONFIG_PATH 17 处 / read_config 17 处 / find_adb_executable
18 处 / list_adb_devices 21 处 / write_config 10 处 / 其他 1-7 处)
回归:
- 6 个新文件 + 改写后 web_gui.py compileall 通过
- pytest 353 passed / 1 skipped
- _wg_log / strip_ansi_escape_codes / get_nested_value 调用结果正确
- ProcRunner._parse_countdown_seconds('1:30') = 90 (薄壳 forwarding OK)
- ProcRunner._bucket(15, [0,10,50,100]) = '10-50'
- ProcRunner._inc_map(m, 'k', 5) -> {'k': 5}
- ProcRunner() 实例化 OK
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 18:57:52 +08:00
Codex and Claude Opus 4.7
ef6ca4a650
拆分 gui_core (1594 → 4 子模块 + 1207 行原文件保留 Runner)
...
把 gui/gui_core.py 中 12 个独立顶层函数 + RunParams dataclass 拆出到
gui/gui_core_pkg/ 子包;Runner 巨型类(1164 行 / 13 实例方法 / 用 self
状态)原文件保留,仅做 import re-export。
新建子包:
- adb (79) find_adb_executable / list_adb_devices / resolve_adb_device
- wifi_adb (323) 7 个 WiFi-ADB 函数
- config (46) CONFIG_PATH / read_config / write_config
- run_params (45) RunParams dataclass
策略:Runner 类内部用了 find_adb_executable 等顶层函数,所以原文件
``gui/gui_core.py`` 通过 ``from gui.gui_core_pkg import *`` re-export
14 个公共符号供 Runner 内部和外部代码继续使用。
外部 import 路径全部不变:
``from gui.gui_core import find_adb_executable / RunParams / Runner`` 等
所有 14 个公共符号都保留。
- find_adb_executable 20 处外部引用 / read_config 17 处 / list_adb_devices
16 处 / 其他 1-7 处,全部不需修改
回归:
- 5 个新文件 + 改写后 gui_core.py compileall 通过
- pytest 353 passed / 1 skipped
- find_adb_executable() 调用正常返回 adb.EXE 绝对路径
- read_config() 读到 126 个 config keys
- RunParams.is_dataclass = True,28 个字段
- Runner 类正确暴露
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 18:49:05 +08:00
Codex and Claude Opus 4.7
c442335b34
拆分 douyin_stage_handler (1009 → 5 个子模块 + 26 行 shim)
...
把 douyin/stage/douyin_stage_handler.py 的 StageHandler 类(4 个
@staticmethod)拆成 douyin/stage/douyin_stage_handler_pkg/ 子包:
- diagnose (37) diagnose_stage_from_current_screen 阶段诊断分发
- check_live (774) check_in_live_room_by_icon 直播间图标检测(最大头)
- handle_detail (20) handle_in_fudai_detail 福袋详情页处理
- handle_room (195) handle_live_room_has_or_not_fudai 直播间福袋检测分发
- handler (32) StageHandler 类(薄壳,每个方法 1 行 forwarding)
策略:4 个方法都是 @staticmethod 第一参数 analyser,搬到 module-level 后
类方法变成 1 行 forwarding。类内部 0 互调,外部 3 处 StageHandler.method
(douyin_fudai.py / fudai_stage_detection.py)保持不变。
外部 import 路径不变:
``from douyin.stage.douyin_stage_handler import StageHandler`` 仍可用。
回归:
- 6 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- StageHandler.diagnose / module-level diagnose 都正确指向 wrapper / 实现
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 18:36:41 +08:00
Codex and Claude Opus 4.7
4ab1b88fa0
拆分 douyin_logging_wrapper (1080 → 6 个子模块 + 59 行 shim)
...
把 douyin/logging/douyin_logging_wrapper.py 的 LoggingWrapper 类(8 个
@staticmethod)按职责拆成 douyin/logging/douyin_logging_wrapper_pkg/ 子包:
- _common (76) 共享:colorama / 占位类 / 模块实例
- enhanced (380) enhanced_log_kv 主入口
- simple (216) _enhanced_log_kv_simple 简化版
- detailed (356) _enhanced_log_kv_detailed 详细版(最大头)
- misc (151) 5 个小型辅助方法(log_step_time / log_error_with_context /
log_performance_step / log_debug_info / get_performance_stats)
- wrapper (55) LoggingWrapper 类(薄壳,每个方法 1 行 forwarding)
策略:8 个方法全是 @staticmethod 第一参数 analyser,搬到 module-level 后
类方法变成 1 行 forwarding。类内部互调(enhanced_log_kv → simple/detailed,
log_error_with_context → enhanced_log_kv)改为直接 import module-level 函数。
外部 import 路径不变:
``from douyin.logging.douyin_logging_wrapper import LoggingWrapper`` 仍可用
(原文件改成 59 行 re-export shim,含 18 个共享符号 / 4 个占位类)。
回归:
- 7 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- LoggingWrapper.get_performance_stats / module-level 函数 / Fore/Style 占位
全部能正常调用
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 18:32:03 +08:00
Codex and Claude Opus 4.7
85bd488f66
拆分 douyin_reservation_handler (1314 → 6 个子模块 + 29 行 shim)
...
把 douyin/reservation/douyin_reservation_handler.py 按职责拆成
douyin/reservation/douyin_reservation_handler_pkg/ 子包:
- find_room (169) find_room_pos_by_title 按标题查找直播间位置
- record_title (333) record_room_title_and_pos 记录直播间标题与位置
- seek_room (319) seek_reservation_room 回退到目标预约直播间
- direct_attend (441) handle_reservation_direct_attend 预约直接参与
- dump_state (180) _dump_room_pos_map_to_state 序列化映射到 state 文件
- handler (43) ReservationHandler 类(薄壳,每个 staticmethod 1 行 forwarding)
策略亮点:原 ReservationHandler 4 个方法都是 @staticmethod 且第一个参数为
analyser,搬出来成 module-level 函数后,类方法变成 1 行 forwarding。
公共 API 100% 保留:ReservationHandler.method(analyser, ...) 完全不需要改。
外部 import 路径不变:
``from douyin.reservation.douyin_reservation_handler import ReservationHandler``
仍可用(原文件改成 29 行 re-export shim)。
- ReservationHandler 5 处外部引用
- find_room_pos_by_title 2 处外部引用
- handle_reservation_direct_attend / _dump_room_pos_map_to_state 各 1 处
全部不需修改。
回归:
- 7 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- ReservationHandler.find_room_pos_by_title / module-level 函数 / 顶层
_dump_room_pos_map_to_state 都能正常调用
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 18:21:40 +08:00
Codex and Claude Opus 4.7
7715b93eca
fix(manage_logs): 修复 douyin_logging 拆分后的 import 回归
...
douyin/logging/douyin_logging.py 在 e35e8a8 commit 拆分为子包后,
原文件改成 re-export shim,不再"恰好"暴露 module-level 的 path_config
和全局变量 _log_monitor。
bin/manage_logs.py 之前依赖这两个间接 import:
from douyin.logging.douyin_logging import path_config # 副作用
from douyin.logging.douyin_logging import _log_monitor # 全局变量
修复:
- path_config 改为直接从源头导入:from douyin.core import path_config
- _log_monitor 改为从子包内部状态读取:
from douyin.logging.douyin_logging_pkg import _common as _logging_state
_log_monitor = _logging_state._log_monitor
回归:
- bin/manage_logs.py --help / monitor / stats 三个子命令全部正常
- pytest 353 passed / 1 skipped 不变
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 17:48:17 +08:00
Codex and Claude Opus 4.7
2523668b4c
拆分 douyin_fudai_finder (1816 → 6 个子模块 + 29 行 shim)
...
把 douyin/fudai/douyin_fudai_finder.py 按 5 个类 + 1 顶层函数拆成
douyin/fudai/douyin_fudai_finder_pkg/ 子包:
- image_acquirer (91) FudaiImageAcquirer 截图获取与预处理
- detector (957) FudaiDetector 多算法识别(最大头)
- click_executor (220) FudaiClickExecutor 点击执行
- detail_verifier (237) FudaiDetailVerifier 详情页打开验证
- finder (392) FudaiFinder 4 个组件的组合入口
- optimized_entry (59) check_have_fudai_with_ready_screenshot_optimized 顶层入口
原文件改为 29 行 re-export shim,6 个公共符号全部保留。
- check_have_fudai_with_ready_screenshot_optimized 2 处外部引用
- 其他类全部为 internal class composition,0 处外部引用
回归:
- 7 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一类对象
- FudaiFinder 实例化后内部组件正确(acquirer / detector / executor / verifier)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 17:34:19 +08:00
Codex and Claude Opus 4.7
e7faceeb5f
拆分 fudai_detail_orchestrator (1043 → 2 个子模块 + 17 行 shim)
...
把 douyin/fudai/core/fudai_detail_orchestrator.py 按 2 个独立顶层函数拆成
douyin/fudai/core/fudai_detail_orchestrator_pkg/ 子包:
- read_once (546) read_fudai_detail_once 单次福袋详情识别
- read_with_retries (513) read_fudai_detail_with_retries 带重试版本
原文件改为 17 行 re-export shim,2 个公共符号全部保留。
- read_fudai_detail_once 5 处外部引用
- read_fudai_detail_with_retries 5 处外部引用
全部不需修改。
子包名 _pkg 后缀避免与同目录 shim 文件 fudai_detail_orchestrator.py 冲突。
回归:
- 3 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一函数对象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 17:23:02 +08:00
Codex and Claude Opus 4.7
9d1b0c1e36
拆分 douyin_logging (1412 → 5 个子模块 + 46 行 shim)
...
把 douyin/logging/douyin_logging.py 按职责拆成
douyin/logging/douyin_logging_pkg/ 子包:
- _common (21) 共享全局状态:_logging_configured / _logger_cache / _log_monitor
- handlers (206) 自定义 handler:RotatingDatedFileHandler / DatedFileHandler
- cleanup (282) 日志压缩与清理:compress_log_file / cleanup_old_logs / _load_*_policy
- monitor (337) 轮转监控:LogRotationMonitor / start/stop_log_monitor / get_log_stats
- config (652) 主配置入口:get_logger / configure_logging / log_function_call /
LogContext / get_caller_info / format_exception_info
原文件改为 46 行 re-export shim,15 个公共符号全部保留。
全局变量统一搬到 _common,子模块通过 ``from . import _common as _state``
访问 _state.X 形式(global 不能跨模块)。
子包名 douyin_logging_pkg 是为了避免与同目录下的 shim 文件
douyin_logging.py 冲突(同名包 vs 模块在 Python 中不能并存)。
回归:
- 6 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped(含 unified_logger MDC 13 个用例)
- 旧 import 路径与新子包路径返回同一函数对象
- get_logger 缓存机制(第二次调用返回同一对象)正常工作
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 17:13:34 +08:00
Codex and Claude Opus 4.7
74209035f7
拆分 douyin_reservation_logic (2702 → 7 个子模块 + 53 行 shim)
...
把 douyin/reservation/douyin_reservation_logic.py 按职责拆成
douyin/reservation/reservation_logic/ 子包:
- _common (57) 共享错误处理工具占位 + ReservationItem 类型
- helpers (130) 内部工具:标题归一化 / 相似度 / 排序 / 时间戳
- add (447) add_reservation_core_logic 主入口(添加新预约)
- cleanup_validate (136) validate_back_to_reservation / cleanup_expired_reservations
- queue_full (305) handle_queue_full_wait_at_earliest 队列满时等待策略
- attend_window (1437) process_reservation_attend_window 进入预约窗口(最大头)
- record (328) record_high_value_reservation 高价值预约登记入口
原文件改为 53 行 re-export shim,17 个公共符号全部保留。
- process_reservation_attend_window 7 处外部引用
- handle_queue_full_wait_at_earliest 5 处外部引用
- _now_ts 5 处 / cleanup_expired_reservations 4 处 / _sort_reservations_inplace 4 处
- 其他 5 处以下
全部不需修改。
回归:
- 8 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一函数对象
- _now_ts / _normalize_room_title / _calculate_string_similarity 等纯函数
调用结果与拆分前一致
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 17:03:55 +08:00
Codex and Claude Opus 4.7
787c4e8eec
拆分 douyin_detection (1756 → 3 个子模块 + 22 行 shim)
...
把 douyin/detection/douyin_detection.py 按职责拆成
douyin/detection/detection_pkg/ 子包:
- _common (14) _ensure_detection_cache 共享缓存初始化
- detail (323) check_detail_height + check_in_fudai_detail(详情页相关)
- finder (1438) check_have_fudai_with_ready_screenshot(找福袋图标主入口,最大头)
原文件改为 22 行 re-export shim,4 个公共符号全部保留。
- check_in_fudai_detail 5 处外部引用
- check_have_fudai_with_ready_screenshot 3 处外部引用
- check_detail_height 2 处外部引用
全部不需修改。
子包名 detection_pkg 是为了避免与同目录下的 shim 文件 douyin_detection.py
潜在的命名混淆。
回归:
- 4 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一函数对象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 16:55:24 +08:00
Codex and Claude Opus 4.7
19e347e6c1
拆分 fudai_filter (1090 → 3 个子模块 + 24 行 shim)
...
把 douyin/fudai/core/fudai_filter.py 按职责拆成
douyin/fudai/core/fudai_filter_pkg/ 子包:
- helpers (126) 小工具:_is_short_countdown_text / check_contain / is_watch_task_fudai
- should_skip (483) should_skip_fudai_by_config 配置筛选总决策
- join_decision (524) basic_join_decision 最终参与决策
原文件改为 24 行 re-export shim,5 个公共符号全部保留。
- check_contain 16 处外部引用
- should_skip_fudai_by_config 14 处外部引用
- is_watch_task_fudai 10 处外部引用
- basic_join_decision 7 处外部引用
- _is_short_countdown_text 5 处外部引用
全部不需修改。
子包名 fudai_filter_pkg 是为了避免与同目录下的 shim 文件 fudai_filter.py
循环 import(同名包 vs 模块在 Python 中不能并存)。
回归:
- 4 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped(test_filter_logging 29 用例全过)
- 旧 import 路径与新子包路径返回同一函数对象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 16:47:45 +08:00
Codex and Claude Opus 4.7
c0b8ff3ba6
拆分 douyin_pixel (1172 → 4 个子模块 + 33 行 shim)
...
把 douyin/detection/douyin_pixel.py 按职责拆成
douyin/detection/pixel/ 子包:
- _common (32) _safe_open_screenshot_rgb
- popups (444) 优惠券 / 红包 / 抽奖结果弹窗检测
- buttons (340) 参与按钮 / 粉丝团加入红色区域检测
- stage (436) 直播间图标 / 福袋详情 / 综合阶段状态读取
原文件改为 33 行 re-export shim,9 个公共符号全部保留。
detect_fudai_detail_page 等 6 处外部引用、detect_attend_button_red_area
等 2 处外部引用全部不需修改。
回归:
- 5 个新文件 + shim compileall 通过
- pytest 353 passed / 1 skipped
- 旧 import 路径与新子包路径返回同一函数对象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 16:37:06 +08:00
Codex and Claude Opus 4.7
bf7f30996e
拆分 douyin_screenshot_manager (1705 → 6 个子模块 + 79 行 shim)
...
把巨型文件 douyin/handlers/douyin_screenshot_manager.py 按职责拆成
douyin/handlers/screenshot_manager/ 子包:
- _common (79) 共享 logger / 全局状态 / 异步计数器
- paths (205) OCR 目录、调试存档目录、各类路径
- save_files (173) save_latest_attempt / save_last_success / save_*_from_file / cleanup_ocr_dir
- async_save (360) _debug_save_loop + 工作线程启停(global 状态走 _common._state.X)
- cleanup (293) debug_captures 目录清理与轮转
- save_image (731) save_debug_image 主入口(最大头)
原文件改为 79 行 re-export shim,30 个公共符号全部保留。
外部 29 处 save_debug_image / 6 处 save_latest_attempt / 等
import 路径不变,零调用方修改。
回归:
- 子包 7 文件 + shim compileall 通过
- pytest 353 passed / 1 skipped(与拆分前完全一致)
- 旧 import 路径与新子包路径返回同一函数对象
- AST 验证 30 个期望符号全部正确暴露
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 16:25:59 +08:00
Codex and Claude 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
Codex and Claude 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
Codex and Claude Opus 4.7
778c021272
tests: 新增 param_usage_tracker 单元测试 (13 用例)
...
douyin/utils/param_usage_tracker:
- track_param:写一条 / extra 字段合并 / 多次 append / unrepresentable 值兜底
- track_call 装饰器:参数记录 / include_args=False / 保留 __name__ /
异常正常传播 / kwargs 记录
- read_entries:文件不存在 / 读回写入内容 / limit 限制 / 跳过坏行
用 monkeypatch 把 _get_log_path 重定向到 tmp_path,避免污染 state/。
回归:tests/ 344 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 15:11:54 +08:00
Codex and Claude Opus 4.7
ca4941b66d
tests: 新增 ActionLogger + track_action 装饰器测试 (10 用例)
...
douyin/logging/action_logger:
- ActionLogger 5 个 log_* 方法:log_step / log_operation / log_decision /
log_state_change / log_ocr,覆盖带/不带 elapsed、含 kwargs 等场景
- log_operation 大量 kwargs 不应导致格式化失败
- track_action 装饰器:透传返回值、默认用函数名、异常正常传播、kwargs 透传
回归:tests/ 331 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 15:02:08 +08:00
Codex and Claude Opus 4.7
7d31075ce3
tests: 新增 PerformanceTracker 单元测试 (13 用例)
...
douyin/logging/performance_tracker.PerformanceTracker 6 个方法:
- start_timer/end_timer:基本时长测量、未知 id 返回 0、二次 end 幂等
- get_elapsed:进行中 / 未知 / end 后的行为
- track_function:装饰器透传值 + 记录时长 + 异常路径仍记录
- track_step:自定义 name 记录
- get_statistics:空 / 多次平均
回归:tests/ 321 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 14:56:56 +08:00
Codex and Claude Opus 4.7
dba43e18f9
tests: 新增 check_contain + log_formatter 测试 (41 用例)
...
- test_check_contain.py:fudai_filter.check_contain 黑名单关键词检查
* 空黑名单 / 命中 / 未命中 / None / 空字符串
* 命中后短路(不继续遍历)
* 黑名单空字符串关键词不误匹配
* 缺 contains_not_want 属性 / broken _log_kv 兜底
- test_log_formatter.py:9 个格式化纯函数
* format_action_log / format_debug_log / format_error_log(前缀 + tag + 字段)
* format_parameters / format_variables / format_call_stack
* format_exception(含 traceback)
* add_colors(默认绿 / red / 未知颜色兜底)
* add_separators(带/不带 label)
* beautify_log_output / colorize_log_line(不抛 + 一致性)
回归:tests/ 308 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 14:45:49 +08:00
Codex and Claude 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
Codex and Claude 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
Codex and Claude Opus 4.7
f6c9bb938c
tests: 新增 reservation_error_utils 单元测试 (23 用例)
...
覆盖 douyin/reservation/core/reservation_error_utils 4 个工具函数:
- format_reservation_context:空输入 / item / queue / 长字符串截断 /
长队列截 5 项 / kwargs 合并 / 异常输入兜底
- validate_reservation_item:合法项 / 缺字段 / 非字典 / 0/负值 /
格式错误
- safe_write_state:成功 / PermissionError / OSError / ValueError 路径
- log_reservation_error:走 _log_kv / 无 analyser / broken analyser
回归:tests/ 267 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 14:25:35 +08:00
Codex and Claude 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
Codex and Claude Opus 4.7
87d0fe2db8
tests: 把 GUI ⇄ WebUI 配置同步检查纳入 pytest
...
包装 tools/diagnostics/check_web_gui_config_sync.py 为单元测试:
- test_gui_webui_keys_synced:用 check_sync() 检测 GUI 与 WebUI 配置 key 漂移;
失败时打印 "缺哪些 key" + "怎么修复"
- test_manifest_shape:build_manifest() 应产出预期形状 + 共享 key 数量级合理
每次有人改 webui/index.html 或 gui/gui_app.py,pytest 都能立即发现 key 漂移,
避免之前那种"GUI 改了 WebUI 没改"的常见缺陷。
回归:tests/ 244 passed / 1 skipped。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 14:15:14 +08:00
Codex and Claude 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
Codex and Claude Opus 4.7
818c3139b1
docs: 收尾 DEBUG_IMAGE_SYSTEM + ocr_engine_decision 路径
...
- DEBUG_IMAGE_SYSTEM.md: 'path_config.py' → 'douyin/core/path_config.py'
- ocr_engine_decision.md: 'Underlying_Operations.py' → 'douyin/core/underlying_operations.py'
至此活文档(除 docs/完整技术文档.md 头部对照表里的旧→新示例外)已无
裸路径残留。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:38:47 +08:00
Codex and Claude Opus 4.7
941bbc2475
docs: 命令行示例与核显说明改新路径
...
- docs/完整技术文档.md:7 处 'python run_cli.py …' 命令统一改为
'python bin/run_cli.py …',与重构后入口位置对齐(头部小贴士那
一行的示例字符串保留作为对照说明)
- docs/核显GPU加速说明.md:'修改 Underlying_Operations.py' 改为
'douyin/core/underlying_operations.py'
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:35:19 +08:00
Codex and Claude Opus 4.7
c802f62796
docs/完整技术文档: 批量替换叙述性旧路径为新路径
...
把全文(除头部"路径迁移说明"对照表外)所有反引号包裹的旧路径标识符
更新为重构后位置:
- \`Underlying_Operations.py\` → \`douyin/core/underlying_operations.py\` (23 处)
- \`path_config.py\` → \`douyin/core/path_config.py\` (7 处)
- \`run_cli.py\` → \`bin/run_cli.py\` (15 处)
- \`unified_logger.py\` → \`douyin/logging/unified_logger.py\` (1 处)
- \`Underlying_Operations.<method>()\` → \`underlying_operations.<method>()\` (6 处)
头部 "⚠️ 路径迁移说明" 对照表内的旧路径作为示例保留。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:32:35 +08:00
Codex and Claude Opus 4.7
b6d2836e84
docs/完整技术文档: 可执行 import 示例改为新路径
...
8 处 from Underlying_Operations / from path_config / python -c "..."
示例改为 douyin.core.underlying_operations / douyin.core.path_config,
确保读者复制粘贴能跑通。
文档头部"路径迁移说明"表里左侧"旧"列保留旧路径作为对照;正文叙述性
提及(如 "见 Underlying_Operations.get_screenshot() 实现")暂保留,
读者依靠头部表对照即可。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:30:14 +08:00
Codex and Claude Opus 4.7
af4fc9168b
docs/完整技术文档: fudai_detail_modules → douyin/fudai/core/fudai_detail_orchestrator
...
main PR b137aea 把 fudai_detail_modules/ 6 个模块合并到 douyin/fudai/core/,
其中 fudai_detail_reader.py 因与 core/ 已有同名文件冲突,重命名为
fudai_detail_orchestrator.py。
修订文档里 5 处旧引用:
- L155、L236:变更记录里的 fudai_detail_reader.py 改为新位置 + 标注旧路径
- L209:python -c 示例 import 改为新模块路径
- L256:py_compile 示例改为新文件路径
- L523:get_fudai_contain 调用位置改为新位置(顺手把"具体行号"改为
"以代码当前状态为准",因为行号会随重构持续变化,硬编码价值低)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:26:24 +08:00
Codex and Claude Opus 4.7
a84ec29145
docs/DEBUG_IMAGE_SYSTEM: Underlying_Operations.py → douyin/core/underlying_operations.py
...
文件已迁移到 douyin/core/,文档里两处"实现位置"的路径修正为新位置。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 13:21:36 +08:00
Codex and Claude 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
Codex and Claude 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
Codex and Claude 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
Codex and Claude 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
Codex and Claude 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
Codex and Claude 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
Codex and Claude Opus 4.7
c5c8def884
underlying_operations: 52 处 print → _uo_log
...
- 新增模块级 _uo_log(msg, level):与项目其他 print→logger 改造一致的模式,
优先走 logging(带 [OCR]/[截图]/[Underlying]/[警告]/[错误] 前缀),失败兜底 stdout
- 替换的内容包括:
- OCR 引擎初始化 / 延迟初始化(PaddleOCR / EasyOCR 切换)
- exec-out 截图 / 文件替换 / 回退方案的失败日志
- 滑动操作失败 / ADB 输入注入异常
- 中奖截图保存 / OCR 调试输出
- paste_text_at / click 等底层操作的调试输出
- 保留为 stdout:
- 设备选择交互(L220-247,含 input() 提示,需要用户在 stdout 看到)
- _uo_log helper 自身的最终兜底(L73)
回归:146 .py 全量编译通过;underlying_operations 类与 _LOGGER 加载正确;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:54:27 +08:00
Codex
80b35bcb6c
精修 WebUI v34:换主色 — Cyber Lime → Amber × Royal Indigo
...
- 用户反馈不要绿色配色;切换为琥珀橙 + 靛蓝
- primary 浅 #65a30d → #f59e0b (amber-500),深 #a3e635 → #fbbf24 (amber-400)
- on-primary 全部用深字(#1a0f00)保证 amber 上可读
- warning 与 amber 撞色:改 #ea580c (orange-600) / 深色 #fb923c (orange-400) 拉开
- 浅色底从冷青米 #f7f8f3 改暖米 #fbf7ec;深色加微暖 #0c0a07 / #16140e
- mesh blob / shadow-glow / focus-ring / overview-primary-bg / log-bg 全部同步暖系
- 65 个 token + inline 装饰色(rgba 与 hex)批量换色,0 残留绿色
- favicon SVG 同步:amber 渐变 + 深字播放三角 + indigo 装饰圆点
cache-bust v33 → v34
2026-05-21 12:53:05 +08:00
Codex and Claude Opus 4.7
cc1d4f0897
P3: 删除 3 个永远 FAIL 的字符串匹配测试
...
这三个脚本都是 grep 源码字符串模式做"验证",匹配的代码模式在历次重构里
早已改名/拆分/删除,导致它们长期失败、永远不会再 PASS:
- tests/test_delays.py
匹配的注释 "# 点击前延迟1秒" 已不存在于 douyin_yanghao.py
- tests/validation/validate_fudai_mapping_recording.py
匹配的字符串如 "basic_join_decision:设置福袋信息并记录映射表"、
"_record_room_title_and_pos" 已不存在
- tests/validation/validate_reservation_lock_protection.py
匹配的 "参与成功,处理锁定期并移除预约"、"protection_seconds=10" 已不存在
继续保留只会误导新人;该补的是基于行为/接口的真单元测试(pytest 引入再说),
而不是字符串模式断言。tests/validation/ 目录因此变空,一并删除。
剩余 tests/test_filter_logging.py(业务函数测试)继续保留,仍 PASS。
回归:149 -> 146 .py,全量 compileall 通过;test_filter_logging /
check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:43:52 +08:00
Codex
5efa0ebc8b
精修 WebUI v33:字体切换 — IBM Plex Sans + IBM Plex Mono
...
- body font 从 Manrope 改 IBM Plex Sans (Google Fonts)
- mono 从 JetBrains Mono 改 IBM Plex Mono(21 处全替换)
- HTML preload 同步加载 IBM Plex Sans 400/500/600/700 + Plex Mono 400/500/600/700 + Plex Serif (备选)
- 工程感更强、字形更有性格,配 lime × indigo 色系更贴
cache-bust v32 → v33
2026-05-21 12:43:05 +08:00
Codex
0e74bfba77
精修 WebUI v32:换配色 + 全局放大字号
...
配色反转:粉/青 → Cyber Lime × Royal Indigo
- primary:#ec4899 (粉) → #65a30d (lime-700),深色 #f472b6 → #a3e635
- secondary:#06b6d4 (青) → #4f46e5 (indigo-600),深色 #22d3ee → #818cf8
- on-primary:#ffffff → #0a1502 / #06120a (lime 上需深字保证可读性)
- 浅色 base 改暖青米白 #f7f8f3,深色改深炭蓝 #0a0c10 / #12161e (整体更冷静)
- mesh blob / shadow-glow / focus-ring / status ring 等所有彩色装饰同步换色
- favicon SVG 也同步:lime 渐变 + indigo 圆点
字号 / 控件全局放大
- token: text-xs 11→12, sm 12→13, base 13→15, md 14→16, lg 16→18, xl 22→24, 2xl 32→36
- leading-snug 1.35→1.4, leading-normal 1.5→1.55
- control-height 34→38px, rail-width 216→232px
- 硬编码 font-size 全部 +2px(脚本批量映射 9→11..16→18,反向顺序避免链式覆盖)
- min-height 30/32/34/36 → 32/34/36/38
cache-bust v31 → v32
2026-05-21 12:39:42 +08:00
Codex and Claude Opus 4.7
c92af75d02
docs/完整技术文档: 头部加路径迁移说明
...
文档主体(7363 行)撰写于项目大重构之前,正文中仍存在大量旧路径
(Underlying_Operations.py / path_config.py 在根目录,run_cli.py / gui_app.py
不在 bin/ 等)。全面改写风险高,改为在文档头部加一段醒目的"路径迁移说明",
列出新旧路径映射,让读者遇到旧路径时能查得到对应位置。
收益:
- 不破坏现有内部链接 / 锚点
- 读者一眼就能找到新旧路径对照
- 入口脚本(bin/)仍有根目录 launcher,文档里 python run_cli.py 命令仍可用
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:18:58 +08:00
Codex and Claude Opus 4.7
6ac99530d6
docs/README: 补登 ocr_engine_decision.md
...
main PR #6 新增了 docs/ocr_engine_decision.md(OCR 引擎选型决策记录),
但 docs/README.md 索引未同步。补到「系统说明(活文档)」分组。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:15:51 +08:00
Codex and Claude Opus 4.7
0c62696118
P3: 清理过期 TODO + 修正过期路径注释
...
- operations/__init__.py:
- 模块描述里 "Underlying_Operations.py 模块化" 改为
"douyin/core/underlying_operations.py 模块化拆分"(原文件已迁移)
- 删除 "TODO: 逐步迁移后改为从子模块导入"——
导入是有意保留的向后兼容层,不是待办
- douyin/reservation/core/__init__.py:
- 删除 "临时导入" "TODO: 迁移完成后改为从子模块导入"
- 这个 re-export 层也是有意保留的向后兼容设计
回归:140 .py 编译通过;operations + reservation.core 模块加载 OK;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:13:31 +08:00
Codex
9c3cf86f41
精修 WebUI v31:运行状态指示 / tab burst / 截图入场 / 数字千分隔符
...
logHeader 状态 pill
- logTitle ::before 圆点改 6px 渐变(粉→青)+ 6px primary halo
- ::after 加状态 chip:默认 "PAUSED" muted;body.is-running 时切 "● LIVE"(success 色 + glow border)
侧边导航 burst 反馈
- tab 切换时 sideNav 加 isBurst 类 380ms,触发 ::before 横/纵向 scaleY 1.3 / scaleX 1.6 的脉冲 + 光晕加强(10→18px)
- 同 tab 二次点击不触发;prefers-reduced-motion 下不动
截图入场动画
- preview img 从 opacity 0 + scale(0.985) → opacity 1 + scale(1),280ms 缓出
- 删除一处旧的重复规则
数字千分隔符
- 新增 fmtNum() 工具函数(toLocaleString en-US 千分隔,PID/Trace 不走)
- statLogLen / 9 个福袋统计 / 跳过 / 切换直播间 / 粉丝团等字段全部 fmt 化
- 大数字现在显示 "12,345" 风格,配合 JetBrains Mono tabular-nums 更易读
cache-bust v30 → v31
2026-05-21 12:11:09 +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
7001919642
精修 WebUI v30:进程心跳 / 滚动条 / 骨架 / 取景器 hover / SVG glow
...
全局 running 信号
- body.is-running 在视口顶部 fixed 2px 粉→青→粉横向 sweep glow line
- 2.8s 横向滚动 + 4px primary drop-shadow,进程"心跳"信号
滚动条
- 全局 webkit-scrollbar-thumb 改 180deg 粉→青渐变(55% mix)
- hover 升级为纯色 primary→secondary 渐变
骨架屏
- shimmer 渐变改为粉/青双色横扫(35% / 65% 节点 22% mix)
- 节奏 1.6s → 1.8s 更柔和
截图区取景器
- previewBracket hover 时 18→22px + drop-shadow 6→10px primary 75%
- 尺寸 + glow 同步过渡
Timeline 折线
- SVG defs 加 feGaussianBlur (1.6) + feMerge glow filter
- 折线 stroke-width 1.5→1.8 并应用 filter,霓虹光晕
- 与 chart hover 渐变协同
cache-bust v29 → v30
2026-05-21 12:03:44 +08:00
Codex
95255a4498
精修 WebUI v29:tooltip / 小按钮 hover / toggle / chevron / 深色复查
...
Tooltip
- 字体改 JetBrains Mono 10px 0.04em + text-strong;padding 加大;border 改 primary 35% mix
- box-shadow 三层:1px primary 描边 + 14px primary 40% halo + blur 10px
- 箭头方块同步换 primary 描边 + 90% mix 背景
小图标按钮统一 hover glow
- copyBtn / toastClose / shortcutsClose hover 改 primary 染色 + primary-soft 60% 背景 + 10px primary 45% halo
- 比之前的 muted 灰更有反馈感
Toggle switch
- checked 状态从单色 primary 改 90deg 粉→青渐变 + 12px primary 55% halo
- 圆球 thumb checked 时加 8px primary 40% glow
- focus-visible 在 focus-ring 之外再叠 12px primary halo
details/summary chevron
- 从 currentColor mask 改 linear-gradient (粉→青) mask + drop-shadow 4px primary 50%
- open 时旋转 90° + halo 升至 6px 70%
- 尺寸 10px → 14px
深色主题对比度复查
- mesh blob 不透明度全部 -2%(0.16/0.14/0.12 → 0.14/0.12/0.10),避免大背景过亮干扰阅读
- grain noise opacity:浅色 0.4→0.28,深色 0.6→0.35,保留质感但降低噪点强度
cache-bust v28 → v29
2026-05-21 12:03:44 +08:00
Codex
540ee24861
精修 WebUI v28:主容器 / panel / stat 卡 / 浮动按钮整体升级
...
主 Header
- 加 4% primary 顶部渐变 + radius-lg 顶部 hairline 改 65/65% 粉→青双色
- isScrolled 时边框改 primary-border + 24px primary halo box-shadow
- ::after 加 1px sweep glow line(200% 横向,6s 循环),仅 isScrolled 时 0.45 不透明显示
- secondaryActions 分隔线改渐变(透明→粉→透明),margin 增大
panel 容器
- 加 radial 双角光晕(左上粉 6% + 右下青 5%)+ surface
- 顶部 hairline 60% 双色渐变
- padding 18→22/24px 给装饰呼吸空间
- hover 时 border 30% primary mix(subtle)
工作区标题
- Eyebrow 字体改 JetBrains Mono 10px 0.18em + 6px 渐变圆点 + glow
- workspaceTitle 字号从 text-xl(22) 升至 26px + 700 weight + -0.02em 字距
stat 卡片
- 普通 stat:position relative + ::after 顶部 hairline (hover 时显示) + ::before 左侧 2px accent (跟 stateOk/Warn/Error 自动着色)
- hover 改 primary-soft 30% mix + 18px halo + 1px primary 描边
- statHero:加 8% primary radial + primary 22% border + 12% inner ring + 35% halo;::before accent 强制 primary→secondary 渐变
- statValue 字距 -0.015 → -0.025
浮动按钮
- scrollTopBtn 36→38px;border 用 primary 30% mix;背景加 radial 16% primary 圆光
- box-shadow 16px primary 30% halo;hover 时升至 24px 50% halo + 颜色全染 primary
cache-bust v27 → v28
2026-05-21 12:03:44 +08:00
Codex
b161a2c4a6
精修 WebUI v27:表单焦点光晕 + 图表渐变 + 浮层质感
...
表单 / 输入控件
- input/select/textarea caret-color 改 primary 粉
- focus-visible 三层光环:1px primary + 4px 22% halo + 14px 40% glow + 背景渐变到 primary-soft
- hover 改 primary-border(之前是 hover-border 灰)
- IP / port / path / number / yanghao_ 系列字段自动用 JetBrains Mono + ss01 + tnum
配置搜索框
- 同款三层 focus 光环;focus-within 时 search icon 染 primary
- kbd 徽章从 muted 改 primary 描边 + primary-soft 6% 背景 + primary-accent-text 粉字
- clear 按钮 hover 背景改 primary-soft
工作区头部
- 左侧 accent 改 3px primary→secondary 渐变 + 12px primary glow
- 加 ::after 顶部 hairline (粉→青渐变)
图表
- chartBlock 加 radial pink 角光 + 顶部 hairline + hover 1px primary 描边 + 22px halo
- chartTitle 字体改 JetBrains Mono 11px 0.1em uppercase + 6px 渐变圆点 (粉→青) + glow
- barTrack 加 inset 1px 阴影;barFill 改 cyan→pink 横向渐变 + 8px halo + ::after 跑光 shimmer 2.4s
- barValue 改 JetBrains Mono + ss01 + tnum
Toast
- 左侧 accent 条改成上下渐变(不再单色)
- icon 包圆形 chip:22×22 圆 + 12% 同色 mix 背景 + 60% 同色 10px halo
帮助层 (shortcutsCard)
- 顶部加 hairline 粉→青渐变(70% 不透明)
cache-bust v26 → v27
2026-05-21 12:03:44 +08:00
Codex
ac55428640
精修 WebUI v26:HUD 细节 — 把 chrome 全部往"控制台"推
...
侧边导航
- sideNav 加渐变粉头部 + counter-reset 通道编号;浮动指示条改 3px 粉→青渐变 + 10px glow
- tabBtn 左侧加 [01]–[11] mono 计数器(::before 用 counter() 生成);hover 时编号变粉
- tabBtn 右侧加可见性切换的 cyan dot(hover 0.7 / active 1)
- active:左渐变背景 + 1px primary 描边 + 编号高亮 + dot glow
- icon 颜色 hover/active 跟随 primary
章节标题
- sectionTitle 字体改 JetBrains Mono 10px 0.12em;圆点改"§ 01" 编号 chip(mono、leading-zero、primary 描边)
- ::after 加横线延展到右侧,渐变粉→透明
- 配置面板顶层加 counter-reset,每个 panel 内部继承计数
卡片
- cardTitle 加状态 chip(::after):默认 "READY",body.is-running 时切 "● LIVE"(绿色 + glow)
- cardTitle .sectionIcon 升级渐变填充 + primary glow
表格
- tableRow 加左侧 hover 渐变 accent stripe(粉→青)
- hover 背景从 surface-soft 改 primary-soft 30% 混合
- tableHead 改 JetBrains Mono 10px + primary 色 + 1px primary 描边 + 渐变背景
- mono 字段全局加 ss01 + tnum
预约卡
- 头部加 radial gradient 粉光晕(右上角)
- reservationItem hover 时左侧 3px 粉→青渐变 accent + 28px halo + translateY(-1)
- reservationIndex dot 改 radial pink + 8px glow
- reservationValue chip 改 JetBrains Mono 0.12em uppercase 粉色 pill
- isImminent / isDue 状态加 radial 警告/危险光晕底
日志
- log 字体改 JetBrains Mono + ss01;padding 加左侧 18px 留出光标位
- background 加 4px 周期性扫描线(cyan 4% mix)
- ::after 加 6×13 粉色光标 1.2s 闪烁(CRT 风)
Footer HUD
- 加 mono 12px / 0.12em 全大写;border-top 改 primary 22% mix
- 左:连接点 + 文字 + "SYS_OK" chip
- 右:PING <em>—</em>ms(实测 /api/version 响应时间,5s 一次)+ FPS <em>—</em>(每秒 RAF 计数)+ version + build
- em 内文字用 secondary/primary 色,mono 数字突出
- 移动端隐藏 PING/FPS
cache-bust v25 → v26
2026-05-21 12:03:44 +08:00
Codex
6fb7707abb
精修 WebUI v25:基调反转 — Operator's Terminal × Editorial
...
打破之前 Linear 极简,转向更装饰、更有质感的"控制台"美学。
字体与基调
- 字体栈:Manrope (body) + JetBrains Mono (数字/HUD) + Instrument Serif (备选),全部 Google Fonts
- 主色反转:Linear 紫 (#5e6ad2) → 抖音霓虹粉 (#ec4899) + 青蓝 (#06b6d4) 双 accent
- 浅色 base 改暖米白 (#fafaf7);深色改深蓝黑 (#08080c) 提亮饱和度
- body 加双层装饰:3 个 radial-gradient mesh blob + SVG turbulence grain noise (overlay 混合)
品牌标识
- brandMark 升级:6 段 conic-gradient (粉→品红→深粉→青→蓝青→粉);高光 radial drift 9s 缓慢动画;hover scale 1.03
- 内部加 SVG drop-shadow 让 logo 与彩色背景对比
按钮
- btnPrimary:linear-gradient (粉粉粉) + ::before 双层 mask conic 边框 hover 时 1.6s 旋转 + 6→10px 彩色 halo + text-shadow
- btnDanger 同款(红橙红)
- btnSoft hover 时显示粉色微光晕;btnDangerSoft hover 加 4px halo
- 所有按钮 hover translateY(-1px),active 回弹
卡片
- .card 顶部彩色 hairline (粉→青渐变),hover 时 opacity 0.45 → 0.85;hover 时 box-shadow 加 1px primary 描边 + 28px halo
- .overviewCard 同款顶部 hairline + 左侧 3px accent (primary 卡是 primary→secondary 渐变);hover translateY(-1px) + 32px halo
数字 hero
- overviewValue / statValue 改 JetBrains Mono + ss01 字符变体 + tnum + -0.025em 字距;深色主题加 24px primary glow text-shadow
状态点
- statusRunning 改 radial-gradient (mint→success) + 双色环涟漪(success + secondary 错峰 0.9s)+ 8/16px 双层光晕
- statusError 改 radial-gradient (粉→danger) + 12px halo + 1.6s pulse
实时截图区
- 加 4 个角的 viewfinder 取景器 brackets(primary 色 + drop-shadow glow)
- 运行中显示 REC 角标(红圆点 1s 闪烁 + 毛玻璃背景 + JetBrains Mono 字号)
- 空状态加 mesh radial blob (粉/青双色) + 加强扫描线对比
- hover 加 36px primary halo + box-shadow
cache-bust v24 → v25
2026-05-21 12:03:44 +08:00
Codex and Claude Opus 4.7
4f147d214e
P2 §5.3: 4 处单点 importlib.import_module → 静态 from import
...
把单次调用 douyin_screenshot_manager 的 importlib 改为 from-import:
- douyin/core/douyin_flow_control.py
- douyin/core/underlying_operations.py
- douyin/fudai/core/fudai_debug_utils.py
- douyin/stage/douyin_stage.py
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 4 个文件
无循环依赖,可以安全静态化。bin/run_cli.py 的 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销
回归:140 .py 编译通过;4 处 importlib 残留全清;
test_filter_logging / check_web_gui_config_sync 通过;
douyin_screenshot_manager 仍可正常加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:01:16 +08:00
Codex and Claude Opus 4.7
0700a378ec
stage + reservation: 孤立 print → logger
...
- douyin/stage/douyin_stage.py:阶段诊断起始处的 [DEBUG] print 改为
_LOGGER.debug,原本是诊断日志,走 logging 更合适
- douyin/reservation/douyin_reservation.py:当 _RESERVATION_ERROR_UTILS
不可用时的 print 兜底改为 _LOGGER.error,避免日志静默丢失
- 两处都新增模块级 logger
回归:140 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 11:52:28 +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
zzz
7dd1c3ea88
Merge pull request '切换 OCR 默认引擎到 PaddleOCR v4-mobile 并简化预处理' ( #6 ) from claude/compassionate-sammet-469997 into main
...
Reviewed-on: #6
2026-05-21 11:37:35 +08:00
zzz
10ad6575c7
Merge branch 'main' into claude/compassionate-sammet-469997
2026-05-21 11:36:48 +08:00
Codex and Claude Opus 4.7
9a51b41c3d
docs: 归档过期报告 + 整体迁移 docs/optimization → docs/archive/optimization
...
A. docs/ 根目录下 5 篇过期/迁移类文档归档到 docs/archive/
- LOGGING_IMPROVEMENTS.md (日志系统迭代报告,与 archive/日志系统优化说明.md 重复)
- OCR性能分析报告.md (历史性能分析)
- 统一截图和分数记录说明.md (重构方案,已合并到代码)
- AI_PROJECT_SUMMARY.md (提到的 Underlying_Operations.py / path_config.py 路径已与 main 重构后不一致)
- param_usage.md (模块使用说明,零引用,模块本身有 docstring)
B. docs/optimization/ 整目录归档为 docs/archive/optimization/(7 篇)
- ADB_EXECOUT_OPTIMIZATION / OCR_PERFORMANCE_OPTIMIZATION
- SCREENSHOT_PERFORMANCE_DIAGNOSIS / SCREENSHOT_VERIFICATION_GUIDE
- STREAMING_SCREENSHOT_DISABLED / STREAMING_SCREENSHOT_COMPLETELY_DISABLED
- optimize_file_replace
全部是优化报告 / 已禁用功能记录,属于历史迭代而非活文档
C. docs/README.md 重写为按主题分组的索引,明确"活文档 vs 归档"边界
保留为活文档:
- 日志系统规范文档.md(被 3 处引用)
- 日志轮转功能说明.md(描述当前在用的轮转策略)
- 截图服务日志说明.md(描述当前服务行为)
- 完整技术文档.md / 流程图.md / 预约系统详细流程.md / 高价值房间重访功能说明.md
回归:纯文档归档不影响代码;140 .py 全量编译通过;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 11:19:28 +08:00
Codex
0131be7869
切换 OCR 默认引擎到 PaddleOCR v4-mobile 并简化预处理
...
- 默认引擎改为 PaddleOCR PP-OCRv4_mobile(实测 369ms/张,比 EasyOCR 629ms 更快且精度大幅提升,coupon 等关键图错字一片 -> 全对)
- EasyOCR 仅作回退,移除"小图自动放大+锐化+对比度增强"预处理(实测对 Paddle 是负优化,会引入伪影/重复字)
- analyse_pic_word 加 LRU 内容哈希缓存(256 条),重复读图直接命中
- analyse_pic_digits 从 200 行重复实现精简成 30 行委托 + 数字过滤
- 统一两处 OCR 初始化为 _build_paddle / _build_easyocr 工厂,消除重复
- 设置 FLAGS_use_mkldnn=false 绕开 Win + Paddle 3.x 的 oneDNN+PIR 不兼容 bug(实测 FLAGS_enable_pir_in_executor=0 也修不掉,关 oneDNN 是当前唯一可行解)
- 决策依据/速度数据/已知问题归档到 docs/ocr_engine_decision.md
- 业务接口完全向后兼容
2026-05-21 10:50:30 +08:00
Codex and Claude 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
zzz
c878491163
Merge pull request 'claude/wonderful-brattain-d1cfe0' ( #5 ) from claude/wonderful-brattain-d1cfe0 into main
...
Reviewed-on: #5
2026-05-21 10:26:16 +08:00
zzz
6ef04c1f37
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
2026-05-21 10:24:10 +08:00
Codex and Claude 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
zzz
521b7b9e84
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
2026-05-21 10:17:23 +08:00
Codex and Claude Opus 4.5
b96a67b6b8
refactor: web_gui 中 5 个 ADB/config 函数改为薄包装
...
find_adb_executable / list_adb_devices / resolve_adb_device /
read_config / write_config 在 gui_core.py 中已有完全相同的实现。
web_gui.py 中改为薄包装,所有外部使用保持兼容。
注:get_nested_value 是 web_gui 独有,保留。
文件行数:gui/web_gui.py 原 2253 行减至 2210 行(约减 43 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 10:12:38 +08:00
Codex and Claude Opus 4.5
7d63a36125
chore: 删除重复的 log_color_config_fixed.py
...
log_color_config.py (540行) 与 log_color_config_fixed.py (198行) 的
get_operation_type / get_color_config / apply_operation_color 行为完全一致。
保留前者(更完整),删除后者,简化 actions_log_viewer.py 的双 try import。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 10:12:38 +08:00
zzz
0a0b59c908
Merge pull request 'claude/wonderful-brattain-d1cfe0' ( #4 ) from claude/wonderful-brattain-d1cfe0 into main
...
Reviewed-on: #4
2026-05-21 09:58:35 +08:00
zzz
2e811e71b3
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
2026-05-21 09:58:24 +08:00
Codex and Claude Opus 4.5
73cfb50a2b
chore: 删除 fudai_core 中的未使用 import
...
去除大规模拆分后剩余的死 import:
- PIL.Image (未引用)
- numpy as np (未引用)
- douyin_reservation_logic (未引用)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:49:38 +08:00
Codex and Claude 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
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.7
96f8600d42
小批量收尾:删除零引用 scrcpy_screenshot + douyin_fudai/log_viewer print→logger
...
- 删除 operations/scrcpy_screenshot.py(100 行,仅自身定义自身使用,全仓零外部引用)
- douyin/core/douyin_fudai.py:3 处兜底 print → logging.info/warning(_log_kv 失败时的兜底路径)
- gui/components/log_viewer.py:2 处错误 print → _LOGVIEW_LOGGER.exception(日志线程异常 / 刷新显示异常)
回归:149→148 .py,全量编译通过;test_filter_logging / check_web_gui_config_sync 通过;
fudai_analyse 类正常导出,log_viewer 模块加载 OK。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:40:18 +08:00
Codex and Claude Opus 4.7
938011f672
douyin_screenshot_manager: print → _mgr_log
...
- 新增模块级 _mgr_log(msg, level):统一走 logging,失败兜底 stdout
- 全部 21 处裸 print 改为 _mgr_log,保留 "[截图管理]" / "[调试图像清理]" 前缀
回归:149 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
get_latest_attempt_path / get_last_success_path / ensure_ocr_dir /
shutdown_debug_save_worker 等公共函数仍可加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:39:19 +08:00
Codex and Claude Opus 4.7
04035abbc0
douyin_robot: print → _robot_log
...
- 新增模块级 _robot_log(analyser, msg, level):优先 analyser._log_kv("人机校验" 类目),
退化到 logging,最后兜底 stdout
- 全部 10 处裸 print → _robot_log
- "无法处理 + 等待30分钟" 类提示标 level=WARNING
- check_robot_pic_distance 中的 print(x, y) 与 print(x1, first_y) 改为 DEBUG 级,
附带"找到首/末像素"语义说明
回归:149 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
3 个公共函数(check_have_robot_analyse / deal_robot_analyse / check_robot_pic_distance)
仍可正常加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:38:57 +08:00
Codex and Claude Opus 4.7
a876d9ebb0
gui/web_gui: 内部错误 print → _wg_log,保留启动横幅
...
- 新增模块级 _wg_log(msg, level):与 yanghao/screenshot 同模式
- 内部错误(日志写权限/失败、静态文件、logs search/get_logs_since)
6 处 print → _wg_log,分级 WARNING/ERROR
- main() 内的 7 处 print 保留为 stdout:启动端口/URL/中断退出/帮助提示
属于交互/CLI 输出而非日志事件,走 stdout 更直观
回归:149 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:38:47 +08:00
Codex and Claude Opus 4.7
5a381698d8
operations/{screenshot,ocr}_operations: print → logging
...
- screenshot_operations.py: 19 处 print → _ops_log(带 [截图]/[截图操作] 前缀)
- ocr_operations.py: 7 处 print → _ocr_log(带 [OCR] 前缀)
- 两处都新增模块级 logger + 兜底 helper,与 douyin_yanghao / screenshot_service
采用相同模式
回归:149 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
ScreenshotOperations、analyse_pic_word 仍可正常加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:38:07 +08:00
Codex and Claude Opus 4.7
4557dfb306
operations/screenshot_service: print → logging
...
- 新增模块级 _svc_log(msg, level):统一走 logging,失败兜底 stdout
- 全部 24 处 print 改为 _svc_log,保留消息中"[截图服务]"前缀以兼容历史搜索
- 默认 level=INFO,告警分级(WARNING/ERROR 等)后续再细化
回归:149 .py 全量编译通过;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:37:56 +08:00
Codex and Claude Opus 4.7
49704834d8
douyin_yanghao: print → _yanghao_log + 修 3 处 f-string bug
...
- 新增模块级 _yanghao_log(analyser, msg, level):优先走 analyser._log_kv,
退化到模块 logger,最后兜底 stdout,避免日志静默丢失
- 全部 58 处裸 print 改为 _yanghao_log 调用
- 修 3 处 f-string 缺前缀 bug({prob} 之前是字面量而非插值):
L440 跳过点爱心、L466 跳过点收藏、L498 跳过评论的概率显示
回归:全量 149 .py compileall 通过;douyin_yanghao 4 条 helper 路径
(_log_kv / broken _log_kv / 无 _log_kv 兜底 / 4 个 yanghao_* 顶级函数)
全部 PASS;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 09:37:46 +08:00
Codex and Claude Opus 4.5
41c3f28eb7
chore: 删除死文件 douyin/fudai/core/fudai_detail_reader.py
...
该文件只有一个函数 get_fudai_contain(1217 行),但无任何模块
import 它。所有调用方都用的是 douyin_fudai_core.get_fudai_contain。
注:本次 fudai_detail_modules/ 合并时引入的 fudai_detail_orchestrator.py
里的 get_fudai_contain 引用是从 douyin_fudai_core 来的,与本文件无关。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:36:48 +08:00
Codex
16b3bde893
精修 WebUI 第二十一轮:kbd 提示 / 标题反馈 / 趋势箭头
...
- 关键按钮 kbd 提示:[data-kbd-mod="1"][data-kbd] 自动按平台注入 ⌘ 或 Ctrl 前缀;hover 时不透明度从 0.55 → 1;btnStart 显示 "⌘ ↵",btnSave 显示 "⌘ S";<900px 隐藏
- 页面 title 随运行状态:默认 "抖音挂机控制台",运行中前置 "● ... · 运行中"
- stat 数字趋势箭头:setTextIfExists 检测数值变化方向,向 .statValue 注入 .statTrend ▲/▼ 圆形徽章 (success/danger 色),1100ms 出现 + 淡出再自动移除
- cache-bust v23 → v24
2026-05-21 09:29:38 +08:00
Codex
df96f25eba
精修 WebUI 第二十轮:Favicon + 长按连发 + 刷新反馈
...
- 添加内联 SVG favicon(与 brandMark 同款:紫色渐变圆角方框 + 播放三角 + 圆点),data URL 不增加请求
- number stepper 长按连发:pointerdown 后 500ms 进入 80ms/次的连发;pointerleave/up/cancel/blur 全部取消
- btnRefresh 加 isBusy 状态 + spinner;完成后 toast 反馈"已刷新 · N 台在线"或"无在线设备"或失败提示
- cache-bust v22 → v23
2026-05-21 09:29:38 +08:00
Codex
cea5f1df45
精修 WebUI 第十九轮:sticky elevation + toggle switch + 步进按钮
...
- sectionTitle sticky 真贴顶时(IntersectionObserver + sentinel rootMargin -65px)加 .isStuck 类,浮起 0 6px 12px 阴影
- 关键开关升级为 toggle switch:.check.isToggle 把 input[type=checkbox] 渲染成 32×18 滑块(slider 配 14×14 圆点 + 0.18 阴影);3 个总控开关接入:infinite_loop_enabled / yanghao_enabled / yanghao_enable_actions / yanghao_only
- fmtDuration 改 mono 格式:HH:MM:SS / MM:SS(padStart),适配 tabular-nums
- 自绘 number stepper:所有 .input[type=number] 自动包 .numStepperWrap,hover/focus 时右侧浮现 ▲▼ 微按钮(18×12 双按钮组),调用 stepUp/stepDown + 派发 input/change;inline2 内不加避免连体冲突
- cache-bust v21 → v22
2026-05-21 09:29:38 +08:00
Codex
f16eadbd75
精修 WebUI 第十八轮:后端 /api/version + 预约卡 hover accent
...
- 后端 gui/web_gui.py 新增 GET /api/version:返回 {name, version, build},前端 footer 自动从 cache-bust fallback 切换为真实版本号
- 预约卡 .reservationItem hover 时左侧浮现 2px primary accent 条;isImminent / isDue 状态下不显示(避免与 warning/danger 边框冲突)
- 高价值直播间共用 reservationItem 视觉,自动获得相同 hover accent
- cache-bust v20 → v21
2026-05-21 09:29:38 +08:00
Codex
632951d004
精修 WebUI 第十七轮:sticky 章节 / 语义着色 / 搜索计数 / 空状态升级
...
- sectionTitle 改 sticky 在长 panel 内吸附顶部,背景渐变 + 6px 模糊;cardTitle/summary 不变
- 福袋统计语义着色:参与成功/中奖 → success;失败 → error;未中奖 → muted;通过 .stateOk/.stateError/.stateWarn/.stateMuted 类切换
- 配置搜索右侧加实时匹配计数徽章("X 项");搜索清空时隐藏
- 空状态占位升级:从单色边框圆点 → 28px 聊天泡 SVG icon (currentColor mask) + 双行布局,更显设计
- cache-bust v19 → v20
2026-05-21 09:29:38 +08:00
Codex
51d8d53a2b
精修 WebUI 第十六轮:滚动顶按钮 / 连体按钮组 / 图表 hover / 徽章
...
- 滚动 floating 按钮:scrollY > 240 时右下方显示,毛玻璃圆形,平滑滚回顶部;移动端调高避让 toast
- WiFi ADB 操作改 .btnGroup 连体组合:共享圆角、中间无双边、focus z-index 抬起
- timeline 图加 hover 十字线 + tooltip:crosshair 跟随光标 snap 到最近 bin,浮层显示该 bin 的所有系列与时间,无事件显示空状态
- tabBtn[data-badge] 数字徽章:active 时反色 primary;预约数据更新时同步预约 tab 的徽章
- cache-bust v18 → v19
2026-05-21 09:29:38 +08:00
Codex
94e8d37d18
精修 WebUI 第十五轮:设备下拉框状态点
...
- decorateDeviceSelect: 把 #device select 包裹进 .deviceSelectWrap,在右侧自定义箭头之前插入状态点
- 状态点:选中具体设备或自动模式下有在线设备 → 绿色 ok;无设备 → 灰色 idle;refreshDevices/change 时更新
- cache-bust v17 → v18
2026-05-21 09:29:38 +08:00
Codex
16042d7fd2
精修 WebUI 第十四轮:过渡动画与移动端收敛
...
- 主题切换平滑:body 加 200ms color/background 过渡;切换时给 :root 临时加 isThemeSwitching,对所有 chrome 表面(header / card / panel / btn 等 18 类)启用 200ms 过渡;260ms 后移除避免长期影响
- 首屏 .app 容器淡入:220ms fadeIn + 微移
- 移动端 (<640) 收敛:subtitle 隐藏(保留 brandMark + title);footer appConnText 隐藏只留状态点
- cache-bust v16 → v17
2026-05-21 09:29:38 +08:00
Codex
a40ddc3083
精修 WebUI 第十三轮:动效、语义着色与帮助系统
...
- panel 切换动画:active 加 fadeIn (220ms) 替换无差别 surfaceIn,tab 切换更有反馈
- statValue 加 stateOk/stateMuted/stateError 语义着色:运行中显示 success 色(hero metric),未运行用 muted
- 预约卡倒计时实时刷新:startReservationsCountdownTick 每秒 tick,更新 .reservationRemain 文字 + isImminent/isDue 类,无需等 stats 轮询
- ? 快捷键弹出帮助 overlay:列出 ⌘K/⌘S/⌘Enter/Esc/?;ESC 或点击遮罩关闭;带毛玻璃 + scale 进出动画;输入框聚焦时不拦截
- cache-bust v15 → v16
2026-05-21 09:29:38 +08:00
Codex
3295cb3d6f
精修 WebUI 第十二轮:质感打磨
...
- brandMark 改为三档 OKLCH 渐变 + 高光 radial-gradient + hover 微浮起
- tabBtn hover 与 active 用 surface-muted ↔ primary-soft 混合,更稳的层级感
- footer 连接点 ok 状态加涟漪扩散动画(footerRipple)
- logSection: 圆角 v-md / hover border 提亮 / logHeader 渐变背景 / logTitle 加 4px 圆点 / logHeaderActions select 自绘箭头适配紧凑高度
- cache-bust v14 → v15
2026-05-21 09:29:38 +08:00
Codex
cdaa9e4c69
精修 WebUI 第十一轮:信息层级与视觉重音
...
- overview hero metric 字号 20→26px (text-2xl),紧字距,更接近 Vercel/Linear 的指标卡
- overviewLabel 改 10px uppercase,padding 提至 16/18px
- stats 第一行(运行/PID/运行时长)拆为 statsGridHero + .statHero 大卡,与下方密集网格区分主次
- cardTitle 图标改 chip 风:26×26 圆角填充容器,primary-soft 底 + primary-border 描边
- sectionTitle 加左侧 4px primary 圆点 accent;cardTitle/summary 上的 sectionTitle 不显示
- cache-bust v13 → v14
2026-05-21 09:29:38 +08:00
Codex
8b8e3129e5
精修 WebUI 第十轮:交互终章
...
- header 滚动时加 isScrolled 类:阴影提一档显得"浮起",区分内容区
- 键盘快捷键:⌘S/Ctrl+S 保存配置,⌘Enter/Ctrl+Enter 启动运行;尊重按钮 disabled 状态
- 通用 tooltip 系统:[data-tooltip] + 可选 data-tooltip-pos="bottom",带小箭头与毛玻璃;移动端禁用避免触摸浮悬
- btnTheme / btnShotFullscreen / 复制按钮 全部接入 tooltip
- cache-bust v12 → v13
2026-05-21 09:29:38 +08:00
Codex
0a2d67afb4
精修 WebUI 第九轮:overview 福袋卡迷你 sparkline
...
- 福袋处理卡片底部加入 22px 高 sparkline,合成 fudai_open_detail + fudai_attend_ok 两条序列为一条折线
- 渐变填充 + 折线双层;用 currentColor 保证主题切换自动跟随;数据少于 2 点时隐藏
- pollStats 触发渲染,与主时间轴同源数据
- cache-bust v11 → v12
2026-05-21 09:29:38 +08:00
Codex
d1f153b373
精修 WebUI 第八轮:可复制 + 全屏 + 表格细节
...
- statValue 一键复制:PID 和 TraceId hover 显示复制按钮,点击调用 navigator.clipboard,带 toast 反馈与 fallback (textarea + execCommand)
- setTextIfExists 改为只更新文本节点,保留子元素(如 .copyBtn 不被覆盖)
- 截图区右上角加全屏按钮(hover 显示):调用 requestFullscreen,失败则新窗口打开;左下角浮层显示截图时间戳,毛玻璃背景
- 表格行:默认 ellipsis 截断,hover 时展开为多行换行
- cache-bust v10 → v11
2026-05-21 09:29:38 +08:00
Codex
857b33f413
精修 WebUI 第七轮:底部状态栏 + 实时反馈
...
- 底部 appFooter:左侧连接状态点(idle/ok/error 3 态 + tooltip)+ 文字;右侧版本号 + 构建标识;移动端纵向排列
- API 连接状态实时指示:apiGet/apiPost 拦截成功失败,连续 2 次失败才标 error,避免抖动
- 版本号:尝试拉 /api/version;失败时回退到 cache-bust tag
- stat 数字变化时短暂闪 primary 色(statFlash 700ms),通过 setTextIfExists 自动触发
- number input 隐藏原生上下箭头 + tabular-nums 数字
- cache-bust v9 → v10
2026-05-21 09:29:38 +08:00
Codex
07700c24d9
精修 WebUI 第六轮:交互精致度
...
- 配置搜索加 ⌘K / Ctrl+K 快捷键聚焦 + ESC 清空/失焦;右侧带 kbd 提示徽章(输入或聚焦时自动隐藏;移动端不显示);自动按平台显示 ⌘ 或 Ctrl
- 按钮 .isBusy 状态加旋转 spinner(隐藏图标),禁用 pointer-events
- 即将开奖预约(剩余 ≤60s)加 isImminent 类:warning 边框 + 微脉动 + value pill 反白;已到时间加 isDue(danger 边框 + 反白)
- brand logo 重做:圆角方形容器 + 内嵌播放三角 + 装饰圆点,更具品牌识别度
- 侧边导航 active 指示条改为 sideNav::before 浮动滑块,CSS var 控制 Y/H,切换 tab 时 220ms 滑动;resize/字体加载完成自动重算位置;横向布局自动隐藏
- cache-bust v8 → v9
2026-05-21 09:29:38 +08:00
Codex
96cba09c49
精修 WebUI 第五轮:交互能力与功能性升级
...
- 新增 Toast 通知系统:右下角浮出(移动端横铺底部),4 类(success/error/warn/info)+ 关闭按钮 + 自动消失 + hover 暂停消失
- 关键操作接入 Toast:保存配置 / 加载配置 / 启动失败 / 设备操作(连接/断开/WiFi 启用)成功失败提示
- 日志关键词分类着色:行级 span,自动识别 ERROR/WARN/SUCCESS/DEBUG/INFO(含中英文与 emoji 标记);DocumentFragment 批量渲染保持性能
- 配置面板加跨标签搜索:workspaceHeader 内嵌搜索框,输入即时按 label/hint/key 过滤所有 row 与 sectionTitle,搜索时自动展开所有 panel;空结果显示空状态;带清空按钮
- 首屏统计骨架屏:未到数据前 statValue 显示 shimmer 占位;pollStats 成功后自动移除
- 移动端复查:inline2 在小屏取消连体边框;workspaceHeader 改纵向布局,搜索框占满宽;secondaryActions 分隔线隐藏;btnTheme 推到右侧
- cache-bust v7 → v8
2026-05-21 09:29:38 +08:00
Codex
aa5065590a
精修 WebUI 第四轮:表单细节 + 滚动行为
...
- inline2 双输入框视觉合并:连体边框、共享圆角、focus 时 z-index 提升
- inline2 内的 span(如 "~")改为正中对齐分隔符
- rowActions 加 border-top + padding-top;primary 按钮自然居前(order: -1)
- html scroll-behavior smooth;prefers-reduced-motion 时回退 auto
- cache-bust v6 → v7
2026-05-21 09:29:38 +08:00
Codex
276235408e
精修 WebUI 第三轮:清理 + a11y + 深色微调
...
- 清理死变量:surface-elevated、bg-start/mid/end、shadow-hover、shadow-primary*、accent-cyan/emerald、primary-soft-hover*、primary-action-bg
- header 动作组:primary 与 secondary 之间加 1px 分割线;btnTheme 加左 margin
- summary.sectionTitle 加自绘 chevron icon(mask SVG),open 时旋转 90°
- 表单 :focus 改为 :focus-visible(鼠标点击不再触发 ring)
- 按钮加 :focus-visible 双层光环(背景 + primary 描边)
- 深色主题对比度复查:border 26→2a,border-strong 2e→3a,hover-border 40→4a;surface-muted 1a→1c;primary-soft 1a1d33→1c2040;primary-border 2d3257→353c66;warning/danger soft 系列加亮一档;overview-primary-bg 141414→161620;hairline 0.04→0.06
- cache-bust v5 → v6
2026-05-21 09:29:38 +08:00
Codex
299ced21c8
精修 WebUI 第二轮:数据表/表格/图表/预约卡
...
- workspaceHeader 加左侧 2px primary accent + uppercase eyebrow
- stats 卡片:tabular-nums + uppercase 标签 + 字号统一 text-xl
- table:sticky 表头 uppercase + zebra 奇偶行 + hover 高亮 + mono 列灰度
- timeline 图:4 等分水平网格虚线 + Y 轴 0/mid/max 三档 mono 标签
- 空状态:.hint 单独使用时升级为虚线圆框居中占位 + 圆形 dot
- 预约卡片:reservationIndex 加圆点 + reservationValue 改 uppercase pill;hover 去 transform,纯 box-shadow 反馈
- cache-bust v4 → v5
2026-05-21 09:29:38 +08:00
Codex
b7d7f61a27
精修 WebUI:质感细节与组件统一
...
- 引入设计 token:space-1..8 / radius-sm..xl / text-xs..2xl
- header:替换品牌图标为 SVG(耳机+音符)+ 顶部 hairline;title 用 tabular 字体可读性更好
- 按钮 primary/danger 加 inner highlight + 渐变深浅 + 三态质感(idle/hover/active)
- 侧边导航 tabBtn:active 改为左侧 2px 垂直指示条带 scaleY 动画
- 表单:select 加自绘下拉箭头;focus 双层 ring(border + 半透明)
- check 项勾选后亮 primary-soft 背景
- 状态卡 overviewCard:左侧 2px accent 条 + tabular-nums 数字 + 标签 uppercase
- statusRunning 状态点改为外扩光环动画(更内敛)
- 图表:barFill 加细微渐变;hover 行高亮其他行半透明;tabular-nums
- 全局滚动条:10px 细圆角,仅 thumb 显示
- preview 占位:斜纹背景 + 单方向扫描线动画
- cache-bust v3 → v4
2026-05-21 09:29:37 +08:00
Codex and Claude Opus 4.5
242876f679
refactor: 删除 fudai_core 中重复的 attend_choujiang 实现
...
attend_choujiang 在 fudai_core.py 中的旧版本只是一个回退实现:
开头就先尝试委派到 fudai_attend.attend_choujiang(更新版本),
1597 行的本地实现实际上是死代码——只在 import 失败时才会执行,
而 fudai_attend.py 一直存在。
简化为薄包装函数,直接调用 fudai_attend 中的实现。
文件行数:3799 -> 2208(减 1591 行,约 42%)
本次会话累计 fudai_core 减少:6393 -> 2208(减 4185 行,65%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:28:52 +08:00
Codex and Claude Opus 4.5
9edfcc2449
chore: 删除 operations/ 下的废弃存根模块
...
- device_operations.py:仅是空 stub(__all__ = []),无人使用
- image_operations.py:同上
- screenshot_service_new.py:未被引用的重复实现
operations/__init__.py 不导出这些模块,外部无依赖。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:22:56 +08:00
Codex and Claude Opus 4.5
61ec06092d
refactor: 删除 fudai_core 中重复的两个超大函数
...
douyin_fudai_core.py 中的 should_skip_fudai_by_config (~480 行) 和
basic_join_decision (~1940 行) 与 fudai_filter.py 中的实现高度重复。
保留 fudai_filter.py 中的版本,删除 douyin_fudai_core.py 中的副本。
兼容性:保留薄包装函数,所有现有 import 路径继续工作。
文件行数:6206 -> 3799(减 2407 行,约 39%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:16:12 +08:00
Codex and Claude Opus 4.5
7d834d316f
refactor: 删除 fudai_core 中重复的 check_contain
...
check_contain 在 fudai_filter.py 中已有完全相同的实现。
通过顶部 import 直接复用,删除 douyin_fudai_core.py 中的副本。
文件行数:6250 -> 6206(减 44 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:11:45 +08:00
Codex and Claude Opus 4.5
e38640eb63
refactor: 删除 fudai_core 中重复的 4 个开奖检查函数
...
check_lucky_draw_result / check_have_reward_notice_confirm /
check_in_order_confirm_page / get_reward 在 fudai_result_checker.py
中已有更新版本(使用 preprocess_for_ocr 等改进)。
douyin_fudai_core.py 中保留薄包装函数作为兼容 re-export,
确保任何旧调用点继续工作。
文件行数:6347 -> 6250(减 97 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:08:43 +08:00
Codex and Claude Opus 4.5
0031f17ebc
refactor: 抽取 is_watch_task_fudai / _is_short_countdown_text 到 fudai_filter
...
douyin_fudai_core.py 中存在与 fudai_filter.py 完全重复的
is_watch_task_fudai 实现,_is_short_countdown_text 也属于过滤逻辑。
集中到 fudai_filter.py 后,douyin_fudai_core.py 保留薄包装函数
作为兼容 re-export,确保所有既有调用点继续工作。
文件行数:6393 -> 6347(减 46 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:04:40 +08:00
Codex and Claude Opus 4.5
2d6cbecf7e
refactor: 抽取 underlying_operations 顶部辅助函数到 io_utils.py
...
将 4 个模块级辅助函数及相关常量从 underlying_operations.py 抽离到
新建的 douyin/core/io_utils.py:
- _verify_png_integrity
- _safe_replace_file
- _ensure_parent_dir
- _mirror_screenshot_to_external
- _EXTERNAL_DOUYIN_FUDAI_DIR / _EXTERNAL_AXF_SCREENSHOT
underlying_operations.py 仍重新导出这些符号,保持向后兼容,
所有外部 import 无需修改。
文件行数:3508 -> 3342(减 166 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:01:14 +08:00
Codex and Claude Opus 4.5
bdde741db1
refactor: 删除冗余的 douyin_logger.py
...
douyin_logger.py 提供的 get_logger 已被 douyin_logging.get_logger 覆盖。
唯一调用处(wrapper 中的回退路径)改为使用 douyin_logging.get_logger。
douyin/logging/ 模块数:9 -> 8
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 08:57:34 +08:00
Codex and Claude Opus 4.5
996990be31
refactor: 合并 action_tracker.py 到 action_logger.py
...
action_tracker.py 只有 28 行,仅定义 track_action 装饰器,
该装饰器内部依赖 ActionLogger 和 PerformanceTracker,
合并到 action_logger.py 更内聚。
douyin/logging/ 模块数:10 -> 9
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 08:55:40 +08:00
Codex and Claude Opus 4.5
a065c12d0c
refactor: 合并 error_logger.py + debug_logger.py 到 internal_loggers.py
...
这两个模块只被 douyin_logging_wrapper 内部使用,外部完全不引用。
合并为单文件 internal_loggers.py 减少模块数量。
douyin/logging/ 模块数:11 -> 10
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 08:53:48 +08:00
zzz
6e8e5d1102
Merge pull request 'claude/wonderful-brattain-d1cfe0' ( #2 ) from claude/wonderful-brattain-d1cfe0 into main
...
Reviewed-on: #2
2026-05-21 08:49:06 +08:00
Codex and Claude Opus 4.5
b137aead48
refactor: 合并 fudai_detail_modules/ 到 douyin/fudai/core/
...
将 fudai_detail_modules/ 6 个模块全部迁移到 douyin/fudai/core/:
- fudai_detail_coupon_detection.py
- fudai_detail_operations.py
- fudai_detail_room_title.py
- fudai_detail_utils.py
- fudai_detail_validator.py
- fudai_detail_reader.py -> fudai_detail_orchestrator.py(避免与 core/ 已有同名文件冲突)
更新所有 import:
- douyin/fudai/douyin_fudai_core.py
- douyin/fudai/douyin_fudai_detail.py
删除 fudai_detail_modules/ 空目录及其 README/__init__。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 08:46:11 +08:00
Codex and Claude Opus 4.5
cb4d25abdf
refactor: 删除死代码 _parse_mm_ss / _extract_2digits
...
这两个内嵌函数定义后从未被调用(grep 验证)。
time_utils.py 中已有公共版本可供未来使用。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:34:19 +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 and Claude Opus 4.5
e3e399da70
refactor: 入口脚本迁移到 bin/
...
将 4 个入口脚本从根目录迁移到 bin/:
- run_cli.py
- gui_app.py
- webgui_launcher.py
- manage_logs.py
配套修改:
- 修复 bin/*.py 内部 ROOT_DIR 计算(parent.parent)
- bin/run_cli.py 在 sys.path 加入项目根,shim 加载逻辑保持不变
- bin/manage_logs.py 在 sys.path 加入项目根
- path_config.get_run_cli_path() 返回 bin/run_cli.py
启动方式变化:
- 原: python run_cli.py / python gui_app.py
- 新: python bin/run_cli.py / python bin/gui_app.py
GUI 内部通过 path_config.get_run_cli_path() 调用,自动适配。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:23:14 +08:00
zzz
309b629e7c
Merge branch 'main' into claude/wonderful-brattain-d1cfe0
2026-05-20 23:57:39 +08:00
Codex and Claude Opus 4.5
77e797ae1c
chore: 清理根目录散落文件
...
- 删除 restore_screenshot_service.py:一次性恢复脚本,已完成使命
- 取消追踪 .stats_test_cache.json、.web_stats_cache.json:
运行时缓存文件,.gitignore 已忽略,本次清除历史误提交
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:33:13 +08:00
Codex and Claude 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
Codex and Claude Opus 4.5
a2d6bd2cc3
chore: 归档过时迭代报告到 docs/archive/
...
将 15 份历史性的修复/审查/优化迭代报告归档:
- *_REPORT.md / *_FIXES.md(一次性修复总结)
- 多线程优化/日志系统优化等迭代说明(已被新版替代)
- 真机测试报告(具体某次测试的快照)
保留在 docs/ 下的是仍然有用的当前文档:
使用指南、技术文档、规范、功能说明等。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:14:30 +08:00
Codex and Claude Opus 4.5
31d4102696
chore: 删除 docs/reports 中的临时文件
...
config.json.bak / git_lsremote_trace.txt / log_filter_result.txt /
time_analysis_result.txt 都是运行/调试产生的临时输出,
已在 .gitignore 中忽略,本次将历史误提交的版本一并清理。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:12:50 +08:00
Codex and Claude Opus 4.5
da0c4ca3dc
chore: 取消追踪运行时状态文件 .web_gui_pid
...
.gitignore 已忽略此文件,但历史上误提交了一次。
此处仅取消 git 追踪,本地文件保留。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:11:40 +08:00
Codex
3ed352ef0e
重构 Web GUI 视觉为深浅双主题大厂风
...
- 引入 Linear/Vercel 风设计语言:单色 primary、克制阴影、Inter 字体
- 新增深/浅双主题 token 与右上角切换钮,支持系统跟随 + localStorage 记忆
- 字重整体降一档(760→600,720→550,650→500),更轻盈现代
- sectionTitle 改为 11px uppercase 灰色辅助文字 + 细分割线
- 删除 sheen / scan / overviewCard 渐变条等装饰动画与彩色装饰层
- 图表配色单色化:timeline 线统一用 primary + opacity 区分系列
- styles.css/app.js cache-bust 版本升至 theme-v3
2026-05-20 23:09:20 +08:00
zzz
1a0afe86a1
Merge pull request 'claude/wonderful-brattain-d1cfe0' ( #1 ) from claude/wonderful-brattain-d1cfe0 into main
...
Reviewed-on: #1
2026-05-20 23:07:29 +08:00
Codex and Claude Opus 4.5
92718a7cb4
fix: douyin_fudai 关键路径异常添加日志
...
- run_id 生成失败时记录 logging.debug
- 日志系统初始化失败时记录 logging.warning,便于排查
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:03:27 +08:00
Codex and Claude Opus 4.5
9bd10277b2
fix: 前端 apiPost 添加 CSRF token
...
配合后端 /api/csrf-token 接口获取并自动附加 X-CSRF-Token 请求头,
避免 CSRF 防护启用后所有 POST 请求被 403 拒绝。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 23:01:31 +08:00
Codex and Claude Opus 4.5
92753c51a5
chore: 删除已废弃的 deleted_tests_backup 目录
...
22 个备份测试文件已废弃多月,从代码库中移除以减少干扰。
如需历史,仍可从 git 历史中恢复。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:56:51 +08:00
Codex and Claude Opus 4.5
6b22939c7e
fix: 改善 fudai_detail_validator 异常处理
...
- 收紧 except 类型为 ValueError/TypeError
- 添加 logging.debug 替代静默 pass,便于排查 OCR 识别错误
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:54:44 +08:00
Codex and Claude Opus 4.5
68a2ab73ba
refactor: 抽取倒计时解析工具到 time_utils 模块
...
将散落在三处的重复 _parse_mm_ss / _extract_2digits 实现集中到
douyin/utils/time_utils.py,便于复用与单元测试。
不修改既有调用点(保持向后兼容),后续可按需迁移。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:54:01 +08:00
Codex and Claude Opus 4.5
61d72b2b8d
perf: 优化 np.array 为 np.asarray 减少内存拷贝
...
np.array() 默认会复制数据,而 np.asarray() 只在必要时才复制。
对于只读用途,asarray() 性能更好。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:50:33 +08:00
Codex and Claude Opus 4.5
1dea80d5be
fix: 截图服务添加 atexit 优雅关闭
...
ScreenshotService 在进程退出时通过 atexit 钩子停止后台线程,
避免 daemon 线程被强杀导致的资源泄漏。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:48:43 +08:00
Codex and Claude 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 and Claude Opus 4.5
84e8d0c46d
fix: Web GUI 安全加固
...
1. PID 操作添加专用锁保护,防止 force_stop 并发问题
2. POST 接口添加 CSRF token 验证
3. 新增 /api/csrf-token 接口供前端获取 token
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:39:47 +08:00
Codex and Claude Opus 4.5
ff8de2c9b8
fix: 修复7个Critical并发安全和异常处理问题
...
1. OCR 单例无锁保护 - 添加 _ocr_lock 和 _ocr_coords_lock
2. ADB 文本广播命令注入 - 使用 shlex.quote() 转义
3. 截图文件 Race Condition - 添加 PNG 完整性验证
4. JSON 持久化无锁 - 添加文件级锁字典
5. 双检查锁不完整 - 修复 _ensure_debug_save_worker_started
6. Daemon 线程无 Graceful Shutdown - 添加 shutdown event 和 atexit
7. 关键路径异常处理 - 添加 logging.debug 替代 pass
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-20 22:25:35 +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
6c73f6e414
优化Web端日志导航与GUI配置
2026-05-20 20:23:32 +08:00
Codex
674ede76ee
Add project git automation instructions
2026-05-20 19:24:27 +08:00
Codex
13b1f2150c
Fix launcher paths and remove local hardcoding
2026-05-20 19:18:34 +08:00
Codex
e7a7d3f888
Fix device selection and adb command safety
2026-05-20 18:43:58 +08:00
Your Name
89128deb0f
Complete missing Web GUI controls
2026-05-20 17:54:40 +08:00
Your Name
8368f1f3b7
Fix issues from code review
...
- Fix project root path in test_webgui.py
- Remove debug console.log from loadConfig in app.js
- Remove duplicate screenshot button event listener in app.js
- Fix redundant directory changes in startup batch script
- Add trailing newlines to files
2026-05-20 09:00:54 +08:00
Your Name
7eb72bd00e
Update config, web GUI, and add debug features
2026-05-20 08:12:06 +08:00
Your Name
4492b77d67
优化:统一代码风格,调整字典定义和字符串格式,增强可读性
2026-02-01 12:15:06 +08:00
Your Name
3b2aab67bd
优化:启用杨号功能并更新PaddleOCR和PaddlePaddle版本要求;新增OCR引擎性能对比测试脚本
2026-02-01 12:14:20 +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
f97c83f6f0
Merge branch 'main' of https://github.com/Zzzil/douyin_guaji-main
2026-01-25 15:35:19 +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
68e3f2ff34
优化:调整配置文件中的重置动作和点击等待时间,提升代码逻辑清晰度;更新福袋分析逻辑以改善预约处理流程
2026-01-22 13:40:34 +08:00
Your Name
b9b21d472f
优化:更新配置文件中的重置动作和点击等待时间;调整映射表生成逻辑,提升代码可读性
2026-01-20 12:16:19 +08:00
Your Name
3b4293365d
优化:调整日志保留天数和压缩设置,增强日志管理;添加预约记录检查逻辑,避免直播间循环
2026-01-18 15:20:21 +08:00
Your Name
191edf9f28
docs: V4.4 (2026-01-18) — add shopping_redpacket threshold GUI/config; document OCR recheck, mapping write-to-disk, reservation backtrack fixes, attend retry fix, swipe handler fix
2026-01-18 14:49:21 +08:00
Your Name
c79c50ffe4
优化:添加购物红包背景红色占比阈值配置,增强红包弹窗检测功能
2026-01-18 14:38:38 +08:00
Your Name
d31a3ffee3
优化:调整basic_join_decision函数中的失败计数逻辑,提升代码可读性
2026-01-18 14:22:40 +08:00
Your Name
96c5cd50ec
优化:调整_mapping_tree_columns函数的格式,提升代码可读性
2026-01-18 13:42:20 +08:00
Your Name
27bb48c881
优化:增加连续失败处理逻辑,避免直播间卡死;调整抽奖参与逻辑,限制重试次数;添加购物红包OCR复查功能
2026-01-18 13:36:12 +08:00
Your Name
5519deb11b
参与: 添加连续失败上限,避免卡死在无法识别的福袋上
2026-01-18 00:03:06 +08:00
Your Name
746f24636a
预约: 在seek_reservation_room中添加总时间上限30秒,防止卡死
2026-01-17 23:50:36 +08:00
Your Name
33119a8200
预约: 回退成功后更新映射表文件以覆盖原本的
2026-01-17 23:33:43 +08:00
Your Name
8345121bfe
Resolve merge conflicts
2026-01-17 22:54:25 +08:00
Your Name
a4edc8338d
修复配置:将重置后滑动动作从“back”更改为“swipe”
2026-01-17 22:04:51 +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
4b9b6cdf8f
优化预约和滑动处理逻辑
2026-01-17 21:35:32 +08:00
Your Name
5bf07f60c6
feat: 优化滑动切换逻辑,增强福袋信息处理和推荐页返回流程的可靠性
2026-01-17 21:10:48 +08:00
Your Name
3edbd9a293
feat: 优化直播间标题记录逻辑,避免重复记录并调整位置映射
2026-01-17 20:00:32 +08:00
Your Name
3ce0aa73dd
feat: 优化当前直播间标题获取逻辑,提升匹配准确性
2026-01-17 19:34:57 +08:00
Your Name
ca3b2f6fea
feat: 优化代码格式,提升可读性和一致性
2026-01-17 19:14:16 +08:00
Your Name
3488624b8f
feat: 优化预约逻辑,增强映射表记录功能,提升用户体验
2026-01-17 18:46:13 +08:00
Your Name
54a99d4bbd
feat: 优化代码格式,提升可读性和一致性
2026-01-17 18:07:43 +08:00
Your Name
b940c91e2e
feat: 更新映射表以包含福袋详情信息,增强预约逻辑
2026-01-17 17:59:11 +08:00
Your Name
3fbd2b2d85
feat: 调整高价值福袋参与阈值,优化预约逻辑以提升用户体验
2026-01-17 09:26:41 +08:00
Your Name
1283645b75
feat: 更新基本加入决策逻辑,增加关闭详情页的操作以优化用户体验
2026-01-17 09:19:38 +08:00
Your Name
c091e4d3f0
feat: 优化当前福袋内容标识的设置逻辑,增强代码可读性
2026-01-17 09:08:23 +08:00
Your Name
a724de4094
feat: 更新预约逻辑,允许在成功预约后继续进行决策而非直接返回
2026-01-17 08:59:18 +08:00
Your Name
35819da24b
feat: 更新预约成功后直接返回,优化基本加入决策逻辑
2026-01-17 08:52:05 +08:00
Your Name
c9df7453b3
fix: 修复映射表记录功能中的代码模式列表,确保最后一个模式后有逗号
2026-01-17 08:50:17 +08:00
Your Name
55a3f3a0af
feat: 增强福袋详情记录功能,优化映射表记录逻辑,修复重复标题处理
2026-01-17 08:48:23 +08:00
Your Name
716567dbb0
feat: 优化预约福袋参与逻辑,修复锁定期处理和映射表记录,新增重复标题去重功能
2026-01-17 08:43:21 +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
29bf263080
fix: 修复代码格式,确保行末有换行符
2026-01-16 19:59:20 +08:00
Your Name
44519f2f6b
feat: 更新筛选逻辑,添加按钮文本记录和条件跳过原因,优化日志记录
2026-01-16 19:58:19 +08:00
Your Name
ca77862a86
feat: 添加滑动坐标配置功能,优化滑动操作的灵活性
2026-01-16 19:18:37 +08:00
Your Name
8d31e0ba1a
feat: 启用杨浩功能并调整日志时间戳设置为系统时间
2026-01-16 17:46:09 +08:00
Your Name
575d6f3fd5
feat: 添加按钮文本过滤功能以优化筛选逻辑,并支持真实时间戳记录
2026-01-16 16:50:19 +08:00
Your Name
e7b0b666d1
refactor: 移除并行OCR子任务的单独性能日志输出以避免日志重复
2026-01-16 16:43:56 +08:00
Your Name
238241b0dc
refactor: 移除重复的性能日志输出以简化日志记录
2026-01-16 16:43:35 +08:00
Your Name
cc2d81c9ad
fix: 并行OCR时避免清理截图文件
...
- 在并行记录映射表时不清理截图文件,避免主线程OCR时文件不存在
- 通过检查 _screenshot_ready_for_ocr 标志来判断是否在并行处理中
2026-01-16 16:33:07 +08:00
Your Name
de2fb909a9
feat: 清理旧截图文件以避免复用过期截图,并优化截图文件检查逻辑
...
- 在程序启动时清理旧截图文件
- 在记录映射表前清理截图文件
- 增强截图文件过期检查(30秒超时)
- 避免程序启动时复用低置信度的过期截图
2026-01-16 16:30:40 +08:00
Your Name
e091db7a54
feat: 清理旧截图文件以避免复用过期截图,并优化截图文件检查逻辑
2026-01-16 16:25:01 +08:00
Your Name
361dc973e7
feat: 切换直播间前检查映射表并记录标题
...
- 在切换直播间前检查当前直播间是否已记录映射表
- 如果没有记录,直接识别截图并记录直播间标题
- 修复预约验证中截图复用问题,改为直接强制截图覆盖
2026-01-16 16:16:22 +08:00
Your Name
7c839c5d39
feat: 优化直播间标题识别逻辑,增强缓存管理和错误处理
2026-01-16 16:15:40 +08:00
Your Name
5b377472f4
feat: 优化直播间标题识别逻辑,增加缓存管理以提升性能
2026-01-16 13:22:08 +08:00
Your Name
f5618d014d
feat: 添加直播间标题识别功能,优化缓存机制以避免重复OCR
2026-01-16 13:08:26 +08:00
Your Name
13bf52f7a9
feat: 在福袋详情读取中添加直播间标题识别功能,并记录识别日志
2026-01-16 12:59:18 +08:00
Your Name
ea960a73da
feat: 优化代码格式,提升可读性和维护性
2026-01-16 12:58:18 +08:00
Your Name
da098fafdc
feat: 更新福袋相关配置,优化任务数量处理逻辑,增强映射表记录功能
2026-01-16 12:53:59 +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
71d2f218cf
feat: 更新最小奖品值和高价值福袋阈值,提升参与激励
2026-01-16 02:24:24 +08:00
Your Name
671386f250
fix: 修复滑动处理器中的空行,提升代码整洁性
2026-01-16 02:21:51 +08:00
Your Name
78e53603d3
feat: 添加开奖等待时间戳,优化参与逻辑中的状态管理
2026-01-16 02:18:50 +08:00
Your Name
ea1e3dd876
Refactor fudai detection and logging mechanisms
...
- Improved logging for task count retrieval and warnings in `douyin_fudai_core.py` and `douyin_stage.py`.
- Enhanced error handling and logging in `fudai_detail_reader.py` to provide clearer insights when task counts are not saved.
- Updated template matching logic in `douyin_detection.py` to include detailed logging and error handling for template loading and matching processes.
- Refactored screenshot handling and debugging paths to ensure better traceability and error reporting.
- Adjusted default task count values to zero where applicable to prevent unintended behavior.
2026-01-16 02:08:01 +08:00
Your Name
0862a92dc5
feat: 优化 diagnose_stage_from_current_screen 函数的调用格式,提升代码可读性
2026-01-15 23:04:53 +08:00
Your Name
83704f3cb8
feat: 优化 find_and_open_fudai_detail 函数中的代码格式,提升可读性
2026-01-15 23:04:22 +08:00
Your Name
c46c1402b5
feat: 优化基本加入决策函数中的导入和代码格式,提升可读性
2026-01-15 23:04:09 +08:00
Your Name
d2c5ca57e8
feat: 更新房间状态管理,优化直播间标题记录逻辑,移除过时的房间位置映射文件
2026-01-15 23:03:56 +08:00
Your Name
073ad13781
feat: 添加房间位置映射文件,更新房间标题信息
2026-01-15 16:51:11 +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
e39a984260
feat: 优化养号流程调用,确保向后兼容
2026-01-15 03:15:33 +08:00
Your Name
e898202a90
refactor: 优化代码格式,提升可读性
2026-01-15 03:04:03 +08:00
Your Name
3fa03b780b
refactor: 优化代码格式,提升可读性
2026-01-15 01:52:00 +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
a3b15e3965
feat: 更新养号推荐时长和间隔设置,提升推荐效果
2026-01-15 00:20:51 +08:00
Your Name
ea77c0b501
refactor: 优化代码格式,提升可读性
2026-01-15 00:20:17 +08:00
Your Name
d36b73d3df
feat: 添加养号模式下的桌面检测和自救恢复功能;优化评论操作和定时触发逻辑
2026-01-15 00:19:42 +08:00
Your Name
4d805474db
feat: 添加养号模式下的桌面检测和自救恢复功能
2026-01-13 01:05:56 +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
c94e7307f1
gitignore: ignore state/high_value_rooms.json
2026-01-11 23:40:42 +08:00
Your Name
245e721c94
feat: 优化代码格式,增加换行以提高可读性
2026-01-11 23:32:19 +08:00
Your Name
54f3b35a26
Refactor code structure for improved readability and maintainability
2026-01-11 23:31:38 +08:00
Your Name
7e5d88d3f1
feat: 优化标题校验逻辑,合并空标题判断条件以提高代码可读性
2026-01-09 20:28:22 +08:00
Your Name
f0538ab3fc
feat: 更新预约回退校验逻辑,增加标题为空时的失败判断;更新高价值房间数据
2026-01-09 20:28:10 +08:00
Your Name
da272de7f8
feat: 合并ADB subprocess和截图信息到单个日志输出;更新高价值房间数据和配置
2026-01-09 20:20:07 +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
d739998b6b
feat: 更新高价值房间数据,调整时间戳和查看次数,增加新房间信息
2026-01-08 22:44:21 +08:00
Your Name
51eced1346
refactor: 优化基础参与决策函数的参数格式,提高代码可读性
2026-01-08 22:04:11 +08:00
Your Name
9f62c3377c
feat: 更新基础参与决策函数,增加跳过筛选结果参数;更新高价值房间时间戳和查看次数
2026-01-08 20:47:22 +08:00
Your Name
6ecd9fa1ae
refactor: 优化代码格式,提升可读性
2026-01-08 20:39:04 +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
47e1a0cb2c
refactor: 优化代码格式,提升可读性和一致性
2026-01-08 00:15:40 +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
0e2ff7be6e
feat: 优化日志配置函数中的代码格式,提升可读性
2026-01-07 19:10:07 +08:00
Your Name
210014d5b1
feat: 从配置中添加运行时清理选项,增强日志监控功能
2026-01-07 19:06:44 +08:00
Your Name
c6b6745e3e
feat: 优化日志记录格式,增强循环次数和运行时间限制的可读性
2026-01-07 19:06:10 +08:00
Your Name
a3175aaddb
feat: 调整配置和逻辑,优化等待开奖和日志显示体验
2026-01-07 07:58:11 +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
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
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
Your Name
134883b674
chore: sync local edits after rebase
2026-01-05 21:38:00 +08:00
Your Name
43e39f4db6
feat: 添加工具以查找重复的异常处理,增强代码质量检查;新增验证 GUI 回退方式的自检脚本
2026-01-05 21:32:50 +08:00
Your Name
982357927e
feat: 添加回退方式配置选项,支持滑动和按返回键回退;优化日志清理机制
2026-01-05 00:38:27 +08:00
Your Name
46733155e0
feat: 添加下滑返回直播间的配置选项,支持启用和设置次数
2026-01-04 21:49:17 +08:00
Your Name
41e0563114
Refactor code structure for improved readability and maintainability
2026-01-04 21:45:19 +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
e771197a3a
feat: 增强直播间去重统计逻辑,添加当前直播间位置和相关集合
2026-01-04 15:45:01 +08:00
Your Name
3283cd3653
chore: stop tracking douyin/core/state/reservations.json
2026-01-04 15:07:49 +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
6b9b02bd58
feat: 增强福袋参与和预约管理功能,添加统计记录和优化配置参数
2026-01-04 11:31:54 +08:00
Your Name
c0df59ac26
feat: 优化安全数据处理逻辑,确保 detail 数据的稳定性和类型安全
2026-01-04 10:18:51 +08:00
Your Name
0b50017c25
feat: 优化函数调用安全性,确保实时查看功能的稳定性
2026-01-04 10:15:31 +08:00
Your Name
b215e79a26
feat: 优化实时查看功能的实现,确保函数调用安全性
2026-01-04 10:12:28 +08:00
Your Name
161e2e9491
feat: 优化预约状态加载逻辑,支持从 JSON 文件回退读取状态
2026-01-04 09:54:42 +08:00
Your Name
f7da7b78aa
feat: 更新预约状态管理逻辑,优化首次运行时的队列恢复机制
2026-01-04 09:51:11 +08:00
Your Name
4f0e8c364d
feat: 添加阈值检查脚本,输出默认阈值及匹配结果
...
refactor: 优化代码格式,调整条件表达式为多行
fix: 更新预定状态,移除已参加的预定
2026-01-04 09:47:35 +08:00
Your Name
804a9224ca
refactor: 清理代码,移除多余空行以提升可读性
2026-01-04 09:43:57 +08:00
Your Name
d81eea63c9
feat: 添加唯一计数去重功能,优化福袋相关统计逻辑
2026-01-04 09:42:47 +08:00
Your Name
90b7daa84e
feat: 添加唯一计数去重功能,优化胜利记录逻辑
2026-01-04 09:38:27 +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
3678ff7e31
refactor: 优化代码格式,合并多行赋值为单行,调整部分异常处理逻辑
2026-01-03 20:59:43 +08:00
Your Name
6a59365aae
feat: 添加推荐页养号功能,支持只养号模式及相关配置
2026-01-03 20:59:27 +08:00
Your Name
c6d404834e
refactor: 更新时间戳,优化界面元素的布局和格式
2026-01-03 20:33:23 +08:00
Your Name
cdada11f81
feat: 添加实时查看功能,支持动态展示截图与动作流
2026-01-03 20:33:07 +08:00
Your Name
bffca95af0
refactor: 优化倒计时逻辑,移除多余的时间修正,调整相关日志记录
2026-01-03 19:54:24 +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
68c8ccea66
refactor: 优化代码格式,调整多行参数传递和异常处理逻辑
2026-01-03 13:31:57 +08:00
Your Name
2fa2073f2e
feat(reservation): Update reservation details and improve logging
...
- Updated reservation JSON data with new room titles, prize values, and timestamps.
- Enhanced logging in `douyin_fudai_core.py` to include OCR duration summaries for better analysis.
- Modified `SwipeHandler` to allow forced switching during seek processes to prevent deadlocks.
- Improved logging wrapper to handle field extraction and elapsed time calculations more robustly.
- Refactored log formatting functions for better readability and consistency.
- Added total timeout handling in `process_reservation_attend_window` to prevent blocking.
- Removed automatic backtracking in reservation verification to avoid infinite loops.
- Updated configuration management to include total timeout settings for reservations.
- Enhanced error handling and logging in `fudai_detail_reader.py` for validation failures.
2026-01-03 13:30:55 +08:00
Your Name
1223a1ea5a
feat: 更新配置文件,启用开关并优化日志格式化,增强耗时字段处理
2026-01-03 12:44:13 +08:00
Your Name
1105ed618f
feat: 更新日志记录功能,添加自检脚本以检查 action_logger 初始化与绑定状态
2026-01-03 12:35:17 +08:00
Your Name
57177ef7a2
fix: 更新reservations.json中的时间戳,优化代码格式
2026-01-03 12:31:30 +08:00
Your Name
cf95efc9a4
feat: 更新OCR任务识别功能,添加配置开关以控制内容识别
2026-01-03 12:02:00 +08:00
Your Name
1a69dd87b1
chore: tighten .gitignore to ignore generated reports, logs and archives
2026-01-03 12:00:09 +08:00
Your Name
2aa0aec99a
feat: 添加任务列表OCR开关,更新配置与日志记录功能
2026-01-03 11:34:24 +08:00
Your Name
4f74a5e95a
chore: remove generated reports and logs from repo, update .gitignore
2026-01-03 11:22:41 +08:00
Your Name
488f6a1fdf
chore: remove generated reports and logs from repo, update .gitignore
2026-01-03 11:22:33 +08:00
Your Name
ee0511e327
feat(logging): 更新日志记录,添加不同日志类型以增强调试信息
2026-01-03 04:07:10 +08:00
Your Name
b8593c728a
chore: empty commit for code changes
2026-01-03 04:03:02 +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
f2cd77ab0b
feat(logging): 添加日志配置中的默认值以确保所有分支可用
2026-01-03 03:37:41 +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
25ed50cc3c
feat: Add AI project summary and coordinate constants for Douyin Fudai
...
- Created AI_PROJECT_SUMMARY.md for quick understanding of project structure, data flow, key interfaces, and verification points.
- Added key modules and data flow overview for automated participation in Douyin Fudai lottery.
- Introduced a JSON schema example for configuration and provided quick validation steps.
- Updated coordinate constants in coords.py for various cropping areas related to Fudai details, ensuring centralized management of coordinates.
- Generated a new actions log file for tracking actions performed by the application.
2026-01-03 00:06:59 +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
148cdf56c2
Refactor import statements for douyin_screenshot_manager to use dynamic loading
...
- Updated multiple files to replace static imports of `douyin_screenshot_manager` with dynamic imports using `importlib`. This change enhances flexibility and prevents import errors when the module is unavailable.
- Added fallback mechanisms in `fudai_core.py` to ensure the application continues to function even if certain dependencies are missing, improving robustness.
- Adjusted error handling to provide clearer feedback during initialization failures, particularly for OCR-related components.
2026-01-01 19:42:03 +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
7db9864848
feat: Introduce JPEG support check and remove obsolete files
...
- Added a new script `check_jpeg_support.py` to verify device support for JPEG screenshots, enhancing functionality for image processing.
- Deleted obsolete files including `auto_test_result.txt`, `CODE_QUALITY_REVIEW.md`, and others to streamline the project and improve maintainability.
- Cleaned up unnecessary blank lines in various scripts to enhance readability and organization.
2025-12-31 17:01:18 +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
Your Name
223c127e11
chore: Clean up and refactor codebase for improved maintainability
...
- Removed obsolete command-line test parameters from `run_cli.py` to streamline functionality.
- Introduced a new `ocr_preprocess.py` module for unified OCR image preprocessing, enhancing recognition stability.
- Updated various components to utilize the new preprocessing function, improving code organization and readability.
- Adjusted configuration values in `config.json` for better performance and consistency.
- Added comprehensive technical documentation for the Douyin project, detailing code modification standards and operational guidelines.
- Cleaned up excessive blank lines across multiple files to enhance overall readability.
2025-12-30 23:11:34 +08:00
Your Name
efe6e2252f
feat: Add logging and error handling enhancements
...
- Introduced new logging modules for action tracking, error logging, and performance tracking to improve observability.
- Added functions for retrieving debug and error log paths in `path_config.py`.
- Updated various components to utilize the new logging system, enhancing error handling and performance diagnostics.
- Implemented a GUI component for viewing error logs, improving user experience in monitoring application issues.
- Cleaned up unnecessary blank lines and improved code readability across multiple files.
2025-12-29 20:48:09 +08:00
Your Name
bdf9312bc9
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 new path configuration, ensuring consistency and maintainability across the project.
2025-12-28 20:55:34 +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
a0162e3b81
chore: Remove path_demo.py and enhance path configuration handling
...
- Deleted the obsolete path_demo.py file to streamline the project structure.
- Updated various modules to utilize a unified path configuration approach, improving maintainability and consistency.
- Implemented fallback mechanisms for path retrieval to ensure backward compatibility with existing code.
- Enhanced import statements for clarity and organization across the project.
2025-12-28 15:20:03 +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
686dde5cc0
chore: Remove obsolete files and clean up project structure
...
- Deleted unnecessary files including worktree configuration, markdown history logs, and ignored files to streamline the project.
- Enhanced overall project organization by removing outdated documentation and artifacts.
- Improved maintainability by ensuring only relevant files are retained in the repository.
2025-12-28 14:46:32 +08:00
Your Name
c67f22f76f
feat: Refactor and reorganize project structure with new modules and files
...
- Deleted obsolete files including test scripts and configuration files to streamline the project.
- Introduced new modules for handling Douyin functionalities, including core operations, logging, and GUI components.
- Updated import paths to reflect the new module structure, enhancing code organization and maintainability.
- Added configuration files and documentation to support the new structure and improve user guidance.
2025-12-28 14:16:40 +08:00
Your Name
ea7159355b
fix: Clean up blank lines and enhance readability across multiple files
...
- Removed excessive blank lines from various markdown and Python files to improve readability and maintainability.
- Ensured consistent formatting across documentation and code files, contributing to overall project clarity.
- Updated logging mechanisms for better consistency and debugging support.
2025-12-27 17:10:19 +08:00
Your Name
efaa3d3adc
fix: Clean up blank lines and enhance readability across multiple files
...
- Removed excessive blank lines from various markdown and Python files to improve readability and maintainability.
- Ensured consistent formatting across documentation and code files, contributing to overall project clarity.
- Enhanced logging mechanisms for better consistency and debugging support.
2025-12-27 15:19:04 +08:00
Your Name
4678adb8f3
fix: Clean up blank lines and enhance readability across multiple files
...
- Removed excessive blank lines from various markdown and Python files to improve readability and maintainability.
- Ensured consistent formatting across documentation and code files, contributing to overall project clarity.
2025-12-27 10:42:24 +08:00
Your Name
7849b62d44
fix: Enhance logging and clean up blank lines across multiple files
...
- Improved logging for reservation handling and participation decisions to provide better traceability.
- Cleaned up excessive blank lines in various markdown and Python files to enhance readability and maintainability.
- Ensured consistent formatting across documentation and code files, contributing to overall project clarity.
2025-12-27 10:35:15 +08:00