Skip to content

Conversation

@ua741
Copy link
Member

@ua741 ua741 commented Feb 13, 2026

Description

Tests

Copy link

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

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: 9d383104c1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +70 to +73
if (isOfflineMode) {
// Offline onboarding grants permission without explicitly invoking
// SyncService, so trigger local import right away.
unawaited(checkAndSync());

Choose a reason for hiding this comment

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

P2 Badge Avoid duplicate offline import trigger on permission grant

In offline onboarding, _onTapOfflineGrantPermission now invokes SyncService.instance.onPermissionGranted() before firing PermissionGrantedEvent, but this listener also calls checkAndSync() when isOfflineMode is true. That means the same permission grant can start a second local import path immediately after (or alongside) SyncService._doSync, causing duplicate full-media scans and, for limited permissions, potentially two overlapping syncAll() runs against the local DB. This adds avoidable startup latency and resource churn right after permission is granted.

Useful? React with 👍 / 👎.

@ua741 ua741 merged commit 9d1842d into main Feb 13, 2026
4 checks passed
@ua741 ua741 deleted the debugImport branch February 13, 2026 06:42
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