Skip to content

feat: 恢复auto_daily+配置项兼容 - #513

Open
YaoerWu wants to merge 14 commits into
OpenWSGR:mainfrom
YaoerWu:refactor/config-compat-migration
Open

feat: 恢复auto_daily+配置项兼容#513
YaoerWu wants to merge 14 commits into
OpenWSGR:mainfrom
YaoerWu:refactor/config-compat-migration

Conversation

YaoerWu and others added 6 commits July 26, 2026 18:57
…pport

- Add SET_CLIPBOARD support for multi-byte (Chinese) text input
- Use INJECT_TEXT for ASCII, SET_CLIPBOARD+paste for non-ASCII
- Refine touch event injection format
- Update controller tests
- config_compat 拆为 detect_* (运行期只读, from_yaml 检测到老版本即抛
  LegacyConfigError 提示迁移) 与 migrate_* (纯转换, 供工具调用), 移除
  运行期静默迁移与回写原文件逻辑
- UserConfig 新增 operation_delay_min/max 字段 + 校验器写回模块全局,
  修复 classic delay 迁移后值丢失 bug (scrcpy 通过 operation_delay() 读取)
- 新增 tools/migrate_config.py 独立迁移工具: 指定 --usersettings/--planroot,
  默认 cwd 查找, 输出到新目录 (原文件不动), 支持 --dry-run/--force
- plan.from_yaml 检测到 classic 前导空 fleet 同样崩溃提示迁移

Co-Authored-By: Claude <[email protected]>
操作延迟从直接 import 全局变量改为调用 operation_delay() 函数, 随 config
字段动态生效 (不再绑定导入时的值)。精简 test_controller 测试。

Co-Authored-By: Claude <[email protected]>
- 恢复 scheduler (daily_plan / scheduler / triggers) 全天挂机优先级队列调度
- 新增 / 恢复 ops: campaign / destroy / event_fight / exercise /
  normal_fight / repair / decisive.chapter
- 新增 bathroom context + bath_page UI 页面; types 同步调度所需枚举

Co-Authored-By: Claude <[email protected]>
usersettings.full.yaml / usersettings.yaml 同步 operation_delay_min/max
等新字段, 移除 classic 已迁移项。

Co-Authored-By: Claude <[email protected]>
新增 / 补全 testing/{infra/test_file_utils, ops/test_destroy_unit,
ops/test_scheduler_unit, context/test_bathroom} 单元测试。

Co-Authored-By: Claude <[email protected]>
@YaoerWu YaoerWu mentioned this pull request Jul 27, 2026
test_operation_delay_field_sets_globals 之前裸构造 UserConfig(...) 无 emulator:
- Linux/WSL CI: OSType.auto() 走 linux 分支强制要求 emulator.serial → ValidationError
- 改 os_type=windows 又在非 Windows 上触发 auto_emulator_path → import winreg 失败
给定 serial+path 的 emulator 既满足 linux 分支, 又让 windows 分支跳过
auto_emulator_path (不 import winreg), 两端皆过。本用例只验证 operation_delay
字段 → 模块全局。

Co-Authored-By: Claude <[email protected]>
@YaoerWu
YaoerWu force-pushed the refactor/config-compat-migration branch from 2aef25b to 08fee16 Compare July 27, 2026 04:19
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

自动选船无法在搜索框中输入中文字符 [Bug] 配置文件中的delay未生效

2 participants