fix(plugins): refresh local repositories when preserving them on empty remote

The preserve-local branch previously returned before scheduling any
repository refreshes, leaving local repositories stale for the whole
session on cold start. They now refresh (without pushing) before the
early return, matching the non-empty-remote path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Aniket Tuli 2026-06-12 03:03:45 -07:00
parent 135f4731b8
commit 141d74a814

View file

@ -116,6 +116,9 @@ actual object PluginRepository {
if (shouldPreserveLocalPluginRepositories(urls, _uiState.value.repositories)) {
log.w { "pullFromServer — remote empty while local has repositories; preserving local" }
_uiState.value.repositories.forEach { repo ->
refreshRepository(repo.manifestUrl, pushAfterRefresh = false)
}
initialized = true
return
}