Skip to content

Comments

Fix pixelmatch type error breaking CI builds#2199

Merged
amikofalvy merged 1 commit intomainfrom
fix/vitest-config-type-error
Feb 20, 2026
Merged

Fix pixelmatch type error breaking CI builds#2199
amikofalvy merged 1 commit intomainfrom
fix/vitest-config-type-error

Conversation

@amikofalvy
Copy link
Collaborator

Summary

  • Fixed TypeScript type error in agents-manage-ui/vitest.config.ts:133-141 that was failing all three CI workflows (CI, Cypress, Publish) on main
  • The pixelmatch function's third parameter accepts Uint8Array | undefined but was being passed Uint8Array | null — changed to use undefined for the call and ?? null for the return type which expects TypedArray | null

Test plan

  • pnpm typecheck passes for agents-manage-ui
  • CI, Cypress, and Publish workflows go green

🤖 Generated with Claude Code

The `diffBuf` variable was typed as `Uint8Array | null`, but pixelmatch's
third parameter expects `Uint8Array | undefined` (not null). Changed to
use `undefined` for the pixelmatch call and `?? null` for the return value
which expects `TypedArray | null`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2026

⚠️ No Changeset found

Latest commit: dc6071e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 20, 2026 1:21am
agents-manage-ui Building Building Preview, Comment Feb 20, 2026 1:21am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Feb 20, 2026 1:21am

Request Review

@amikofalvy amikofalvy merged commit a08617f into main Feb 20, 2026
5 of 9 checks passed
@amikofalvy amikofalvy deleted the fix/vitest-config-type-error branch February 20, 2026 01:21
Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(0) Total Issues | Risk: Low

This is a clean, targeted fix for a TypeScript type error in the vitest screenshot comparator configuration. No issues identified.

Analysis

The Problem:
The pixelmatch library's third parameter (output) accepts Uint8Array | undefined, but the code was passing null. This caused TypeScript to fail type checking, breaking CI.

The Fix:

  1. Line 133: Changed nullundefined for the diffBuf variable when no diff image is needed, matching pixelmatch's expected parameter type
  2. Line 141: Added ?? null to coerce undefined back to null for the return value's diff property, matching vitest's expected return type (TypedArray | null)

Verification:

  • The fix is type-correct: undefined satisfies pixelmatch's parameter type, and ?? null produces the null that vitest expects
  • Consistent with existing code: the early return at line 116 already uses diff: null
  • No behavioral change: the runtime behavior is identical (pixelmatch treats undefined and null equivalently for the output parameter)

Scope

  • Surface: Internal test infrastructure only (vitest config)
  • Customer impact: None
  • Risk: Minimal — type-only change with no runtime behavior difference

✅ APPROVE

Summary: Clean type fix that unblocks CI. The change correctly adapts to pixelmatch's type signature while preserving vitest's expected return contract. Ship it! 🚀

Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
orchestrator (direct) 0 0 0 0 0 0 0
Total 0 0 0 0 0 0 0

Note: Subagent dispatch was skipped due to minimal scope (2-line type fix in test config).

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