Skip to main content

bug_handler 1.0.0-dev.7 copy "bug_handler: ^1.0.0-dev.7" to clipboard
bug_handler: ^1.0.0-dev.7 copied to clipboard

Composable Flutter error-reporting toolkit with rich context providers, privacy sanitizers, and pluggable reporters.

CHANGELOG #

1.0.0-dev.7 #

  • Added ReportAttachment.fromEvent for custom reporters that need the sanitized JSON name, MIME type and UTF-8 bytes on native, JavaScript and WebAssembly targets. Native reporters can still write files with generateFile. On web, pass the attachment bytes to your upload or download API.
  • Added portable data readers for app, device and network context. Code that injects native plugin objects on the web must migrate to AppContextProvider.withReaders, DeviceContextProvider.withReader or NetworkContextProvider.withReaders. Existing native injection and the default constructors remain available.
  • Fixed Flutter startup on web and binding-zone mismatches. On a fresh launch, BugReportBindings initializes Flutter inside its guarded zone. If your app already initialized Flutter, call it from that same zone. That zone keeps its existing async error handler.
  • Fixed ErrorBoundary automatic callbacks and streams collecting manual-only context. The Report action still requests it and now shows whether a reporter confirmed delivery. Guarded streams preserve normalized errors, stack traces and event order when the source closes during reporting. Manual reports also retain UI context between animation frames.
  • Fixed the console and share reporters exposing fields removed or rewritten by sanitizers. Their default summaries, subjects and attachment names now use the serialized payload. Browser sharing uses the Web Share API when it accepts the attachment, with a local download when file sharing is unavailable. A reported dismissal or overlapping native share request returns false.
  • Fixed masking for short secrets, case and separator variants of sensitive keys, and device identifiers. The default sanitizer no longer masks canonical event and breadcrumb timestamps as card numbers. Allow-lists combine sibling selections within each list item. Filters and sanitizers handle nested string-keyed maps returned by Flutter platform channels. A terminal ** denies the whole matching subtree in a deny-list, and blank allow paths select nothing. Size budgets count UTF-8 JSON bytes and can trim pinned entries to fit. The smallest possible object is {} (two bytes).
  • Added a persistent browser outbox scoped to the app's origin. Native queues keep their existing JSON files. Replay preserves filtered payloads, acknowledges the record actually delivered and retains replacements made during delivery. IDs distinguish captures made in the same clock tick.
  • Fixed CachedContextProvider.clearCache() returning stale context when a previous collection was still running.
  • Compatibility with dart_helper_utils 6.x and 7.x and Equatable 2.x and 3.x. Equatable 3 can consider metadata or subclass values equal across different runtime types. Apps that rely on the old distinction can keep equatable: ^2.0.8 or include a type discriminator in those values. The package now declares its effective minimum of Flutter 3.38.1 (Dart 3.10). The bundled example uses Flutter 3.47.7 or later and an updated Android build.

1.0.0-dev.6 #

  • Added installable AI coding-assistant support for Claude Code and OpenAI Codex, distributed from the GitHub repository (not the pub.dev archive): /plugin marketplace add omar-hanafy/bug_handler (Claude Code) or codex plugin marketplace add omar-hanafy/bug_handler (Codex CLI), then install the bug-handler plugin. One shared plugin ships seven package-specific skills - setup-reporting, guard-workflow, extend-pipeline, tune-privacy, diagnose-reporting, migrate-legacy-api (0.0.1-dev.x -> 1.0.0-dev.x), and audit-error-handling - backed by verified API/behavior references, production integration patterns, and migration fixtures.
  • Added "AI coding-assistant support" section in the README and detailed plugin documentation in doc/ai-plugin.md; repository-level maintainer guidance (AGENTS.md), plugin integrity validation (dart tool/validate_plugin.dart), and CI.
  • No runtime changes: the Dart/Flutter package API and behavior are identical to 1.0.0-dev.5. The plugin tree is excluded from the pub.dev archive via .pubignore.

1.0.0-dev.5 #

  • Added BugReportClient.captureSafely(): the single never-throw reporting entry point. It is a no-op before initialize() and swallows any failure in context collection, sanitization, or delivery, so reporting can never crash the host app.
  • Fixed guard()/guardSync() reporting path: no longer throws when the client is uninitialized or delivery fails; Err is still returned to callers either way.
  • Fixed ErrorBoundary reporting: a delivery failure no longer throws into microtasks, stream onError handlers (where it also swallowed the stream's error), or the "Report" button.
  • Fixed BugReportBindings: uncaught framework/zone/isolate errors are now reported with handled: false. Previously they were marked handled: true, which mislabeled events and made Policy(reportHandled: false) drop every uncaught error.
  • Fixed default ErrorBoundary fallback: the "Report" button uses ScaffoldMessenger.maybeOf, so it no longer crashes when the boundary sits above MaterialApp.
  • Added first test suite locking the never-throw invariant (uninitialized client, throwing reporter, failing outbox).

1.0.0-dev.4 #

updated all deps

1.0.0-dev.3 #

used dart_helper_utils: ^6.0.0

1.0.0-dev.2 #

  • Updated debs

1.0.0-dev.1 #

  • Prepare for publishing: filled out pubspec metadata (links, description, supported platforms).
  • Added Flutter example app showcasing context providers, guards, and reporters.
  • Fixed analyzer warnings and enforced dependency version constraints.

1.0.0 #

  • INITIAL: Initial release.