Skip to content

chore: quiet background refreshes and deferred sync retries - #2245

Draft
jvsena42 wants to merge 1 commit into
masterfrom
fix/background-refresh-logs
Draft

jvsena42 wants to merge 1 commit into
masterfrom
fix/background-refresh-logs

Conversation

@jvsena42

@jvsena42 jvsena42 commented Dec 3, 2026

Copy link
Copy Markdown
Member

Fixes #2241
Fixes #2242

Mainnet QA of 3.2.0 found two kinds of misleading log lines: background refreshes that fail because Android blocks the app's network, and sync retries logged as succeeded when they never synced (QA report).

Description

  • CurrencyRepo: the 2-minute rate poll skips its tick while no activity is started. Android blocks a backgrounded app's network about 6 s after it leaves the screen, so those refreshes only failed and logged errors. ON_START already refreshes rates when the user returns.
  • SparkRepo: Spark's SDK keeps syncing in the background. Bitkit can't pause it without disconnecting, so a failed sync read in the background now logs at debug instead of warn.
  • LightningRepo: a sync retry that finds a sync already in progress logs Sync retry deferred to the sync in progress instead of Sync retry succeeded. The running sync loops once more for it, as before.

Out of Scope

Design

N/A — no UI changes.

Preview

N/A

QA Notes

Setup

Dev (regtest) build of this branch on a phone with a Spark wallet.

Journeys

N/A — no user-visible behaviour change.

Manual Tests

  1. Background the app for 5 minutes, then read the app logs for that window: no Currency rates refresh failed errors, and Spark sync failures appear only as debug lines.
  2. Return to the app: rates refresh on ON_START (Currency rates refreshed successfully).

🤖 Generated with Claude Code

Skip currency rate polling while no activity is started, since Android
blocks a backgrounded app's network and ON_START refreshes anyway. Log
Spark's background sync failures at debug. Log a sync retry left to the
sync in progress as deferred instead of succeeded.

Fixes #2241
Fixes #2242

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jvsena42 jvsena42 self-assigned this Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Regtest APK

Built from ac3c93e (run).

Download bitkit-dev-debug universal APK (expires in 30 days).

This branch has not been deployed

No deployments
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.

chore: sync retry logs success when the retry was skipped chore: spark and rate refreshes keep failing in background

1 participant