Skip to content

refactor(capture-kit): move screenshot-diff beside its pixel worker and overlays - #3710

Merged
thymikee merged 2 commits into
mainfrom
t3/migrate-screenshot-diff-capture-kit
Oct 16, 2026
Merged

thymikee merged 2 commits into
mainfrom
t3/migrate-screenshot-diff-capture-kit

Conversation

@thymikee

@thymikee thymikee commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Moves the seven src/screenshot-diff/ modules (961 LOC) and their test into packages/capture-kit/src/, next to screenshot-diff-pixels, the PNG worker and the screenshot overlays they already depended on. Every outgoing edge already targeted kernel/capture-kit, so no new package or dependency is needed. The screenshot-diff layering zone is removed.

  • Consumers (src/cli/commands/screenshot.ts, src/commands/capture/runtime/diff-screenshot.ts, src/commands/output/diff.ts) now import @agent-device/capture-kit/screenshot-diff, /screenshot-diff-regions and /screenshot-diff-overlay-matches.
  • The test uses capture-kit's local tmp-dir.fixtures.ts (capture-kit cannot depend on test-kit, which depends on it).
  • 15 files; ADR 0019 inventory updated. No behavior change.

Validation

Tested at 05c664543:

  • pnpm check:affected --run passed (layering, production-exports, package).
  • vitest run packages/capture-kit/src/screenshot-diff.test.ts: 22/22.
  • git diff -M90% shows renames with only import-specifier edits.
  • Fresh-context adversarial review: no findings.

Not run: device lanes (no runtime path change). CI pending.

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 16, 2026 13:28
…nd overlays

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…it exports

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 16 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.29 MB 5.29 MB 0 B
Package (unpacked) 5.29 MB 5.29 MB 0 B
Package (download) 1.59 MB 1.59 MB +10 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.6 ms 26.2 ms -1.4 ms
CLI --help 77.3 ms 76.6 ms -0.8 ms

@thymikee

Copy link
Copy Markdown
Member Author

I reviewed 05c6645 and found no problems. The move of screenshot-diff beside its pixel worker and overlays keeps the same logic and only updates import paths, and the code looks good.

Smoke Tests is still running, so CI has not finished. The diff only moves a CLI-side diff-report module, so a failure there would be unlikely to come from this change. The only overlap is with the screenshot-diff CLI route. I did not run the eager-closure ceiling gate, fallow, or the test suite, and I did not check whether any consumer besides the three listed sees a changed import closure.

This can merge once Smoke Tests finishes green.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 16, 2026
@thymikee
thymikee merged commit 5007540 into main Oct 16, 2026
20 checks passed
@thymikee
thymikee deleted the t3/migrate-screenshot-diff-capture-kit branch October 16, 2026 12:38
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-16 13:05 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant