Project

General

Profile

Actions

Feature #64

closed
VJ

Epic #63: Followed meal plan and Today’s meals

Follow and switch meal plans

Feature #64: Follow and switch meal plans

Added by Vince Jurić 11 days ago.

Status:
Done
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Imported from GitHub issue 295.
Source milestone: Milestone 4.
Source labels: enhancement, ready-for-agent.
Original state: closed.

What to build

Type: AFK

Let a signed-in parent explicitly follow one meal plan and resume the same current position on every device. Store the followed choice and per-plan positions in Firestore; guests use local state. Deliver a usable Home summary/link, with full meal rows in GitHub 297.

Acceptance criteria

  • Add localised “Follow this plan” / already-following state. Browsing does not change the followed plan or shared position. Home links to the Current Planner Day; no selection offers manual plan choice.
  • Persist account-owned selection and per-plan-instance positions in Firestore with owner-only rules, validation, server acknowledgement, subscriptions and account isolation. Retain completion records as today.
  • Completion-based advancement is atomic/idempotent under concurrent device updates, reset and retries; initialise absent positions using the existing highest-completed-day rule, Day 1 when unused.
  • Preserve both plans’ progress/positions when switching; reset remains separate. Deleted/recreated instances do not silently inherit the old followed choice.
  • Guests retain local choice/positions. On sign-in, existing account state wins; offer adoption of guest choice only if account choice is absent. Sign-out clears local account state, not shared data.
  • Seed missing account selection/positions from an authenticated legacy reminder plan/current position without overwriting existing shared state. Migration is safe across devices and retries and cannot resurrect replaced state. Coordinate shared schedule migration with GitHub 296.
  • Integrate safely with existing reminders: switching ends the previous schedule, cancels local pending notifications, preserves positions and explains eventual cancellation on other devices. Following alone requests no permission. Do not report failed persistence/cancellation as full success.
  • Respect access and unavailable-plan states, support Serbian Latin/English, and test persistence, navigation, migration, account transitions, concurrent completion/reset and failure recovery. Update documentation to distinguish shipped portions from planned work.

Blocked by

None - can start immediately. Shared schedule and notification lifecycle is completed in GitHub 296; preserve current reminder safety in this slice.

Acceptance evidence — 4 November 2026

All eight criteria are supported by the current implementation and automated checks, including the migration fixes. Validation: 715 client Vitest tests, 10 Node release checks, TypeScript and lint pass. Implementation and evidence are currently in the working tree; these ticks do not indicate a deployment.

No data to display

Actions

Also available in: PDF Atom