Mobile draft board (1f) #117

4 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 870f3462ce Retry an unread draft by reading the plan again
CI / ci (push) Successful in 3m13s
CI / ci (pull_request) Successful in 3m13s
A succeeded draft whose plan read is missing, another plan, or a cache
fallback now retries the plan GET and keeps the job, instead of starting
a new draft. Rebuilding stays on "+ Rebuild week". The tests assert Retry
sends no draft POST, re-reads the plan, keeps the error while the read is
still a cache fallback, and lands the draft on a live matching read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:22:17 -04:00
dev_agentandClaude Opus 5.5 58c415ca1a Land a succeeded draft only on a plan read from the server
CI / ci (push) Failing after 5s
CI / ci (pull_request) Successful in 3m18s
A redraft keeps the plan's id, so a plan the service worker answered from
its cache could pass for the finished rebuild. The API client's apiRead now
says whether a GET was the cached copy; the plan carries it, and the Draft
board shows the retryable draft-unread error instead of a cached plan with
the drafted id. A later read from the server still lands the draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:01:07 -04:00
dev_agentandClaude Opus 5.5 87381fa4b9 Hold a succeeded draft until the plan read is the one drafted
CI / ci (push) Successful in 3m13s
CI / ci (pull_request) Successful in 3m19s
The Draft board let go of a succeeded draft_week job as soon as the plan
was read again, whatever that read returned: a missing plan showed as
"Nothing planned yet" and another plan as the new draft. Keep the job's
plan_id and clear the job only once the plan read has that id; a missing
or different plan is shown as "Couldn't read the draft" with Retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:38:54 -04:00
dev_agentandClaude Opus 5.5 3483faafa9 Add the mobile Draft board at /plan (mock 1f)
CI / ci (push) Successful in 3m12s
CI / ci (pull_request) Successful in 3m15s
The Plan screen shows the selected week's plan: the week title with its
Draft, Synced or "Changes not pushed" tag, the assistant's note beside the
grape "Q" avatar, and a two-column grid of day tiles. Quest-log picks are
teal with a "· NEW" kicker, crock-pot dinners show their start-by time in
the household's zone, and the dashed "+ Rebuild week" tile redrafts the
week, asking first when the plan was pushed to Calendar. "Looks good —
push to Calendar" stays unavailable with a tooltip until Feature 16.

The page opens on next week once this week's plan_draft time has come,
otherwise on this week, with previous / next week buttons. A week with no
plan offers "Draft this week", which starts the draft_week job and shows
skeleton tiles until the plan is read again; a failed draft is shown with
Retry and no plan is made up. web/src/plan/week.ts is the one household
week helper, mirroring internal/household/week.go.

The App route tests that used /plan as a placeholder now use /quick.

Maestro: 4bb14d54-76bc-4e7d-8c35-fa738abd49ff

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:11:28 -04:00