Skip to content

[codex] Fix offline recovery after reconnect#317

Draft
bpc-oss wants to merge 2 commits into
sindresorhus:mainfrom
bpc-oss:codex/offline-reconnect-packet
Draft

[codex] Fix offline recovery after reconnect#317
bpc-oss wants to merge 2 commits into
sindresorhus:mainfrom
bpc-oss:codex/offline-reconnect-packet

Conversation

@bpc-oss

@bpc-oss bpc-oss commented Jun 27, 2026

Copy link
Copy Markdown

Summary

  • restore offline recovery in the Manifest V3 background worker by listening for browser connection changes
  • treat API network error failures as offline-state transitions so the badge recovers cleanly after reconnect
  • add regression coverage for the reconnect path and harden the reconnect assertions and network-error matching

Root Cause

The current MV3 background worker can render the offline badge, but it does not actively recover when connectivity returns. It also routes fetch-level network failures through a generic error path instead of re-entering offline recovery.

Validation

  • npx -y -p node@22 -p npm@10 npm test
  • git diff --check

Fixes #132.

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.

Notifier stays offline despite regaining connection

1 participant