Add to this week and favorite (Feature 15) #147

2 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 bbd66e49f2 Share the Draft board's swap step with Add to this week
CI / ci (push) Successful in 4m57s
CI / ci (pull_request) Successful in 5m0s
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>
2026-10-08 21:04:16 -04:00
dev_agentandClaude Opus 5.5 5267e8a2a7 Wire Add to this week and the favorite heart on the dinner detail
CI / ci (push) Successful in 5m11s
CI / ci (pull_request) Successful in 5m6s
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>
2026-10-08 20:52:41 -04:00