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

Aberta
#4,204 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
android, ios, typescript
Domínio
cli, testing-qa

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
5.3k
Forks
377
Merge médio
14h 24min
PRs com merge (30d)
675

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de callstack/agent-device

Todas as issues de callstack/agent-device

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.