Repository navigation
feat(flows): optional alert steps (if_present) - #136
Conversation
…r only sometimes
Hardware (Xiaohongshu flows): an occasional system 'Allow Paste' prompt
could not be written into a flow — an alert step with no alert up fails the
run. {type: alert, ..., if_present: true} answers the alert when one is up
and passes as skipped: no_alert when none is; without the flag the step
still fails as no_alert. MCP/flow alert steps carry if_present.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAlert actions can now set ChangesOptional alert handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant MCPClient
participant HTTPServer
participant WDA
MCPClient->>HTTPServer: Submit alert with if_present true
HTTPServer->>WDA: Execute alert action
WDA-->>HTTPServer: HTTP 404, no active alert
HTTPServer-->>MCPClient: Complete step as skipped no_alert
Merge Risk: ⚪ Minimal · up to This adds optional alert steps without changing behavior for existing flows. Strict alert steps still fail when no alert is present. Flows that use the new field need a client that supports it, which the docs already state. 🚥 Pre-merge checks | ✅ 4 | ❓ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (5 skipped: 4 unsupported, 1 too large.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Why: The parallel session saved Xiaohongshu post and delete flows (16 s and 23 s in one call, against 37 calls and 5 m 40 s by hand). It could not write the occasional system "Allow Paste" prompt into them, because an alert step with no alert up fails the run.
What:
{type: alert, button|action, if_present: true}answers the alert when one is up. When none is, it passes asskipped: "no_alert"./agent/inputactions.no_alert.if_present.Registry rule: flows that use
if_presentmust not enter the official registry until a client with this field is the minimum. Older clients reject unknown fields.Tests: new daemon integration test (optional passes, strict still fails) and MCP encoding test.
cargo test -p serverand-p iphone-use-mcppass.Summary by CodeRabbit