Add to this week and favorite (Feature 15, task 3)
Maestro task 07423ba7-9f91-4ec5-8ab8-1fb92e3c7d2e. Wires the two controls the mobile detail screen rendered in their resting state.
"Add to this week" opens a Sheet listing the current week's seven days with each day's current dinner and a toggle to the next week; choosing a day swaps via the Plan board's own endpoint (PUT /api/v1/plans/{weekStart}/days/{date}), reusing its query keys and mutation pattern rather than adding a parallel swap path. A week with no plan offers "Draft this week first" linking to /plan — the AI never invents a plan. Success shows a confirmation and invalidates the plan query.
The heart toggles is_favorite through POST /dinners/{id}/favorite, optimistically with rollback on failure and an aria-pressed state. The detail cache holds the detail shape while that endpoint answers with the list-style dinner, so the heart patches the cached dinner rather than overwriting it. Weeks are Monday-start in the household timezone, using the existing week utilities.
The developer reports typecheck, tests and build passing; no Go file changed. Recorded for the next task (tablet kitchen reading mode): the detail screen still has one column switched by breakpoint, ActionBar is now just AddToWeek plus FavoriteHeart (reuse both), and any change to a dinner should update dinnerDetailKey(id) directly rather than replacing it with the list-style shape.
## Add to this week and favorite (Feature 15, task 3)
Maestro task `07423ba7-9f91-4ec5-8ab8-1fb92e3c7d2e`. Wires the two controls the mobile detail screen rendered in their resting state.
"Add to this week" opens a Sheet listing the current week's seven days with each day's current dinner and a toggle to the next week; choosing a day swaps via the Plan board's own endpoint (`PUT /api/v1/plans/{weekStart}/days/{date}`), reusing its query keys and mutation pattern rather than adding a parallel swap path. A week with no plan offers "Draft this week first" linking to /plan — the AI never invents a plan. Success shows a confirmation and invalidates the plan query.
The heart toggles `is_favorite` through `POST /dinners/{id}/favorite`, optimistically with rollback on failure and an `aria-pressed` state. The detail cache holds the detail shape while that endpoint answers with the list-style dinner, so the heart patches the cached dinner rather than overwriting it. Weeks are Monday-start in the household timezone, using the existing week utilities.
The developer reports typecheck, tests and build passing; no Go file changed. Recorded for the next task (tablet kitchen reading mode): the detail screen still has one column switched by breakpoint, `ActionBar` is now just `AddToWeek` plus `FavoriteHeart` (reuse both), and any change to a dinner should update `dinnerDetailKey(id)` directly rather than replacing it with the list-style shape.
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>
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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add to this week and favorite (Feature 15, task 3)
Maestro task
07423ba7-9f91-4ec5-8ab8-1fb92e3c7d2e. Wires the two controls the mobile detail screen rendered in their resting state."Add to this week" opens a Sheet listing the current week's seven days with each day's current dinner and a toggle to the next week; choosing a day swaps via the Plan board's own endpoint (
PUT /api/v1/plans/{weekStart}/days/{date}), reusing its query keys and mutation pattern rather than adding a parallel swap path. A week with no plan offers "Draft this week first" linking to /plan — the AI never invents a plan. Success shows a confirmation and invalidates the plan query.The heart toggles
is_favoritethroughPOST /dinners/{id}/favorite, optimistically with rollback on failure and anaria-pressedstate. The detail cache holds the detail shape while that endpoint answers with the list-style dinner, so the heart patches the cached dinner rather than overwriting it. Weeks are Monday-start in the household timezone, using the existing week utilities.The developer reports typecheck, tests and build passing; no Go file changed. Recorded for the next task (tablet kitchen reading mode): the detail screen still has one column switched by breakpoint,
ActionBaris now justAddToWeekplusFavoriteHeart(reuse both), and any change to a dinner should updatedinnerDetailKey(id)directly rather than replacing it with the list-style shape.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>Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
Independent Codex gpt-6-sol review: APPROVED for this exact commit.