Skip to content

Conversation

@t-jimbo
Copy link
Collaborator

@t-jimbo t-jimbo commented Jan 6, 2026

Summary

  • Add Breadcrumb struct with message, category, level, data, timestamp
  • Add recordBreadcrumb() and getBreadcrumbs() to TrackRepository2 protocol
  • Implement breadcrumb buffering (max 50 entries) in TrackRespositoryImpl
  • Include breadcrumbs when sending Flutter crash reports via sendFlutterCrash()
  • Expose recordBreadcrumb() via @_spi(FlutterBridge) in NubrickExperiment

Usage (from Flutter Bridge)

@_spi(FlutterBridge)
import Nubrick

let breadcrumb = Breadcrumb(
    message: "Button tapped",
    category: "ui",
    level: "info",
    data: ["button_id": "submit"],
    timestamp: Int64(Date().timeIntervalSince1970 * 1000)
)
nubrickClient.experiment.recordBreadcrumb(breadcrumb)

Related PRs

Test plan

  • Verify iOS SDK compiles without errors
  • Test recordBreadcrumb() stores breadcrumbs correctly
  • Verify breadcrumbs are included in crash reports
  • Test breadcrumb buffer limits to 50 entries

🤖 Generated with Claude Code

- Add Breadcrumb struct with message, category, level, data, timestamp
- Add recordBreadcrumb and getBreadcrumbs to TrackRepository2 protocol
- Implement breadcrumb buffering (max 50 entries) in TrackRespositoryImpl
- Include breadcrumbs when sending Flutter crash reports
- Add recordBreadcrumb to Container protocol and implementations
- Expose recordBreadcrumb via @_spi(FlutterBridge) in NubrickExperiment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
t-jimbo and others added 8 commits January 6, 2026 17:15
- Add BreadcrumbCategory enum (navigation, ui, http, console, custom)
- Add BreadcrumbLevel enum (debug, info, warning, error, fatal)
- Update Breadcrumb struct to use enums instead of strings
- Add Flutter Bridge compatible recordBreadcrumb overload for string-based data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Explain expected data structure from Flutter's method channel with inline comments for each type cast.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Change Breadcrumb, BreadcrumbCategory, BreadcrumbLevel to Codable
- Persist breadcrumbs to UserDefaults on each record
- Load persisted breadcrumbs in processMetricKitCrash
- Clear persisted breadcrumbs after loading (one-time use)

This enables breadcrumbs to be included in native iOS crash reports
delivered by MetricKit in the next app session.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove @_spi(FlutterBridge) from BreadcrumbCategory, BreadcrumbLevel, Breadcrumb
- Remove Flutter Bridge recordBreadcrumb(Dictionary) overload
- Keep only typed recordBreadcrumb(Breadcrumb) for iOS SDK users

Flutter Bridge support will be added in a separate PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- MetricKit crashes: use persisted breadcrumbs (previous session)
- Flutter crashes: use in-memory breadcrumbs (same session, immediate send)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add default timestamp to Breadcrumb initializer
- Record navigation breadcrumb in trackExperimentEvent
- Add doc comment explaining trackExperimentEvent purpose

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Record breadcrumbs when navigating between pages within experiments:
- Modal page navigation (with from/to page IDs)
- Embedded page navigation (with from/to page IDs)
- Tooltip page navigation (with from/to page IDs)
- WebView modal page navigation (with from/to page IDs)
- Modal/Embedded dismissed (with from page ID)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Collaborator Author

@t-jimbo t-jimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • currentPageのreset
  • .navigation or .ui
  • flutterとiosのbreadcrumbsの使い分け
  • 非同期処理にする?

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.

1 participant