← Back to Pull requests

feat(automation): adaptive typing and smoother paced input, visible-only wait_for text, recording edit fixes #290

Open
unknown opened this pull request with 369 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 30, 2026 13:48 UTC
Author

What

Input that looks human but quick in recorded takes, plus fixes to recording edits:

  • Typing: when a recorded tab is paced, type sends its keys straight to the window's keyboard. Each key is spaced about as a person types, and the whole text has a time cap that grows with the square root of its length (fast: ~0.45 s per 10 chars, ~2 s for 300; slow: ~2.7 s for 300). Longer texts go in bursts that pause between words. The call takes the planned typing time, so a long text can no longer time out halfway. fill reveals its text on the same plan.

  • Pace: slow travel now takes about 1.4× as long as fast (it was about 2×). instant and fast behave as before.

  • attention: the circle is drawn at 60 Hz on fixed frame ticks, eased in and out, and goes around the paced input queue. The automation pointer is still left where the circle ends.

  • wait_for text/textGone: only text the page actually shows counts. Hidden elements (checkVisibility) and text that is zero-size or off the page don't count, and neither does a frame whose iframe is hidden, zero-size or off the page.

  • type submit: before pressing Enter, it gives the editor a moment to take in the typed text. It then reports fieldChanged and adds a note when the field still holds the text.

  • idle_by: actions: calls that only read the page or wait on it (wait_for, snapshot, screenshot, eval, …) no longer count as activity.

  • Captions: a caption holds normal speed only for its reading time (at least 2.2 s, or 55 ms per character), and still shows for its whole duration_ms in the edit.

  • cuts: a new edit option, [{action: discard|speed|trim, from, to, speed}], where from/to are mark names or raw-video ms. It is kept with the edit's options and accepted by MCP and HTTP. An edit that names an unknown mark is refused.

  • Long waits: wait_for now advises calls of 50 s at most, and its timeout message says to call again. The docs and skill say the same.
  • Why

    In a slow-pace demo, input felt sluggish and jerky. A 73-character type timed out and dropped its last character. wait_for matched text that wasn't on screen yet. An edit by actions kept every second of an agent's polling. Captions held the video at 1× for their whole duration.

    Not done

  • Editing a take whose session ended mid-recording. The per-frame change data an edit needs is only written when a take finishes, so this needs recovery from the partial video.

  • An MCP keepalive on the control plane. Its Effect McpServer HTTP transport answers only once a call ends, so the long-wait advice above stands in for it.
  • Verified

  • cargo clippy -p aperture-runner --all-targets is clean.

  • The runner's unit tests pass. The caption test was updated for the new reading-time hold.

  • session-tools.json was regenerated.

  • Builds and e2e run on CI.
  • 🤖 Generated with Claude Code

    Diff: 369 lines (+276 / -93) across 4 files Reviewer: chatgpt-codex-connector[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.43) × (1 − Review Confidence (0.38)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 369 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 65% · Reviewer familiarity: 35%
    38%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #290"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 38% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 38% · Lower = rushed or shallow review
    38%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.5% · Safe to merge
    26.5%