whisper-money/resources/js
Víctor Falcón 52708f940d
fix(sentry): drop browser-extension noise before sending events (#568)
## What

Adds an `isBrowserExtensionNoise` predicate to the frontend Sentry
`beforeSend` chain that drops errors originating from injected
browser-extension scripts.

## Why

Triaging Sentry surfaced recurring, unactionable issues caused entirely
by users' browser extensions, not our code:

- **PHP-LARAVEL-21** — `i: Failed to connect to MetaMask`
(`chrome-extension://…/inpage.js`)
- **PHP-LARAVEL-3M** — `Cannot read properties of undefined (reading
'sendMessage')` (`chrome-extension://…/injectedScript.bundle.js`)

These recur for every user who has the offending extension installed, so
resolving-and-waiting just re-pages us forever. This follows the
existing pattern of named noise predicates with vitest coverage
(`isChunkLoadErrorEvent`, `isSafariCashbackExtensionNoise`, …).

## How

The predicate inspects the **crashing (innermost) frame** of each
exception and drops the event only when that frame's URL uses a
browser-extension scheme (`chrome-extension://`, `moz-extension://`,
`safari-web-extension://`, `safari-extension://`,
`ms-browser-extension://`).

Matching only the crashing frame — not *any* frame — avoids
over-filtering legitimate app errors that merely pass through an
extension-wrapped handler.

### Not filtered on purpose

`AxiosError: Network Error` (PHP-LARAVEL-28 / -38) is left untouched: it
has no extension frames and a full backend outage produces the same
error, so we want it to keep alerting.

## Tests

`resources/js/lib/sentry.test.ts` — 4 new cases (drops the two real
extension shapes; keeps the network error and an app error where the
extension frame is not the crash site). `vitest run` green (12/12).
2026-06-20 12:47:05 +02:00
..
components feat(transactions): default balance toggle on and apply it server-side (#566) 2026-06-19 15:01:04 +00:00
contexts Move transaction filtering from client-side to server-side (#126) 2026-02-16 12:49:04 +01:00
hooks feat(ai): suggest automation rules during onboarding (#523) 2026-06-13 22:51:15 +02:00
layouts fix(layout): keep bottom padding while floating nav is visible (#537) 2026-06-15 18:23:26 +02:00
lib fix(sentry): drop browser-extension noise before sending events (#568) 2026-06-20 12:47:05 +02:00
pages feat(connections): create a new account from the manage-accounts selector (#560) 2026-06-19 12:49:03 +02:00
providers fix: move community link to user menu (#442) 2026-05-27 17:39:26 +02:00
services feat(transactions): default balance toggle on and apply it server-side (#566) 2026-06-19 15:01:04 +00:00
types AI auto-categorization: open to pro + consent, nudge free users (#561) 2026-06-19 14:08:40 +00:00
utils feat(currency): add NZD (New Zealand Dollar) (#504) 2026-06-08 09:18:17 +02:00
app.tsx fix(sentry): drop browser-extension noise before sending events (#568) 2026-06-20 12:47:05 +02:00
ssr.tsx Remove plaintext-transactions feature flag & E2E references (#116) 2026-02-13 11:10:21 +01:00