v0.23.0 — Move Refuel-to-full from market into left pane next to Relocate (#35) #42

Merged
kamilkrzywda merged 1 commits from ui/move-refuel-to-left-pane into master 2026-09-20 10:34:44 +02:00
Owner

What changed (ISS-035 / #35)

The "Refuel to full" row moved out of the Market section in the right pane and into a new Refuel <section> in the left pane, placed immediately after the Relocate section — refueling is a plane operation like relocating, not a market action (buy/sell stay in the market).

  • components/RightPane.tsx — removed the refuel market row + its state (refuelPlaneId) and derived values (refuelable / refuelPlane / refuelCost). Buy/sell rows, the exported pure helpers (slotsUsedFor / loadEligiblePlanes), and the per-package refuel-for-* button are untouched.
  • components/LeftPane.tsx — new <section data-testid="refuel-section"> with a "Refuel" heading + the row moved verbatim (same testids, labels, cost preview). Reuses LeftPane's existing grounded list and its own useGameAction (actionsBusy / runAction) → same POST /api/planes/{id}/refuel endpoint (no body = mode 'full'). No hover handlers (not a route).
  • Testids kept byte-identical (market-refuel, market-refuel-plane, market-refuel-cost) so all e2e locators work unchanged — same pattern as the v0.21.0 Relocate pane-move.

Tests

  • e2e: right-pane.spec.ts market test re-scoped (refuel now asserted to render inside [data-testid="left-pane"] before the click; cash/tank functional assertions unchanged); stale "market" titles/comments updated. panes.spec.ts gains structural assertions: Refuel heading + market-refuel present in left pane, absent from right pane.
  • No unit-test changes (no lib/ or endpoint change).

Verified locally

tsc --noEmit clean · vitest 288/288 passed (31 files) · npx playwright test --list = 41 tests in 12 files, no compile errors. e2e not run locally by design — CI verifies against the isolated stack.

Closes #35

## What changed (ISS-035 / #35) The "Refuel to full" row moved out of the Market section in the right pane and into a new **Refuel** `<section>` in the left pane, placed immediately after the Relocate section — refueling is a plane operation like relocating, not a market action (buy/sell stay in the market). - `components/RightPane.tsx` — removed the refuel market row + its state (`refuelPlaneId`) and derived values (`refuelable` / `refuelPlane` / `refuelCost`). Buy/sell rows, the exported pure helpers (`slotsUsedFor` / `loadEligiblePlanes`), and the per-package `refuel-for-*` button are untouched. - `components/LeftPane.tsx` — new `<section data-testid="refuel-section">` with a "Refuel" heading + the row moved verbatim (same testids, labels, cost preview). Reuses LeftPane's existing `grounded` list and its own `useGameAction` (`actionsBusy` / `runAction`) → same `POST /api/planes/{id}/refuel` endpoint (no body = mode 'full'). No hover handlers (not a route). - **Testids kept byte-identical** (`market-refuel`, `market-refuel-plane`, `market-refuel-cost`) so all e2e locators work unchanged — same pattern as the v0.21.0 Relocate pane-move. ## Tests - e2e: `right-pane.spec.ts` market test re-scoped (refuel now asserted to render inside `[data-testid="left-pane"]` before the click; cash/tank functional assertions unchanged); stale "market" titles/comments updated. `panes.spec.ts` gains structural assertions: Refuel heading + `market-refuel` present in left pane, absent from right pane. - No unit-test changes (no lib/ or endpoint change). ## Verified locally `tsc --noEmit` clean · vitest 288/288 passed (31 files) · `npx playwright test --list` = 41 tests in 12 files, no compile errors. e2e not run locally by design — CI verifies against the isolated stack. Closes #35
kamilkrzywda added 1 commit 2026-09-20 10:27:50 +02:00
Move Refuel-to-full from market into left pane next to Relocate (#35)
CI / build + unit + e2e (pull_request) Successful in 6m52s
a7150a1062
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-20 10:28:11 +02:00
kamilkrzywda merged commit e18d39edd0 into master 2026-09-20 10:34:44 +02:00
kamilkrzywda deleted branch ui/move-refuel-to-left-pane 2026-09-20 10:34:44 +02:00
Sign in to join this conversation.