Skip to content

fix: stabilize offline mode and background downloads#593

Merged
everpcpc merged 2 commits intomainfrom
codex/offline-background-download-stability
Mar 2, 2026
Merged

fix: stabilize offline mode and background downloads#593
everpcpc merged 2 commits intomainfrom
codex/offline-background-download-stability

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

@everpcpc everpcpc commented Mar 2, 2026

Summary

  • Add a manual offline mode action to the dashboard toolbar menu.
  • Prevent download-category network failures from automatically switching the app to offline mode.
  • Move iOS offline downloads fully to background URLSession for page files, WebPub resources, and PDF files.
  • Rework background completion handling to finalize by completed/total task counts and ignore late callbacks after download status is already persisted.
  • Improve background queue recovery and reduce noisy logs for non-page resource completions.

Testing

  • make format
  • make build-ios
  • make build

everpcpc added 2 commits March 2, 2026 13:11
Add a manual offline-mode action in the dashboard toolbar menu and keep SSE refresh tasks consistent when toggling offline state.

Prevent download-category network errors from auto-switching the app to offline mode.

Unify iOS offline downloads on background URLSession for pages, WebPub resources, and PDF files. Track background progress by per-book total/completed task counts, finalize only when all file callbacks are observed, and ignore late callbacks after book state is already downloaded.

Harden queue recovery when background context is missing, reduce noisy completion logs for non-page resources, and keep background session event completion handling in urlSessionDidFinishEvents.
@everpcpc everpcpc merged commit 543a52e into main Mar 2, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/offline-background-download-stability branch March 2, 2026 05:17
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