-
Notifications
You must be signed in to change notification settings - Fork 91
Add alert handling tools to server #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add alert handling tools to server #36
Conversation
WalkthroughFour new browser alert/modal handling tools were added to the server: Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant BrowserDriver
Note over Server,BrowserDriver #e6f7ff: New alert/modal handling flow
Client->>Server: request (accept_alert / dismiss_alert / get_alert_text / send_alert_text)
Server->>BrowserDriver: switchTo().alert()
alt alert present
Server->>BrowserDriver: perform action (accept / dismiss / getText / sendKeys+accept)
BrowserDriver-->>Server: result / text
Server-->>Client: { type: "output", content: { text: result, status: "success" } }
else no alert / error
BrowserDriver-->>Server: throws error
Server-->>Client: { type: "output", content: { text: error.message, status: "error" } }
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/lib/server.js(2 hunks)
🔇 Additional comments (1)
src/lib/server.js (1)
564-564: LGTM! Critical fix for server connection.This ensures the server properly connects to the transport at startup, which is essential for the MCP server to function.
Alert Handling
JavaScript alerts: Accept or dismiss alert dialogs
Confirmations: Handle confirm dialogs programmatically
Prompts: Send text to prompt dialogs
Text extraction: Get alert message content
Summary by CodeRabbit
New Features
Bug Fixes