Maestro replay: optional target wait is a hard-coded 7 s (Maestro skips after ~3 s); make it configurable

未关闭
#4,204 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, ios, typescript
领域
cli, testing-qa

调研方向

Start in replay-maestro-backend.js, where optionalTargetLookupTimeoutMs is hard-coded to 7000 ms, and trace where the runFlow when condition wait reads the same value. Then find where the replay and test CLI flags are parsed so a new option, such as --optional-timeout, can be passed through. Done when the timeout can be set from the flag or a config key, the default stays unchanged or is deliberately changed, and a test shows an optional missing target is skipped after the configured delay.

由索引模型根据 Issue 内容生成。

描述

enhancement
What happens

In replay --maestro, a missing optional: true target waits optionalTargetLookupTimeoutMs = 7000 ms before the step is skipped (replay-maestro-backend.js). runFlow when conditions use the same value. It is hard-coded, with no flag, config key or environment variable.

Maestro CLI skips the same missing optional target after about 3 s. On a long flow with many optional steps this costs more than the engine saves.

Measured on an Android emulator, with the same app and backend:

agent-device Maestro CLI
launch + 3 missing tapOn … optional: true 24.8 s 19.7 s (incl. ~10 s JVM start)
88-step tour, 58 optional steps 225 s 185 s
same tour with the optional wait at 3000 ms 131 s 185 s
Ask

Make the optional lookup (and the runFlow condition wait) configurable, for example --optional-timeout <ms> on replay/test or a config key, and consider defaulting it closer to Maestro's.

Environment

agent-device 0.21.36, Android emulator API 36 and iOS simulator 26.5.

主要语言
TypeScript
星标
5.3k
派生
377
平均合并
13 小时 49 分钟
30 天内合并 PR
650

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。