Skip to content

Simplify screenshot diff output - #1495

Merged
thymikee merged 5 commits into
mainfrom
agent/simplify-screenshot-diff
Jul 30, 2026
Merged

Simplify screenshot diff output#1495
thymikee merged 5 commits into
mainfrom
agent/simplify-screenshot-diff

Conversation

@thymikee

@thymikee thymikee commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

Remove retired screenshot-diff analysis while retaining the released pixel and structured region contracts.

The optional ocr and nonTextDeltas fields remain in the TypeScript result contract as deprecated compatibility fields, but the analyzers no longer run and the fields are not emitted. Human output remains compact; no schema migration is required.

Validation

  • VITEST_MAX_WORKERS=1 pnpm check:affected --base origin/main --run
  • Live iOS simulator evidence against Agent Device Tester: captured a baseline, toggled Lab online, then ran pnpm ad diff screenshot with JSON output. It returned the primary toggle region at x=306 y=327 60x24, 1,310 changed pixels in that region, and 2,019 changed pixels total (0.57%). The retired optional analysis fields were absent.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-30 12:43 UTC

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.88 MB 1.87 MB -11.7 kB
JS gzip 605.4 kB 601.6 kB -3.9 kB
npm tarball 724.1 kB 720.2 kB -3.8 kB
npm unpacked 2.53 MB 2.52 MB -11.7 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.6 ms 28.8 ms +0.2 ms
CLI --help 60.1 ms 59.6 ms -0.5 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/runtime.js -8.5 kB -2.8 kB
dist/src/recording-export-quality.js -2.8 kB -929 B
dist/src/registry.js 0 B -5 B
dist/src/context.js 0 B -2 B
dist/src/apps.js 0 B -2 B

@thymikee
thymikee marked this pull request as ready for review July 30, 2026 10:15
@thymikee
thymikee force-pushed the agent/simplify-screenshot-diff branch from d6babee to a6d6623 Compare July 30, 2026 10:21
@thymikee

Copy link
Copy Markdown
Member Author

Exact head dcf11e8 is not ready because the simplified structured output silently removes shipped API fields. diff screenshot --json and the public runtime result directly expose ScreenshotDiffResult; this patch removes ocr, nonTextDeltas, and region fields including densityPercentage, shape, size, location, colors/luminance, and dominantChange. These fields landed in commit 4b7ee246, which is contained in released tags v0.18.1 through v0.20.3, so they require preservation or an explicit compatibility/versioned migration. Updating tests to stop asserting them does not migrate consumers. The reduced human text is coherent and CI is green, but structured JSON/Node compatibility must be addressed. Also add reproducible live diff screenshot device evidence (command plus artifact); the PR\x27s manual-validation sentence is not independently reviewable.

@thymikee
thymikee merged commit 809968d into main Jul 30, 2026
32 checks passed
@thymikee
thymikee deleted the agent/simplify-screenshot-diff branch July 30, 2026 12:43
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