Repository navigation
feat: add type --interval-ms to type at a steady pace - #348
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b1da6f9 to
1b7965c
Compare
| let request = context.request_base(Action::TypeText(unit.clone())); | ||
| let delivered = match &burst { | ||
| Some(burst) => deliver(adapter, burst, request, budget(unit)).map(|_| ()), | ||
| None => execute_ref_action_with_context( |
There was a problem hiding this comment.
--wait-for runs after the first keystroke. type_text_interval.rs:49 sends keystroke 1 through execute_ref_action_with_context, which runs the wait immediately.
If the condition needs the full text, it times out and the rest is never typed. The error has no typed_keystrokes.
If the wait succeeds, keystrokes and post_state are written onto the wait snapshot instead of the result.
Fix: reject the two flags together, or run the wait once after the last keystroke.
| clock.wait_for(index); | ||
| let request = context.request_base(Action::TypeText(unit.clone())); | ||
| let delivered = match &burst { | ||
| Some(burst) => deliver(adapter, burst, request, budget(unit)).map(|_| ()), |
There was a problem hiding this comment.
The burst reports keystroke 1's delivered_verified. .map(|_| ()) at L48 throws away the results of keystrokes 2..n.
If the final read fails, the old post_state is kept with no warning.
Fix: check the final value against the expected text, or downgrade to delivered_unverified.
1b7965c to
1d5426a
Compare
1d5426a to
04d3abf
Compare
c7dd4f2 to
da1d14a
Compare
| .saturating_mul(u32::try_from(index).unwrap_or(u32::MAX)); | ||
| let on_grid = self.started + offset; | ||
| let due = self.previous.map_or(on_grid, |previous| { | ||
| on_grid.max(previous + self.interval / 2) |
There was a problem hiding this comment.
started is set before the first keystroke, so a slow first one (or a lease stall) makes every later key go out at interval / 2.
fix: let the grid slide. after each keystroke set next = max(slot + interval, now + interval / 2) instead of using a fixed grid from started.
da1d14a to
899c38e
Compare
- Type one keystroke every N ms (1 to 2000) in one command, keeping combining marks, emoji sequences and CR LF together - Resolve and verify the field once, then post each keystroke on the clock under its own interaction lease, so headed typing keeps the cadence and other agents can act in between - Verify the result against the field after the last keystroke, wait on `--wait-for` once at the end, report how far a failed burst got, and document the flag
899c38e to
f06e54b
Compare
--wait-foronce at the end, report how far a failed burst got, and document the flagtype --interval-ms 70into TextEdit.interval-typing.mp4