Skip to content

fix(elements): name a system alert that blocks the screen read, at once - #135

Merged
leeguooooo merged 1 commit into
mainfrom
fix/source-timeout-alert
Oct 6, 2026
Merged

leeguooooo merged 1 commit into
mainfrom
fix/source-timeout-alert

Conversation

@leeguooooo

Copy link
Copy Markdown
Owner

Why: On a real phone, Xiaohongshu's system "Allow Paste" prompt made /source fail 109 times. Each /agent/elements read then hit the 35 s budget and timed out with no hint of why; WDA also dropped once. Reported by the parallel iphone-use session.

What:

  • The source-read loop probes /alert/text (about 0.3 s) on the first failure and once more after about 3 s.
  • If an alert is up, the read returns 409 {error: alert_blocking, alert: {text, buttons}, hint} immediately.
  • A read that still fails or times out also carries the alert block when one is up.
  • docs/agent-reference.md documents this.

Tests:

  • New tests/source_alert.rs: the alert is named in under 5 s (0.07 s in the test), with its buttons.
  • The existing revocation test's mock now answers the probe with "no alert".
  • cargo test -p server and -p iphone-use-mcp pass.

Hardware (Xiaohongshu): an 'Allow Paste' prompt made /source fail 109 times
and the read time out after 35 s with no hint of why; WDA also dropped once.
The read loop now probes /alert/text (~0.3 s) on the first failure and once
more after ~3 s, and answers 409 alert_blocking with the alert's text and
buttons; a read that still fails or times out carries the alert block when
one is up.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 435b7df3-ace0-457c-8b12-1520b010d169
📥 Commits

Reviewing files that changed from the base of the PR and between 71c0c9e and b29c576.

📒 Files selected for processing (4)
  • crates/server/src/http.rs
  • crates/server/tests/http_auth.rs
  • crates/server/tests/source_alert.rs
  • docs/agent-reference.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@leeguooooo
leeguooooo merged commit 908aa19 into main Oct 6, 2026
2 checks passed
@leeguooooo
leeguooooo deleted the fix/source-timeout-alert branch October 6, 2026 10:09
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.

1 participant