Skip to content

feat(browser): @maple-dev/browser/react with error boundary and router adapters - #1153

Merged
Makisuo merged 3 commits into
feat/browser-sdk-http-errors-cspfrom
feat/browser-sdk-react
Sep 29, 2026
Merged

Makisuo merged 3 commits into
feat/browser-sdk-http-errors-cspfrom
feat/browser-sdk-react

Merge branch 'feat/browser-sdk-http-errors-csp' into feat/browser-sdk…

9ec3c09
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Sep 29, 2026 in 2m 5s

Confidence 5/5 · No issues found

Confidence 5/5 · safe to merge
quality 100/100 · no findings · tests covered · risk low · 2/2 new units observable

Only packages/browser/src/error-filters.ts and its test changed since the last review: matches now resets lastIndex before test, so a global or sticky ignore/allowUrls/denyUrls regex drops every matching error instead of every other one. The fix and its regression test are both correct; safe to merge.

  • matches resets pattern.lastIndex before test, fixing stateful g/y filter regexes
  • New test asserts a /chunk/gi ignore drops three consecutive errors
What was checked
  • matches (error-filters.ts:55) is the only regex call in the file; BENIGN_MESSAGES and EXTENSION_URL (lines 37-38) carry no g/y, so they need no reset
  • The regression test at error-filters.test.ts:83 fails against the pre-fix code: the old pattern.test kept the 2nd of three matches
  • shouldCapture still treats a missing top frame as keep, and allowUrls/denyUrls are still top-frame only (error-filters.ts:82-83)
Observability coverage: 2 of 2 changes observable
Change Kind Observable Evidence
React error boundary + root error handler reporting error span yes reportReactError -> MapleBrowser.captureException with name react.render_error (react.ts:11-21)
Router navigation spans (React Router, TanStack Router) navigation span yes MapleBrowser.startNavigation/endNavigation (react.ts:112-190)

9ec3c09 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.