Skip to content

POR-22460: Filter cross-origin history SecurityError noise from Sentry - #1400

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/por-22460-cursor-automated-triage-response-398e
Draft

POR-22460: Filter cross-origin history SecurityError noise from Sentry#1400
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/por-22460-cursor-automated-triage-response-398e

Conversation

@cursor

@cursor cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add src/utils/sentryIgnoredErrors.ts with shared browser Sentry ignore patterns for history API instrumentation noise
  • Filter NS Pushstate prevention and cross-origin history.replaceState / history.pushState SecurityError messages in instrumentation-client.ts
  • Add focused unit tests in src/utils/sentryIgnoredErrors.test.ts

Testing Criteria

  • yarn test src/utils/sentryIgnoredErrors.test.ts — 4 tests passed

Notes

  • Automated triage for POR-22460: SecurityError: Blocked attempt to use history.replaceState() during portal OAuth/login redirects
  • This is browser security noise when code attempts cross-origin history updates (e.g. portal login URL → auth.copilot.app callback), not a tasks-app business-logic failure
  • Related prior work: POR-21031 (unmerged) filtered NS Pushstate prevention with the same pattern

Impact & Surface Area of Change

  • Client-side Sentry error filtering only; no runtime behavior changes
Open in Web View Automation 

priosshrsth and others added 2 commits August 7, 2026 10:33
…1397)

deleteLabel passed `id: currentLabel?.id` straight into label.delete, so when
findFirst matched nothing Prisma got `{ id: undefined }` and threw
PrismaClientValidationError, failing the whole delete transaction. Return early
instead.
Add shared browser Sentry ignore patterns for history API instrumentation
noise, including NS Pushstate prevention and cross-origin replaceState
SecurityErrors seen during portal OAuth/login redirects.

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Aug 15, 2026

Copy link
Copy Markdown

POR-22460

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview Aug 15, 2026 9:10pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR centralizes browser-side Sentry ignore patterns and adds filters for known cross-origin History API noise while preserving existing fetch-failure filtering.

  • Adds shared browser Sentry ignore patterns for pushState and replaceState security errors.
  • Connects the shared patterns to client-side Sentry initialization.
  • Adds focused tests for ignored and unrelated error messages.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The client configuration preserves the existing fetch filters, adds the intended browser History API noise patterns, and includes focused tests showing unrelated application errors remain reportable.

Important Files Changed

Filename Overview
src/instrumentation-client.ts Replaces inline fetch-error patterns with the shared browser ignore-pattern list without changing other Sentry initialization behavior.
src/utils/sentryIgnoredErrors.ts Defines the existing fetch filters alongside the new History API noise filters and exposes a small matching helper.
src/utils/sentryIgnoredErrors.test.ts Covers the new history patterns, retained fetch patterns, case-insensitive matching, and an unrelated application error.

Reviews (1): Last reviewed commit: "POR-22460: Filter cross-origin history S..." | Re-trigger Greptile

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