Skip to content

feat: auto sync reading history on startup#699

Merged
everpcpc merged 1 commit intomainfrom
codex/reading-history-auto-sync
Mar 27, 2026
Merged

feat: auto sync reading history on startup#699
everpcpc merged 1 commit intomainfrom
codex/reading-history-auto-sync

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

Problem

Reading history only synced after opening the offline tab, which left app launch and foreground resume with stale local history data. The new localization workflow change also exposed that parallel translate.py update calls can corrupt Localizable.xcstrings.

Approach

Move automatic reading history sync to the app lifecycle so it runs when the app becomes ready and again when the scene returns to active, while keeping a configurable minimum interval and a dedicated in-flight guard to avoid duplicate runs. Add a network setting for the minimum interval, with 0 disabling automatic sync, and keep the sync success notification consistent for both automatic and manual triggers.

Scope

  • Start automatic reading history sync from ContentView instead of OfflineView
  • Add readingHistoryAutoSyncIntervalHours to AppConfig and expose it in Settings
  • Update InstanceInitializer to enforce interval checks and avoid overlapping history sync tasks
  • Add localized strings for the new setting
  • Document sequential-only localization updates in the repo skill

Validation

  • make format
  • make build
  • make localize
  • ./misc/translate.py list

Start reading history sync when the app becomes ready instead of waiting for the offline tab, and add a configurable minimum auto-sync interval with 0 meaning disabled.

Also check again on app activation, keep a dedicated in-flight guard for reading history sync, and document that localization updates must write Localizable.xcstrings sequentially to avoid file corruption.
@everpcpc everpcpc merged commit a1c3305 into main Mar 27, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/reading-history-auto-sync branch March 27, 2026 07:05
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