Skip to content

[codex] misc sync and startup fixes#154

Merged
kalzEOS merged 1 commit into
mainfrom
fix/misc-issues
Jun 21, 2026
Merged

[codex] misc sync and startup fixes#154
kalzEOS merged 1 commit into
mainfrom
fix/misc-issues

Conversation

@kalzEOS

@kalzEOS kalzEOS commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added a periodic background sync scheduler and worker.
  • Added settings for refresh-on-startup and configurable sync intervals.
  • Tightened the auth startup flow so the login screen does not flash before saved config loads.
  • Kept the existing fast-start/full-sync flow and cache checkpoints aligned with the new background sync behavior.

Why

  • The app needs automatic library refreshes without manual throttling.
  • Startup auth state needed to wait for persisted config before rendering the login screen.
  • The new sync controls needed to persist and restore cleanly after process restarts.

Validation

  • ./gradlew :app:compileDebugKotlin

@kalzEOS kalzEOS merged commit f7b4976 into main Jun 21, 2026
1 check passed

@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: 8572f9bbc9

ℹ️ 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 on lines +36 to +39
if (ActiveSyncGuard.isActive) {
Timber.d("LibrarySyncWorker: in-app sync already active, skipping this run")
return Result.success()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent worker/app sync overlap

When a scheduled sync starts while the app is not already syncing, this one-time check passes and the worker never reserves the cache for its own writes; if the user opens the app or triggers a manual/progressive sync before the worker finishes, ProgressiveSyncCoordinator can also enter syncBackgroundFull and both jobs write the same section index/checkpoint temp files. Use a shared guard or mutex that the worker holds around syncBackgroundFull and that app sync also honors, rather than only doing this preflight check.

Useful? React with 👍 / 👎.

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