Skip to content

[build-tools] Upload the agent-device screenshot display rotation as artifact metadata - #4508

Merged
szdziedzic merged 2 commits into
mainfrom
szdziedzic-claude/agent-device-screenshot-orientation
Oct 5, 2026
Merged

szdziedzic merged 2 commits into
mainfrom
szdziedzic-claude/agent-device-screenshot-orientation

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Why

agent-device screenshots in EAS device run sessions carry no information about device rotation. A consumer cannot tell a landscape capture from a portrait one without decoding the image, and it cannot tell landscape-left from landscape-right at all.

agent-device now reports displayRotation (portrait, portrait-upside-down, landscape-left, or landscape-right) on screenshot entries in its /artifacts inventory. This is the rotation the display rendered the capture in. The saved image is always upright, so a landscape value pairs with a landscape image. The agent-device change: callstack/agent-device#3088.

How

  • AgentDeviceArtifactSchema reads the optional displayRotation field. An unknown value is dropped through .catch(undefined), so a newer daemon value cannot fail the whole inventory parse and block uploads.
  • uploadAgentDeviceArtifactAsync passes it as metadata: { displayRotation } on the existing createArtifactUploadSession input. An artifact without the field uploads no metadata, as before.

This is safe to merge before agent-device releases the field: older daemons omit it.

Test Plan

  • Added tests in agentDeviceArtifacts.test.ts: a known value is kept and an unknown one dropped, the value is uploaded as metadata, and no metadata is sent without it. 10 of 10 pass.
  • oxfmt passes on the changed files.
  • Not tested on a live EAS Simulator session. The agent-device side was verified live on an iOS simulator and an Android emulator (GET /artifacts returned displayRotation).
  • The dashboard does not read metadata.displayRotation yet.

🤖 Generated with Claude Code

szdziedzic added a commit that referenced this pull request Oct 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.71%. Comparing base (817d06e) to head (b97a0f5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4508      +/-   ##
==========================================
+ Coverage   73.71%   73.71%   +0.01%     
==========================================
  Files         998      998              
  Lines       48775    48777       +2     
  Branches    10545    10547       +2     
==========================================
+ Hits        35950    35952       +2     
  Misses      11831    11831              
  Partials      994      994              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

szdziedzic and others added 2 commits October 5, 2026 15:23
…artifact metadata

agent-device reports displayRotation on screenshot entries in its /artifacts
inventory. Read it and pass it to the device run session artifact upload as
metadata.displayRotation. An unknown value is dropped so it cannot block the
upload, and an artifact without the field uploads no metadata, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/agent-device-screenshot-orientation branch from 549bc75 to b97a0f5 Compare October 5, 2026 13:25
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@krystofwoldrich krystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. And because the agent device uses the latest, this just starts working correctly.

@szdziedzic
szdziedzic merged commit 4e432fa into main Oct 5, 2026
12 checks passed
@szdziedzic
szdziedzic deleted the szdziedzic-claude/agent-device-screenshot-orientation branch October 5, 2026 13:49
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.

2 participants