Skip to content

fix: auto-recover from offline state after reconnect#314

Open
ncthuc2004 wants to merge 1 commit into
sindresorhus:mainfrom
ncthuc2004:issuehunt-132-reconnect-online
Open

fix: auto-recover from offline state after reconnect#314
ncthuc2004 wants to merge 1 commit into
sindresorhus:mainfrom
ncthuc2004:issuehunt-132-reconnect-online

Conversation

@ncthuc2004

@ncthuc2004 ncthuc2004 commented May 16, 2026

Copy link
Copy Markdown

Summary

  • add online/offline connection listeners so the extension can react immediately when network state changes
  • treat API network error as an offline condition and render the offline warning badge instead of a generic error
  • keep alarm-based polling active during offline periods so automatic recovery continues without manual icon clicks
  • add tests for connection listeners and network-error classification

Why

Issue #132 reports that the extension can stay in an offline state until the user manually clicks the extension icon. This patch adds explicit connection-state handling and network-error fallback logic to recover automatically once connectivity returns.

Validation

  • npm run test:js (passing)
  • note: npm run lint:js fails in this environment due repository lint tooling compatibility (util.isDate in eslint-plugin-ava), unrelated to this patch logic

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


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