Build the Supply run screen at /plan/shopping (Feature 17) #136

4 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 15135718fb Drop the Shopping list count when a Supply run refetch fails (Feature 17)
CI / ci (push) Successful in 5m1s
CI / ci (pull_request) Successful in 4m55s
The Plan page read run.data?.needed_count, which TanStack Query keeps
after a later refetch fails, so the link showed a stale count beside the
error banner. Show the count only on a successful read, and test a
successful read followed by a failed refetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:27:28 -04:00
dev_agentandClaude Opus 5.5 d784415f54 Show a failed Supply run read on the Plan screen with Retry (Feature 17)
CI / ci (push) Successful in 4m59s
CI / ci (pull_request) Successful in 5m39s
The Plan's Shopping list action read the week's Supply run but never
checked for a failed read, showing "Shopping list" with no count exactly
as for a week with no list. WeekBoard now reads the Supply run once and
shows a failed read in the screen's ErrorBanner with Retry, while the
Shopping list action still opens /plan/shopping?week=<Monday>. A 404 (no
list yet) stays a link with no count and no failure.

Task: 40cc2de5-6628-4b32-a491-ab8e02911d88 (SR-05)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 09:10:01 -04:00
dev_agentandClaude Opus 5.5 0c534c5249 Open the Supply run from the Plan and keep refused toggles shown (Feature 17)
CI / ci (pull_request) Successful in 4m56s
CI / ci (push) Successful in 5m1s
Address review findings on the Supply run screen:

- The Plan's Shopping list action is now a link to
  /plan/shopping?week=<the week shown>, an outline action from tablet up
  and a grape link under the Draft board on mobile. It reads
  "Shopping list · N" with the count still to buy once the week has a
  Supply run, and plain "Shopping list" until then; the screen offers to
  make the list. The "arrives once the Supply run is built" tooltip is
  gone.
- The kicker is "Supply run · Oct 5 – 11", the week's dates from
  weekLabel, as in mocks 1l, 2b and 2f.
- A refused toggle stays shown until a later toggle of its item
  supersedes it, such as its Retry; a later toggle of another item
  succeeding no longer hides it. Toggles are kept (gcTime Infinity) so a
  failure is not collected unseen, and a settled toggle removes the
  earlier toggles of its item.
- A toggle refused with 409 archived invalidates the Supply run, which is
  read again and renders read-only with the Archived tag; its failure is
  shown without Retry.

Maestro task 40cc2de5-6628-4b32-a491-ab8e02911d88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:49:29 -04:00
dev_agentandClaude Opus 5.5 23a1bc0312 Build the Supply run screen at /plan/shopping (Feature 17)
CI / ci (pull_request) Successful in 5m1s
CI / ci (push) Successful in 5m11s
Render the week's shopping list per mocks 1l, 2b and 2f: the "Supply run"
kicker over the week label, the "Shopping list" title with the count still
to buy of all items, the helper line, and one surface card per dinner with
its Bagel name and day. Items toggle optimistically: a toggle is laid over
the server's Supply run while it is pending, toggles are sent one at a time
in one mutation scope, the counts follow the server's answers, and a
refused toggle puts the item and the count back and says why, with Retry.
From tablet up the cards sit in three masonry columns under the Archive
link and a Send to Google Chat action that stays unavailable until
Feature 19. Archived lists render read-only with an "Archived" tag. The
week shown is the Plan's default week, or the Monday given as ?week=.

Correct the Supply archive section of ARCHITECTURE.md: title jobs and
Freeze are ordered by the shopping service's RWMutex, so a freeze waits
for an in-flight title job to store its title or fail.

Maestro task 40cc2de5-6628-4b32-a491-ab8e02911d88.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:19:26 -04:00