Rework right panel #47

Closed
opened 2026-09-20 11:05:23 +02:00 by kamilkrzywda · 2 comments
Owner

Make it have a tabs: Jobs and Planes market (for now)

Jobs list stay without any big changes.

Planes panel:
Add 5 new different plane types (mostly different sizes and prices for game progression).
Planes should have big panels for every plane type with tech spec: range, weight capacity, speed, fuel consumption and whatever other may be revelant.

You can adjust available jobs acordingly. Add availiblity for ignoring job (remove it from job list).

Make it have a tabs: Jobs and Planes market (for now) Jobs list stay without any big changes. Planes panel: Add 5 new different plane types (mostly different sizes and prices for game progression). Planes should have big panels for every plane type with tech spec: range, weight capacity, speed, fuel consumption and whatever other may be revelant. You can adjust available jobs acordingly. Add availiblity for ignoring job (remove it from job list).
Author
Owner

Part A shipped — v0.28.0 (PR #58, merge commit a84bc7e), deployed to https://flight.dev.kkhost.pl.

What landed:

  • Right pane tabs: "Jobs" (default; the jobs list is unchanged) and "Planes market".
  • 5 new plane types above the ATR 72 starter, as a progression ladder: 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 buy/movement/payload logic is data-driven — purely additive.
  • Tech-spec panels: each plane type gets a card in the Planes market tab with price + sell value, max payload, cruise speed, fuel burn, max fuel, and derived max range (new pure maxRangeKm() closed form of the weighted-burn model; ATR 72 ≈ 4436 km).
  • Bonus fix: selling a plane that still carries cargo now returns 409 instead of orphaning its packages.

Tests: +7 unit tests (vitest 318), e2e updated for the tabs + new catalog assertions; CI green on PR #58.

Part B (ignore-job) follows in a separate PR — issue stays open until it lands.

**Part A shipped — v0.28.0 (PR #58, merge commit `a84bc7e`), deployed to https://flight.dev.kkhost.pl.** What landed: - **Right pane tabs**: "Jobs" (default; the jobs list is unchanged) and "Planes market". - **5 new plane types** above the ATR 72 starter, as a progression ladder: 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 buy/movement/payload logic is data-driven — purely additive. - **Tech-spec panels**: each plane type gets a card in the Planes market tab with price + sell value, max payload, cruise speed, fuel burn, max fuel, and derived max range (new pure `maxRangeKm()` closed form of the weighted-burn model; ATR 72 ≈ 4436 km). - **Bonus fix**: selling a plane that still carries cargo now returns 409 instead of orphaning its packages. Tests: +7 unit tests (vitest 318), e2e updated for the tabs + new catalog assertions; CI green on PR #58. Part B (ignore-job) follows in a separate PR — issue stays open until it lands.
Author
Owner

Done — shipped in two parts (both merged to master, deployed to https://flight.dev.kkhost.pl):

Part A — v0.28.0 (PR #58, merge a84bc7e)

  • Right pane now has tabs: Jobs (default; the jobs list is unchanged) and Planes market.
  • 5 new plane types added for progression above the ATR 72-600: CRJ-900 (€450k), Embraer E175 (€900k), Airbus A320-200 (€1.8M), Airbus A330-200 (€4.5M), Boeing 777-300ER (€9M) — each with a tech-spec card in the Planes market tab: price + sell value, payload capacity, speed, fuel consumption, max fuel and derived max range.
  • Bonus fix found while reworking the market: selling a plane that still carries cargo now returns 409 instead of silently orphaning its packages.

Part B — v0.29.0 (PR #59, merge 86d486f)

  • New terminal package status ignored. Each open job in the Jobs tab has an Ignore button next to Load; ignoring removes it from the list permanently and new random jobs spawn in its place (market stays topped up at 10). No reputation cost.
  • Endpoint: POST /api/packages/{id}/ignore (404 unknown id, 409 unless open) — now the 13th public endpoint; OpenAPI spec updated.
  • Note: this part initially broke CI three times because the new route used a [packageId] dynamic segment while its siblings use [id] — Next.js rejects mixed slug names at runtime (all requests 500). Fixed by renaming to [id]; caught via a local docker repro of the CI stack.

Both parts fully tested: unit suite green (325 tests) and e2e in CI, including new specs for the plane-market cards and the ignore flow.

Done — shipped in two parts (both merged to master, deployed to https://flight.dev.kkhost.pl): **Part A — v0.28.0 (PR #58, merge a84bc7e)** - Right pane now has tabs: **Jobs** (default; the jobs list is unchanged) and **Planes market**. - 5 new plane types added for progression above the ATR 72-600: CRJ-900 (€450k), Embraer E175 (€900k), Airbus A320-200 (€1.8M), Airbus A330-200 (€4.5M), Boeing 777-300ER (€9M) — each with a tech-spec card in the Planes market tab: price + sell value, payload capacity, speed, fuel consumption, max fuel and derived max range. - Bonus fix found while reworking the market: selling a plane that still carries cargo now returns 409 instead of silently orphaning its packages. **Part B — v0.29.0 (PR #59, merge 86d486f)** - New terminal package status `ignored`. Each open job in the Jobs tab has an **Ignore** button next to Load; ignoring removes it from the list permanently and new random jobs spawn in its place (market stays topped up at 10). No reputation cost. - Endpoint: `POST /api/packages/{id}/ignore` (404 unknown id, 409 unless open) — now the 13th public endpoint; OpenAPI spec updated. - Note: this part initially broke CI three times because the new route used a `[packageId]` dynamic segment while its siblings use `[id]` — Next.js rejects mixed slug names at runtime (all requests 500). Fixed by renaming to `[id]`; caught via a local docker repro of the CI stack. Both parts fully tested: unit suite green (325 tests) and e2e in CI, including new specs for the plane-market cards and the ignore flow.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#47