Skip to content

fix(client): filter Chrome extension receiving-end Sentry noise (KODY-CLOUDFLARE-4F) - #1344

Merged
kody-bot merged 1 commit into
mainfrom
cursor/sentry-triage-kody-cloudflare-7662064169-2643
Aug 9, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/sentry-triage-kody-cloudflare-7662064169-2643

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

Intent

Stop Chrome/Firefox extension messaging noise from polluting production Sentry for Kody.

Summary

  • Sentry KODY-CLOUDFLARE-4F (7662064169): Error: Could not establish connection. Receiving end does not exist.
  • Production event on https://heykody.app/ (Chrome), zero stack frames, handled generic capture β€” classic extension runtime.sendMessage when the receiving end is gone.
  • Kody never uses chrome.runtime / browser.runtime.
  • Adds a narrow browser beforeSend filter (same pattern as KODY-CLOUDFLARE-3S Object Not Found) and unit coverage that nearby "connection" wording is kept.

Testing

  • npx vitest run packages/worker/client/sentry-browser-filters.node.test.ts

System changes

System recap β€” composes existing primitives (low risk)

Mode: recap Β· Base: main @ e9b6b3cc Β· Head: 2fd463c0

Classification: composes β€” wires one more narrow predicate into the existing browser Sentry beforeSend filter chain; no primitive contract change.

Primitives touched

Primitive Group Impact
app-ui surfaces composes β€” drop Chromium/Firefox "Receiving end does not exist" noise

System map

Browser Sentry init already runs filterBrowserSentryEvent; this PR adds the receiving-end missing predicate to that chain.

Legend: green = composes (wiring only) Β· amber = extended by this PR Β· red = new primitive Β· gray = context (unchanged, included only when an edge crosses it).

flowchart LR
	appUi["app-ui<br/>Browser app (Remix 3)"]:::touched
	sentry["Sentry browser SDK"]:::untouched
	appUi -->|"beforeSend: drop receiving-end missing"| sentry
	classDef touched fill:#1a7f37,color:#fff
	classDef extended fill:#9a6700,color:#fff
	classDef added fill:#cf222e,color:#fff
	classDef untouched fill:#57606a,color:#fff
Loading
Open in WebΒ Open in CursorΒ 

Summary by CodeRabbit

  • Bug Fixes

    • Reduced noise from Chrome and Firefox extension messaging errors in error reporting.
    • Preserved reporting for similar but unrelated connection messages.
  • Documentation

    • Expanded error-filtering documentation with additional browser noise categories and references.

Drop the Chromium/Firefox extension IPC error "Could not establish
connection. Receiving end does not exist." from browser Sentry beforeSend
(KODY-CLOUDFLARE-4F). Kody never uses chrome.runtime; these events have no
app frames and are not actionable product defects.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds
kentcdodds marked this pull request as ready for review August 9, 2026 15:41
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

πŸ“ Walkthrough

Walkthrough

The browser Sentry filters now remove matching Chrome and Firefox extension connection errors. Tests cover direct events, original errors, aggregate filtering, and similar MCP messages that remain reportable.

Changes

Extension Sentry filtering

Layer / File(s) Summary
Extension error detection and pipeline integration
packages/worker/client/sentry-browser-filters.ts, packages/worker/client/sentry-init.ts
The filter matches the receiving-end-missing error in strings, exceptions, and Sentry events. The aggregate browser filter applies it before later filters. The Sentry filtering documentation lists related browser noise categories and references.
Filtering behavior coverage
packages/worker/client/sentry-browser-filters.node.test.ts
Tests cover direct event matching, original Error matching, aggregate filtering, and a similar MCP connection message that remains reportable.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Possibly related PRs

  • kentcdodds/kody#1246: Adds a related Chrome extension Sentry-noise filter in the same module and pipeline.
  • kentcdodds/kody#1302: Adds filtering for connection-related browser or MCP errors.
  • kentcdodds/kody#1164: Adds a related browser Sentry noise filter and integrates it into the aggregate filter.
πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
Title check βœ… Passed The title clearly and concisely describes the main change: filtering Chrome extension receiving-end Sentry noise.
Description check βœ… Passed The description includes the required Intent, Summary, and Testing sections, plus an optional System changes section with relevant implementation and risk details.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/sentry-triage-kody-cloudflare-7662064169-2643

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.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

πŸ”Ž Preview deployed: https://kody-pr-1344.kody-a99.workers.dev

Worker: kody-pr-1344
D1: kody-pr-1344-db
KV: kody-pr-1344-oauth-kv

Mocks:

@kody-bot
kody-bot merged commit e7b9bb4 into main Aug 9, 2026
18 checks passed
@kody-bot
kody-bot deleted the cursor/sentry-triage-kody-cloudflare-7662064169-2643 branch August 9, 2026 18: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.

3 participants