Right pane tabs (Jobs | Planes market) + 5 new plane types with tech-spec panels (ISS-047 part A, v0.28.0) #58

Merged
kamilkrzywda merged 1 commits from feat/right-pane-tabs-plane-market into master 2026-09-20 16:11:35 +02:00
Owner

What changed (ISS-047 part A — "Rework right panel")

Right pane tabs (components/RightPane.tsx, app/globals.css)

  • New tab bar under the kept "Jobs & Market" heading: Jobs (default) and Planes market.
  • Jobs tab = existing Packages section verbatim (testids/hover unchanged — "jobs list stays without big changes").
  • Planes market tab = buy/sell rows (testids unchanged) + a tech-spec card per plane type.

5 new plane types (lib/game/catalog.ts) — progression ladder above the ATR 72 starter:
CRJ-900 (€450k, 6.5t), Embraer E175 (€900k, 9t), Airbus A320-200 (€1.8M, 18t), Airbus A330-200 (€4.5M, 48t), Boeing 777-300ER (€9M, 80t). All downstream logic (buy validation, movement math, payload checks) is data-driven — purely additive.

Tech-spec panels — each card shows price + sell value, max payload (t), cruise speed, fuel burn (L/km), max fuel, and derived max range via new pure maxRangeKm() in lib/sim/movement.ts (closed form of the weighted-burn model; ATR 72 ≈ 4436 km).

Sell-plane cargo guard (lib/game/actions.ts) — selling a plane carrying loaded/expired packages now 409s instead of orphaning its cargo (data-loss fix found while reworking the market).

Tests

  • Unit: +7 tests (maxRangeKm closed form, catalog sanity, sell-guard) → vitest 318 passed (was 311).
  • E2E (CI-only): right-pane market/toasts specs click the Planes tab first; new test asserts all 6 types render with correct ATR range + b777 price; panes spec asserts both tabs, Jobs default-active. No new endpoints → OpenAPI path list unchanged (twelve).

Part B of ISS-047 (ignore-job) follows in a separate PR.

## What changed (ISS-047 part A — "Rework right panel") **Right pane tabs** (`components/RightPane.tsx`, `app/globals.css`) - New tab bar under the kept "Jobs & Market" heading: **Jobs** (default) and **Planes market**. - Jobs tab = existing Packages section verbatim (testids/hover unchanged — "jobs list stays without big changes"). - Planes market tab = buy/sell rows (testids unchanged) + a tech-spec card per plane type. **5 new plane types** (`lib/game/catalog.ts`) — progression ladder above the ATR 72 starter: CRJ-900 (€450k, 6.5t), Embraer E175 (€900k, 9t), Airbus A320-200 (€1.8M, 18t), Airbus A330-200 (€4.5M, 48t), Boeing 777-300ER (€9M, 80t). All downstream logic (buy validation, movement math, payload checks) is data-driven — purely additive. **Tech-spec panels** — each card shows price + sell value, max payload (t), cruise speed, fuel burn (L/km), max fuel, and **derived max range** via new pure `maxRangeKm()` in `lib/sim/movement.ts` (closed form of the weighted-burn model; ATR 72 ≈ 4436 km). **Sell-plane cargo guard** (`lib/game/actions.ts`) — selling a plane carrying loaded/expired packages now 409s instead of orphaning its cargo (data-loss fix found while reworking the market). ## Tests - Unit: +7 tests (maxRangeKm closed form, catalog sanity, sell-guard) → vitest **318 passed** (was 311). - E2E (CI-only): right-pane market/toasts specs click the Planes tab first; new test asserts all 6 types render with correct ATR range + b777 price; panes spec asserts both tabs, Jobs default-active. No new endpoints → OpenAPI path list unchanged (twelve). Part B of ISS-047 (ignore-job) follows in a separate PR.
kamilkrzywda added 1 commit 2026-09-20 16:02:37 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-20 16:02:48 +02:00
kamilkrzywda merged commit a84bc7ed21 into master 2026-09-20 16:11:35 +02:00
kamilkrzywda deleted branch feat/right-pane-tabs-plane-market 2026-09-20 16:11:35 +02:00
Sign in to join this conversation.