Step 25.5: regression
CI / check (push) Successful in 7m27s
Details
CI / check (push) Successful in 7m27s
Details
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cd6c4a292f
commit
3e0c9a58e1
|
|
@ -153,6 +153,7 @@ Removes "automation / standing routes and auto-accept rules" from the deferred l
|
||||||
- The "while you were away" screen gains the per-pilot logbook from §2, with company totals.
|
- The "while you were away" screen gains the per-pilot logbook from §2, with company totals.
|
||||||
- **Test:** Component tests: the chip counts down and disappears when the window ends; the indicator appears for slow catch-ups only; the logbook lists each pilot's jobs, deadheads, rests, XP, and current location, and totals match the sum of entries.
|
- **Test:** Component tests: the chip counts down and disappears when the window ends; the indicator appears for slow catch-ups only; the logbook lists each pilot's jobs, deadheads, rests, XP, and current location, and totals match the sum of entries.
|
||||||
- **Amended by CR-024:** The "while you were away" screen opens with a banner when the fleet went quiet ("Your fleet went quiet on [date, time] after [24 h] without orders.") and a Back to work button; sleeping Independent pilots read "Waiting for orders".
|
- **Amended by CR-024:** The "while you were away" screen opens with a banner when the fleet went quiet ("Your fleet went quiet on [date, time] after [24 h] without orders.") and a Back to work button; sleeping Independent pilots read "Waiting for orders".
|
||||||
|
- **Amended by CR-025:** The per-pilot logbook moves from the pop-up to the Logbook screen, built from logbook entries and covering every pilot (Step 25.4).
|
||||||
|
|
||||||
### Step 19.8 — Balance
|
### Step 19.8 — Balance
|
||||||
- Extend the Phase 12 balance script with an "away" scenario: the player sets all hired pilots to Independent and closes the app for 8 real hours.
|
- Extend the Phase 12 balance script with an "away" scenario: the player sets all hired pilots to Independent and closes the app for 8 real hours.
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ Record these in `DECISIONS.md` and `implementation-plan.md` §0.5, using the nex
|
||||||
- **Test:** After sleep, running "Back to work" lets Independent pilots take jobs again in the next decision round; so does any other manual decision, such as buying fuel.
|
- **Test:** After sleep, running "Back to work" lets Independent pilots take jobs again in the next decision round; so does any other manual decision, such as buying fuel.
|
||||||
|
|
||||||
### Step 22.5 — Client: return banner, status, and setting
|
### Step 22.5 — Client: return banner, status, and setting
|
||||||
|
- **Amended by CR-025:** The sleep banner stays at the top of the highlights pop-up, under its title.
|
||||||
|
|
||||||
- The "while you were away" screen shows the sleep banner and "Back to work" button when the fleet went quiet. HQ shows "Fleet asleep — waiting for your orders" with the same button while asleep.
|
- The "while you were away" screen shows the sleep banner and "Back to work" button when the fleet went quiet. HQ shows "Fleet asleep — waiting for your orders" with the same button while asleep.
|
||||||
- Pilot status lines show "Waiting for orders" for sleeping Independent pilots.
|
- Pilot status lines show "Waiting for orders" for sleeping Independent pilots.
|
||||||
|
|
|
||||||
|
|
@ -586,6 +586,7 @@ The game has had no server since CR-014. When a later or unfinished change reque
|
||||||
### Step 9.2 — "While you were away" summary
|
### Step 9.2 — "While you were away" summary
|
||||||
- When state contains unacknowledged summaries, show a modal listing each completed delivery (ship, route, credits, XP, discoveries). Dismissing acknowledges them.
|
- When state contains unacknowledged summaries, show a modal listing each completed delivery (ship, route, credits, XP, discoveries). Dismissing acknowledges them.
|
||||||
- **Test:** Component test shows the modal with two seeded summaries; dismissing calls acknowledge and hides it.
|
- **Test:** Component test shows the modal with two seeded summaries; dismissing calls acknowledge and hides it.
|
||||||
|
- **Amended by CR-025:** The summary is the highlights pop-up: its duration, the sleep banner, company totals, at most 3 highlights and at most 5 pilot lines, on one phone screen, or a direct list for 3 events or fewer; the detail is on the Logbook screen (Steps 25.3, 25.4). It still opens on unseen deliveries and finished upgrades.
|
||||||
|
|
||||||
### Step 9.3 — Tutorial contract board
|
### Step 9.3 — Tutorial contract board
|
||||||
- During tutorial, the Contracts screen shows the tutorial board: route, cargo, payout, estimated trip time (computed with sim), and a "Fly it" button. The button is disabled while a tutorial run is in flight.
|
- During tutorial, the Contracts screen shows the tutorial board: route, cargo, payout, estimated trip time (computed with sim), and a "Fly it" button. The button is disabled while a tutorial run is in flight.
|
||||||
|
|
|
||||||
|
|
@ -539,4 +539,6 @@ Spec: `memory-bank/change-requests/CR-025-short-away-summary.md` (received as "C
|
||||||
- [x] **Step 25.2 — Sim: summary builder.** `buildAwaySummary` (`packages/sim/src/away.ts`, pure) takes the absence (`from`, `to`), the logbook entries, every pilot with where they are now, and the problems found from the state, and returns the duration, totals (net, deliveries, discoveries, loan repaid), at most 3 highlights in priority order (discovery, level-up, goal ready, scripted flavor, biggest job, problem) with the overflow count, at most 5 pilot lines by net with the rest summed and the idle count, and the direct list for 3 events or fewer. `flightNet` is payout − pilot share − fuel used − loan repayment. The sim's `LogbookEntry` and the save's `LogEntry` are checked to be the same type. Wording in content (`content.awayWording`, `{name}` placeholders). Tests: `packages/sim/test/away.test.ts` (50 pilots: 5 lines and an overflow line equal to the other 45; priority order and the cap with the right overflow; totals, with fuel bought not counted; the direct list for 2 events and not for 4; only the absence); `packages/engine/test/logbook.test.ts` (an entry's net equals the delivery summary's credits less its fuel); `packages/content/test/onboarding.test.ts` (the wording).
|
- [x] **Step 25.2 — Sim: summary builder.** `buildAwaySummary` (`packages/sim/src/away.ts`, pure) takes the absence (`from`, `to`), the logbook entries, every pilot with where they are now, and the problems found from the state, and returns the duration, totals (net, deliveries, discoveries, loan repaid), at most 3 highlights in priority order (discovery, level-up, goal ready, scripted flavor, biggest job, problem) with the overflow count, at most 5 pilot lines by net with the rest summed and the idle count, and the direct list for 3 events or fewer. `flightNet` is payout − pilot share − fuel used − loan repayment. The sim's `LogbookEntry` and the save's `LogEntry` are checked to be the same type. Wording in content (`content.awayWording`, `{name}` placeholders). Tests: `packages/sim/test/away.test.ts` (50 pilots: 5 lines and an overflow line equal to the other 45; priority order and the cap with the right overflow; totals, with fuel bought not counted; the direct list for 2 events and not for 4; only the absence); `packages/engine/test/logbook.test.ts` (an entry's net equals the delivery summary's credits less its fuel); `packages/content/test/onboarding.test.ts` (the wording).
|
||||||
- [x] **Step 25.3 — Client: highlights pop-up.** New `getLogbook` command: entries, the absence (`awaySince` to now), the last closed one, and problems from the state (`awayProblems` in `packages/engine/src/game/away.ts`: a ship that can't reach anywhere on the fuel aboard, one that needs emergency fuel, a Manual ship whose stored board has no job it could take, credits below the floor with Independent pilots). The pop-up (`apps/web/src/components/AwaySummary.tsx`) still opens on unseen deliveries and finished upgrades, and builds its contents with `buildAwaySummary`: "While you were away · 9 h 40 m", the sleep banner, a totals row, up to 3 highlights and "+N more in the Logbook", up to 5 pilot lines ("Rosa · 6 jobs · +12,300 cr · Resting at Ceres", a Level up badge), "+N more pilots" and the idle line; a short absence lists its events instead ("Dusty Mule delivered Consumer Goods to Moon, +410 cr"). View logbook and Done both close it; View logbook goes to `/logbook?range=absence` (Step 25.4). The builder now drops what a short absence lists (discoveries, level-ups, the biggest job) before capping, and shows each pilot's highest level-up only. Tests: `apps/web/test/away-summary.test.tsx` (the title; the direct list; 50 pilots: totals, 3 highlights and the overflow, 5 lines plus the rest and the idle line; "+N more" only when needed; Done); `packages/engine/test/logbook.test.ts` (`getLogbook`'s windows; each problem); new e2e `apps/web/e2e/25-3-away-fits.e2e.ts` (8 Independent pilots at 375×667: the sheet doesn't scroll and Done is on screen). Tests about per-delivery detail now check the net in the pop-up (pilot share, the lender's cut) or wait for the Logbook screen (rest, the pilot logbook). Screenshots: `docs/screenshots/25-3-away-{phone,desktop}.png`.
|
- [x] **Step 25.3 — Client: highlights pop-up.** New `getLogbook` command: entries, the absence (`awaySince` to now), the last closed one, and problems from the state (`awayProblems` in `packages/engine/src/game/away.ts`: a ship that can't reach anywhere on the fuel aboard, one that needs emergency fuel, a Manual ship whose stored board has no job it could take, credits below the floor with Independent pilots). The pop-up (`apps/web/src/components/AwaySummary.tsx`) still opens on unseen deliveries and finished upgrades, and builds its contents with `buildAwaySummary`: "While you were away · 9 h 40 m", the sleep banner, a totals row, up to 3 highlights and "+N more in the Logbook", up to 5 pilot lines ("Rosa · 6 jobs · +12,300 cr · Resting at Ceres", a Level up badge), "+N more pilots" and the idle line; a short absence lists its events instead ("Dusty Mule delivered Consumer Goods to Moon, +410 cr"). View logbook and Done both close it; View logbook goes to `/logbook?range=absence` (Step 25.4). The builder now drops what a short absence lists (discoveries, level-ups, the biggest job) before capping, and shows each pilot's highest level-up only. Tests: `apps/web/test/away-summary.test.tsx` (the title; the direct list; 50 pilots: totals, 3 highlights and the overflow, 5 lines plus the rest and the idle line; "+N more" only when needed; Done); `packages/engine/test/logbook.test.ts` (`getLogbook`'s windows; each problem); new e2e `apps/web/e2e/25-3-away-fits.e2e.ts` (8 Independent pilots at 375×667: the sheet doesn't scroll and Done is on screen). Tests about per-delivery detail now check the net in the pop-up (pilot share, the lender's cut) or wait for the Logbook screen (rest, the pilot logbook). Screenshots: `docs/screenshots/25-3-away-{phone,desktop}.png`.
|
||||||
- [x] **Step 25.4 — Client: Logbook screen.** `/logbook` (`apps/web/src/screens/Logbook.tsx`), reached from View logbook and a Logbook card on the Bridge: the last 7 days from `getLogbook`, filtered by pilot (All pilots or one) and time (This absence, Last 24 h, Last 7 days), both kept in the URL. "This absence" is the one the summary shows: the open one while it's showing, else the last one closed. `pilotLogbook(state, entries)` groups entries by pilot in roster order (then the company's own, such as goals), newest first, with totals (jobs, deadheads, paid, pilot shares, fuel, to the lender, net, XP). Each line has its time (and date on earlier days) and every figure: a job's good, route, payout, share, fuel, lender and XP; deadheads; refuels with who bought them; rests; finished upgrades; discoveries; level-ups; goals. 50 lines per pilot, then Show more. Tests: `apps/web/test/logbook-screen.test.tsx` (every kind of line with its detail, including the pilot share, the lender's cut and rest that moved out of the pop-up; the pilot and range filters; View logbook opens This absence with the pop-up's net and deliveries; the Bridge link); `apps/web/test/board-logbook.test.tsx` (the logbook from entries, its totals). Screenshots: `docs/screenshots/25-4-logbook-{phone,desktop}.png`.
|
- [x] **Step 25.4 — Client: Logbook screen.** `/logbook` (`apps/web/src/screens/Logbook.tsx`), reached from View logbook and a Logbook card on the Bridge: the last 7 days from `getLogbook`, filtered by pilot (All pilots or one) and time (This absence, Last 24 h, Last 7 days), both kept in the URL. "This absence" is the one the summary shows: the open one while it's showing, else the last one closed. `pilotLogbook(state, entries)` groups entries by pilot in roster order (then the company's own, such as goals), newest first, with totals (jobs, deadheads, paid, pilot shares, fuel, to the lender, net, XP). Each line has its time (and date on earlier days) and every figure: a job's good, route, payout, share, fuel, lender and XP; deadheads; refuels with who bought them; rests; finished upgrades; discoveries; level-ups; goals. 50 lines per pilot, then Show more. Tests: `apps/web/test/logbook-screen.test.tsx` (every kind of line with its detail, including the pilot share, the lender's cut and rest that moved out of the pop-up; the pilot and range filters; View logbook opens This absence with the pop-up's net and deliveries; the Bridge link); `apps/web/test/board-logbook.test.tsx` (the logbook from entries, its totals). Screenshots: `docs/screenshots/25-4-logbook-{phone,desktop}.png`.
|
||||||
- [ ] Step 25.5 — Regression
|
- [x] **Step 25.5 — Regression.** CR-025 §7 applied: plan 0.5 (0.5.140–0.5.142, recorded with the CR) and Step 9.2; CR-021 Step 19.7 (the logbook moves to its screen); CR-024 Step 22.5 (the banner stays at the top). Full suite: typecheck, lint, 1498 unit tests and 11 e2e tests pass.
|
||||||
|
|
||||||
|
**Phase 25 is complete; stopped for review.** Manual check for the user: with several Independent pilots, leave the game for a few hours, reopen on a phone, and check that "While you were away" fits on one screen without scrolling, then that View logbook shows the full detail for that absence.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue