Skip to content

Require positive intersection area for UIKit impressions - #28

Draft
KYHyeon wants to merge 1 commit into
daangn:mainfrom
KYHyeon:feature/jamie/NO-TICKET-positive-impression-area
Draft

KYHyeon wants to merge 1 commit into
daangn:mainfrom
KYHyeon:feature/jamie/NO-TICKET-positive-impression-area

Conversation

@KYHyeon

@KYHyeon KYHyeon commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Background

UIKit impression tracking currently checks only the height of the intersection with the viewport. A target touching the horizontal edge has zero visible area but can still emit an impression when its configured ratio is zero.

Changes

  • Require both intersection width and height to be positive before creating a tracker item.
  • Capture the target frame once for the intersection check and tracker item.
  • Add regression coverage for horizontal, vertical, and corner contact, a fully offscreen target, and a one-point overlap along either axis.

Validation

The regression test failed on unchanged main. After the fix, all 41 KarrotImpression tests passed on an iPhone 17 Pro simulator running iOS 26.4.1 with Xcode 26.4.1: 0 failures and 0 skips.

Scope

This PR targets main and fixes existing UIKit impression geometry independently of the viewability API in #27. It adds no public API and leaves SwiftUI APIs unchanged.

@KYHyeon KYHyeon self-assigned this Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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