Skip to content

fix(offline): default cover sync scope to dashboard libraries#931

Merged
everpcpc merged 7 commits into
mainfrom
codex/offline-cover-sync-dashboard-scope
Jul 5, 2026
Merged

fix(offline): default cover sync scope to dashboard libraries#931
everpcpc merged 7 commits into
mainfrom
codex/offline-cover-sync-dashboard-scope

Conversation

@everpcpc

@everpcpc everpcpc commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Default the Offline Tasks missing-cover sync scope to the current dashboard library selection without clobbering manual picker changes.
  • Refresh the cover sync default scope when dashboard library defaults arrive late after server switching.
  • Snapshot cached cover thumbnails before the sync loop so already-cached covers do not require one filesystem existence check per target, and throttle cached progress updates.
  • Bump the build number to 501 with make bump.

Validation

  • make format
  • git diff --check
  • make build-macos
  • git diff --check origin/main...HEAD

everpcpc added 2 commits July 5, 2026 12:36
Initialize the missing-cover sync library scope from the current dashboard library selection when opening Offline Tasks.

Pass the scope explicitly through the cover sync section so the selected libraries shown in the picker match the IDs used when starting the sync.
@everpcpc everpcpc marked this pull request as ready for review July 5, 2026 04:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abb67ce733

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread KMReader/Features/Offline/ViewModels/OfflineCoverSyncViewModel.swift Outdated
Comment thread KMReader/Features/Offline/Views/OfflineCoverSyncSection.swift
Comment thread KMReader/Features/Offline/Views/OfflineTasksView.swift
Apply the dashboard default scope only while the cover sync scope has not been manually changed for the current instance.

Refresh the scope loader when dashboard library defaults change so late-loaded server selection can initialize the picker without clobbering manual choices.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d450766c90

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread KMReader/Features/Offline/Views/OfflineCoverSyncSection.swift
everpcpc added 4 commits July 5, 2026 12:58
Load existing cover thumbnail ids once before the missing-cover sync loop and skip per-target filesystem checks for cached covers.

Throttle cached progress updates while keeping missing downloads on the existing ThumbnailCache path for cache limit checks, deduplication, storage, and cleanup.
Ignore cancelled or stale cover sync scope loads before applying dashboard defaults.

Avoid treating unchanged picker applies as manual selection, and keep the sync action disabled until the current library scope has finished loading.
Remove the loaded and pending scope task key state from the cover sync view model.

Rely on SwiftUI task cancellation checks during scope loading and fall back to the dashboard default library ids if sync starts before scoped options finish loading.
Throttle cached cover sync progress by elapsed time instead of target count so fast cached scans do not flood MainActor updates.
@everpcpc everpcpc merged commit 66ef3a2 into main Jul 5, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/offline-cover-sync-dashboard-scope branch July 5, 2026 05:21
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