Problem
The folder/account offline state is only reached through SyncOutcome::NetworkError (#162), i.e. when the remote ensurer gets a transport error. Other persistent failure modes - HTTP 5xx from the server, WebDAV errors, a broken reverse proxy, repeated engine crashes - keep ending as Failed forever: the summary still reads "Connected" and the folder retries on every trigger without ever telling the user the account is effectively unreachable.
Reference pattern: Iotas
Iotas keeps a SYNC_FAIL_OFFLINE_THRESHOLD = 2 counter: two consecutive failed sync runs flag offline = true (shown in the UI), and the next successful run clears it ("Recovered connectivity"). Simple, and it covers every error class without having to classify each one.
Proposal
- Count consecutive
Failed (and NetworkError) outcomes per folder scheduler.
- After N consecutive failures (N=2 or 3), transition to the existing Offline state with a message like "Synchronization is failing repeatedly - check the server".
- Reset the counter on any outcome that ran the engine (
Success / Conflict).
- Keep the existing per-error states (AuthFailed, KeyringLocked, DeleteReview) taking precedence as they do today.
Acceptance criteria
Problem
The folder/account offline state is only reached through
SyncOutcome::NetworkError(#162), i.e. when the remote ensurer gets a transport error. Other persistent failure modes - HTTP 5xx from the server, WebDAV errors, a broken reverse proxy, repeated engine crashes - keep ending asFailedforever: the summary still reads "Connected" and the folder retries on every trigger without ever telling the user the account is effectively unreachable.Reference pattern: Iotas
Iotas keeps a
SYNC_FAIL_OFFLINE_THRESHOLD = 2counter: two consecutive failed sync runs flagoffline = true(shown in the UI), and the next successful run clears it ("Recovered connectivity"). Simple, and it covers every error class without having to classify each one.Proposal
Failed(andNetworkError) outcomes per folder scheduler.Success/Conflict).Acceptance criteria
Failedoutcomes move the folder to OfflineSuccessclears the flag and the counterAuthFailed/KeyringLocked/DeleteReviewstill win over Offline