feat: add breadcrumb management to Catcher class#147
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds breadcrumb management functionality to the JavaScript Catcher, enabling automatic and manual tracking of events leading up to errors. Breadcrumbs provide a chronological trail of user actions, network requests, and navigation events that help debug issues by providing context.
Changes:
- Added automatic breadcrumb tracking for fetch/XHR requests, navigation events (History API), and optional UI clicks
- Introduced public API methods:
addBreadcrumb(),getBreadcrumbs(),clearBreadcrumbs() - Updated package to use @hawk.so/types v0.1.38 which includes Breadcrumb type definitions
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updated @hawk.so/types dependency from 0.1.36 to 0.1.38 to support breadcrumb types |
| packages/javascript/package.json | Updated @hawk.so/types dependency and added lint script |
| packages/javascript/src/types/hawk-initial-settings.ts | Added configuration options for breadcrumb management (maxBreadcrumbs, trackFetch, trackNavigation, trackClicks, beforeBreadcrumb hook) |
| packages/javascript/src/types/event.ts | Added breadcrumbs field to HawkJavaScriptEvent type |
| packages/javascript/src/catcher.ts | Integrated BreadcrumbManager singleton, added public API methods, and included breadcrumbs in error events |
| packages/javascript/src/addons/breadcrumbs.ts | New module implementing singleton BreadcrumbManager with automatic tracking and manual API |
| packages/javascript/example/sample-errors.js | Added comprehensive examples demonstrating all breadcrumb types and API usage |
| packages/javascript/example/index.html | Added UI controls for testing breadcrumb functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
neSpecc
reviewed
Jan 18, 2026
…anager with popstate event handling
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s to align with new structure
… messages in sample-errors.js
Reversean
requested changes
Jan 20, 2026
neSpecc
reviewed
Jan 21, 2026
…use .nvmrc; reintroduce @hawk.so/types in package.json
neSpecc
approved these changes
Jan 22, 2026
… from BreadcrumbsManager
Reversean
approved these changes
Jan 24, 2026
…g in buildElementSelector function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Breadcrumbs Support to JavaScript Catcher
Adds automatic and manual breadcrumb tracking.
Features:
hawk.breadcrumbs.add(),hawk.breadcrumbs.get(),hawk.breadcrumbs.clear()beforeBreadcrumbhook