diff --git a/memory-bank/progress.md b/memory-bank/progress.md index 975b6a9..0189523 100644 --- a/memory-bank/progress.md +++ b/memory-bank/progress.md @@ -513,4 +513,6 @@ Spec: `memory-bank/change-requests/CR-023-shop-time-rest.md` (received as "CR-02 - [x] **Step 23.1 — Content test.** Every upgrade level's shop time, in game hours (real minutes × time compression), is at least `restGameHours`: today 10, 20 and 30 game hours against a 10-hour rest. Test: `packages/content/test/upgrades.test.ts`. - [x] **Step 23.2 — Engine: duty reset on upgrade completion.** `startUpgrade` records the ship's pilot as `shopPilotId` (save version 8; the 7 → 8 migration sets it null, so an upgrade already under way finishes without the rest), but only when the shop time covers a full rest. `unassignPilot` clears it: a pilot can only fly another ship after leaving this one, so "assigned the whole time" and "didn't fly" are the same check. The shop's end is a new event in the catch-up queue (before arrivals and decisions at the same moment): `finishShop` sets the pilot's duty to zero, ends a rest that would run later, and brings an Independent pilot's next decision forward to the turnaround after it. The dev "finish shop" does the same at once. `Pilot.restingInShopUntil` tells the client. Tests (`packages/engine/test/shop-rest.test.ts`): a pilot near the limit is at zero duty and flies the moment the upgrade ends; one who left and flew another ship keeps their duty; one who left and came back doesn't get the reset; a longer rest ends with the shop and a shorter one runs its course; an Independent pilot comes out rested and decides after the turnaround; catch-up at once equals 30-second steps. `packages/schema/test/save.test.ts`: the 7 → 8 migration. - [x] **Step 23.3 — Client: status line.** While `Pilot.restingInShopUntil` is set, the pilot's card on Pilots and the Bridge's own-pilot panel read "Resting while in the shop — mm:ss" (`ShopRest`, counting down to the upgrade's end) in place of the duty bar, and an Independent pilot's status line reads "Resting while in the shop until …". The Fleet card keeps its "In the shop" countdown. Tests (`apps/web/test/shop-rest.test.tsx`): the line with the right countdown and no duty bar; after the pilot is unassigned the line is gone and the duty bar is back; it counts down with the clock; the Independent status. Screenshots: `docs/screenshots/23-3-shop-rest-phone.png`, `23-3-shop-rest-desktop.png`. -- [ ] Step 23.4 — Regression +- [x] **Step 23.4 — Regression.** Full suite: typecheck, lint, 1432 unit tests and 10 e2e tests pass. + +**Phase 23 is complete; stopped for review.** Manual check for the user: fly a pilot close to the duty limit, start an upgrade at an HQ, and check that the Pilots card reads "Resting while in the shop" and the pilot is ready to fly (no rest, zero duty) the moment the upgrade finishes.