Skip to content

feat(debug): Dart WorkmanagerDebug API on web + linux (fixes #729) - #730

Open
ened wants to merge 1 commit into
mainfrom
feat/debug-handlers-dart
Open

feat(debug): Dart WorkmanagerDebug API on web + linux (fixes #729)#730
ened wants to merge 1 commit into
mainfrom
feat/debug-handlers-dart

Conversation

@ened

@ened ened commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Implements #729 — the Dart-side mirror of the native WorkmanagerDebug handler API, so the same handler contract works on every platform.

What's in

  • workmanager_platform_interface: WorkmanagerDebug (setCurrent/getCurrent/reset), TaskDebugInfo, TaskResult, LoggingDebugHandler — same shapes as the native Android/iOS API (minus platform context). Exported from the platform interface; the workmanager package re-exports it, so WorkmanagerDebug.setCurrent(LoggingDebugHandler()) works from app code everywhere.
  • web (workmanager_web): emits started / completed / failed + exceptions in the task execution path (_runTask).
  • linux (workmanager_linux): same emissions in BackgroundTaskRunner.run (including the dispatcher-threw path).
  • windows: will land with the windows port (feat(windows): workmanager_windows — Task Scheduler based background execution (fixes #324) #717) — noted in the issue.
  • Tests: handler routing, exception routing, reset, no-op default, logging smoke test. All packages analyze clean; platform-interface, web, linux and workmanager test suites pass.

Android/iOS native APIs are untouched.

Adds the Dart-side mirror of the native WorkmanagerDebug handler API to
workmanager_platform_interface (TaskDebugInfo, TaskResult,
WorkmanagerDebug.setCurrent/getCurrent/reset, LoggingDebugHandler) and
emits status updates from the Dart execution paths:

- web: started/completed/failed + exceptions in WorkmanagerWeb._runTask.
- linux: started/completed/failed + exceptions in BackgroundTaskRunner.run.
- windows: lands with the windows port (#717).

The workmanager package re-exports the platform interface, so
WorkmanagerDebug.setCurrent(LoggingDebugHandler()) works from app code on
every platform with the same handler contract as the native API.
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