useWeekSwap is now the one way a day is swapped: it refuses while a swap
or push of the week is pending, and leaves the week's settled swaps and
pushes behind before sending the swap. The Draft board (sheet, drop and
retry) and the dinner's Add to this week sheet and its Retry all use it,
so a swap from the dinner no longer leaves the Plan saying the earlier
plan's Supply run was made.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add to this week opens a sheet of the household's current week (or next
week by the toggle), Monday to Sunday in the household timezone, each day
with its current dinner. Choosing a day swaps the dinner in through the
Plan's own useSwapDay (PUT /api/v1/plans/{weekStart}/days/{date}); the
screen then says it is being added, added, or why not with Retry, and the
week's plan query is invalidated once added. A week with no plan offers
"Draft this week first", linking to /plan. A dinner already on the week
cannot be added again.
The heart toggles is_favorite through the existing useToggleFavorite,
which now also updates the detail cache optimistically, rolls it back on
failure, and takes only is_favorite from the list-shaped answer so the
detail keeps its recipe. It exposes aria-pressed; a failure shows the
error with Retry.
useSwapDay now also reports its latest swap when it succeeded.
Maestro task 07423ba7-9f91-4ec5-8ab8-1fb92e3c7d2e.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>