Skip to content

Show the saved shelf first, then refresh, on a cold start with an unreachable server #53

Open

Description

@StaticHumStudio

What

On 2026-09-30, on the fix/reconnect-resync build (PR #52), an offline cold start on the SM-S948U with Tailscale up and the server gone took about 16s to show the saved Library shelf. Before that branch it sat on a 30 to 47s spinner. The rest is ReachabilityCheckGate (ConnectivityMonitor.kt:320): it serializes probes, so the startup sync, the library load, and the periodic check each run a 5s /ping one after another (logcat 13:48:41, 13:48:46, 13:48:51).

The serialization is deliberate. ReachabilityCheckGateTest pins it, so a check started after connectivity returns never gets the stale failure of one started before.

Proposed shape

Render the cached shelf immediately on load, and run the reachability probe and remote refresh behind it, with the existing banner reporting the outcome. That keeps the gate's freshness guarantee and takes the probe off the path to first paint.

Why not in 2.1.5

It's a load-path change, not a small fix, and 2.1.5 already cuts the wait by half or more.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions