From 6c90a656bd166c3294a2fcf3964649d88f06237b Mon Sep 17 00:00:00 2001 From: Greg Pomerantz Date: Wed, 9 Sep 2026 16:34:21 -0400 Subject: [PATCH] Self-heal stale saved plans on load (days Nov / stays Sep) Plans persisted by the old re-anchoring have November day dates but September hotel stays, so covers() matched nothing and the base chip / per-day hotel anchoring were wrong. enterTrip now runs the idempotent redateStaysAndPlaces() after loading a saved plan and re-persists, so a stale plan heals itself on the next load without a re-upload. --- mock/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mock/app.js b/mock/app.js index f705763..870cbf5 100644 --- a/mock/app.js +++ b/mock/app.js @@ -2088,6 +2088,11 @@ function enterTrip(id) { days = deep(saved.days); stays = deep(saved.stays); version = saved.version; history = saved.history; hIdx = saved.hIdx; if (saved.bookings) M.trip.bookings = deep(saved.bookings); if (saved.title != null) M.trip.title = saved.title; + // self-heal plans saved by the old re-anchoring, which re-dated the days + // but not the stays (hotel nights then no longer "covered" any day); + // idempotent — a consistent plan is a no-op + redateStaysAndPlaces(); + persistTrip(); } tripDocs = {}; // rehydrated from the server store below // reset per-trip UI state