Queue Supply run toggles made offline and replay them in order (Feature 17)
CI / ci (push) Successful in 4m57s
CI / ci (pull_request) Successful in 5m5s

A toggle made while the server cannot be reached (the browser is offline,
or its PATCH fails with a network error) now stays pending in the existing
serial toggle mutation, laid over the list with a "will sync" marker, and
is sent once the network status says the server is reachable again. Every
toggle is saved in order in localStorage until it settles, and
SupplyRunSync replays the saved ones after a reload. Any answer from the
server settles a toggle: a 409 archived discards it, puts the count back
and shows the refusal; other refusals surface as before and are never
queued.

The Supply run and the household schedule are saved on the device too, so
the Supply run screen opens offline from the saved list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 09:58:49 -04:00
co-authored by Claude Opus 5.5
parent 5d7906ae0d
commit b7608d0a9a
6 changed files with 655 additions and 64 deletions
+15
View File
@@ -200,6 +200,21 @@
color: var(--color-neutral-700);
}
/* Toggled while the server cannot be reached: the change is saved here and
sent once it can be. */
.willSync {
display: inline-flex;
align-items: center;
gap: 4px;
margin-left: 8px;
font-family: var(--font-body);
font-size: 12px;
font-weight: 700;
color: var(--color-neutral-700);
text-decoration: none;
vertical-align: middle;
}
.qty {
flex: none;
font-family: var(--font-body);