A push whose Supply run was not made was swept from the mutation cache as
soon as another week was shown. If the household pressed "Make the shopping
list" and moved to another week while it was being made, and making it then
failed, coming back showed neither the failure nor a way to make the list:
the week was left on Calendar with no shopping list (F17-R2).
keepWeekMutations now keeps a week's latest push whose Supply run was not
made whatever week is shown. It goes only when the list is made (settle), or
when a push, draft or swap of that week sends a new push or resets it; an
earlier push replaced by a later one is still swept as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A push whose Supply run could not be made stays in the mutation cache, so
leaving the Plan still shows the failure on coming back. Making the
shopping list from that failure was only remembered while the Plan stayed
mounted: after visiting the Supply run and coming back, the Plan said again
that the list could not be made and offered to make it (F17-R1).
usePushToCalendar now has settle, which removes the push shown from the
mutation cache. The Plan calls it once the generate request succeeds,
through mutateAsync, so it is settled even if the Plan was left while the
list was being made. A push never followed by a made list is kept as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The push client parsed only the plan from POST /plans/{weekStart}/push-calendar
and dropped supply_run, so a Supply run that was not made was shown as a
successful push (F17-01). Parse supply_run as the server sends it and tell the
household every outcome on the Plan: made, left as it was in the Supply
archive, or not made, with its recovery: push again for plan_changed (reading
the edited plan again first), or make the shopping list again through the
existing generate endpoint for supply_run_failed. A push whose Supply run
failed stays in the mutation cache like a failed push, so leaving the week
before it settles still shows it on coming back.
Read the week's Supply run again when the push answers, using the Supply run
screen's supplyRunKey, so a cached 404 or the earlier list is not shown for
the freshness window (F17-02).
Maestro task e75db0f0-817f-4eef-84b2-266e793c018a.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>