Skip to content

Conversation

@quanru
Copy link
Collaborator

@quanru quanru commented Jan 8, 2026

Summary

  • Fix structured parameter forms not displaying in Chrome Extension playground
  • When using agentFactory mode, create agent in getActionSpace if it doesn't exist

Problem

After commit 89d7f6c7, when using agentFactory mode in LocalExecutionAdapter:

  • The agent was only created during executeAction
  • But getActionSpace was called earlier during page initialization
  • This caused getActionSpace to return an empty array []
  • As a result, needsStructuredParams was always false
  • All playground methods displayed as plain TextArea instead of structured parameter forms (e.g., direction dropdown for aiScroll)

Solution

In getActionSpace, if agent is null but agentFactory is available:

  1. Create the agent using the factory
  2. Get the actionSpace from the created agent
  3. Keep the agent for later use instead of destroying it

Test plan

  • Open Chrome Extension playground
  • Select aiScroll method - should show direction dropdown and distance input instead of plain TextArea
  • Select aiInput method - should show structured form with value and locate fields
  • Verify other methods like aiTap, aiHover also show proper structured forms

…ry mode

When using agentFactory mode, the agent was only created during executeAction,
but getActionSpace was called earlier during page initialization. This caused
getActionSpace to return an empty array, making all playground methods display
as plain TextArea instead of structured parameter forms.

This fix creates the agent in getActionSpace if it doesn't exist but
agentFactory is available, and keeps it for later use.
@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for midscene ready!

Name Link
🔨 Latest commit b7632c6
🔍 Latest deploy log https://app.netlify.com/projects/midscene/deploys/695f4d8ed985ea00075357f0
😎 Deploy Preview https://deploy-preview-1737--midscene.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@quanru quanru merged commit 82f2fd0 into main Jan 8, 2026
9 checks passed
@quanru quanru deleted the fix/playground-actionspace-loading branch January 8, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants