Skip to content

fix(tarko): handle open_computer action normalization#1305

Merged
ulivz merged 2 commits into
mainfrom
fix/open-computer-action-normalization
Aug 29, 2025
Merged

fix(tarko): handle open_computer action normalization#1305
ulivz merged 2 commits into
mainfrom
fix/open-computer-action-normalization

Conversation

@ulivz
Copy link
Copy Markdown
Member

@ulivz ulivz commented Aug 29, 2025

Summary

Fixes issue where open_computer() action returns incorrect startX: 0 and startY: 0 coordinates in normalizedAction response, this causes the web ui to render incorrectly:

image

The problem was in convertToNormalizedAction function in @tarko/shared-utils where unknown action types fell back to click action with zero coordinates.

Root Cause: Unknown action types like open_computer were being converted to click actions with startX: 0, startY: 0.

Solution: Modified the default case to preserve the original action type with empty inputs instead of falling back to click action.

Changes:

  • Updated default case in convertToNormalizedAction to return raw action type
  • Removed fallback to click action that caused incorrect coordinates
  • Now open_computer() returns { type: 'open_computer', inputs: {} } instead of { type: 'click', inputs: { startX: 0, startY: 0 } }

Ref: #1295

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

Treat open_computer() as wait action instead of click with 0,0 coordinates
Prevents incorrect startX/startY values in normalizedAction response
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 29, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit aa64273
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68b1fb78ff86dd0008b51aeb
😎 Deploy Preview https://deploy-preview-1305--agent-tars-docs.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.

Instead of falling back to click action, preserve original action type
with empty inputs for unknown actions like open_computer()
@ulivz ulivz merged commit 871ea58 into main Aug 29, 2025
8 of 9 checks passed
@ulivz ulivz deleted the fix/open-computer-action-normalization branch August 29, 2025 19:12
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