Skip to content

fix: hide skipped AI notes and match near-duplicate screenshots - #1317

Merged
Zach Dunn (zachdunn) merged 1 commit into
mainfrom
cursor/quieter-ai-notes-a965
Oct 28, 2026
Merged

Zach Dunn (zachdunn) merged 1 commit into
mainfrom
cursor/quieter-ai-notes-a965

Conversation

@zachdunn

Copy link
Copy Markdown
Member

The Check for visuals AI notes were showing lines for notes that never ran, and the before/after note required two perceptual hashes to be identical. Compression can flip a few bits, so the same picture saved twice could look different.

Skipped notes now stay out of the check summary and the managed comment. When every note was skipped, that section is left out and the rest of the summary stays as it was. A before and an after count as the same picture when their pHashes differ by at most 4 bits. A missing or malformed hash skips the note. Label reuse (matchPerceptualReuse) still requires an exact pHash, which is the follow-up Zach Dunn (@zachdunn) noted on #1303.

What it does

  • Hides an AI note whose outcome is skipped. A note that passed or warned still shows.
  • Leaves out the AI notes block in the PR comment, and the AI notes heading in the check, when no note was evaluated. The checklist and the rest of the summary do not depend on that section being present.
  • Compares identical-before-after with a Hamming distance of 4 on the stored 16-digit pHash. The threshold is the constant IDENTICAL_PHASH_DISTANCE.
  • Keeps cross-upload label reuse on an exact hash. A false match there is worse than a miss.

How to try it

This ships with the API worker. After it deploys, the next comment sync on a repo with check.ai set shows the quieter notes.

A warning still renders, and a skipped note beside it does not:

<details open>
<summary>AI notes · 1 warning</summary>

- ⚠️ Before and after look the same
  - `before.png` and `after.png` look the same

</details>

When every note was skipped, that block is absent. The check summary keeps its checklist and does not gain an AI notes heading.

Technical notes

Stored pHashes are 16 lowercase hex digits. Anything else is unreadable, and the before/after note is skipped rather than flagged. Distance is only used by identicalBeforeAfterNote.

Test plan

  • pnpm --filter @uploads/api exec vitest run src/github-check-ai-notes.test.ts src/github-check-run.test.ts src/github-comment-render.test.ts
  • CI Lint & Format and Test

No UI source files changed. The sample above is the rendered comment. Check for visuals should report no UI changes.

Open in Web Open in Cursor 

Skipped notes stay out of the Check for visuals summary and the managed
comment, and the section is left out when every note was skipped. The
before/after note treats pHashes within 4 bits as the same picture, and
skips when a hash is missing or malformed.

Co-authored-by: Zach Dunn <zachdunn@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6e58e89

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

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 2
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed): 1
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a3ab5ff1-f614-48b6-b22d-c53c83cb14d7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · 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.

@zachdunn
Zach Dunn (zachdunn) merged commit 51f6c7d into main Oct 28, 2026
4 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the cursor/quieter-ai-notes-a965 branch October 28, 2026 01:50
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