v1.11.0: Do not show jobs for planes that are in air (ISS-159) #165

Merged
kamilkrzywda merged 1 commits from feat/hide-in-air-jobs into master 2026-09-28 01:02:04 +02:00
Owner

ISS-159 — display-only change in components/RightPane.tsx: new exported visibleOpenPackages(state) replaces the bare status === 'open' filter at the open-package list. A row is hidden while no GROUNDED plane sits at the package's origin, so jobs whose only claimant is still en route disappear from the list and reappear on landing. Payload-blocked rows (grounded plane at the origin with no room) stay visible with their disabled Load button — loadEligiblePlanes untouched.

Deliberately NOT touched: poolAirports / the spawner in lib/game/state.ts — shared with job spawning (engine.ts) and deliberately includes flying planes' destinations so work waits for you on landing; changing it would alter world state, not just display. The v0.65.0 server-side pool visibility filter is unchanged too.

Known pre-existing gap (NOT fixed here): loadEligiblePlanes ignores plane ownership per the v1.4.0 shared-market design — another player's grounded plane at an origin can make Load enabled for you → 403 on click.

Tests

  • Unit: new visibleOpenPackages suite in components/right-pane.test.ts (grounded at origin → visible; only flying there → hidden; grounded elsewhere + one flying to the origin → hidden; payload-blocked grounded plane at origin → still visible with Load disabled). 41 files / 449 tests pass.
  • E2E: new test in e2e/right-pane.spec.ts — dispatches the only plane toward an airport, creates a job AT that destination (in the pool while airborne, so it reaches /api/state), asserts no row renders until landing. This pins the NEW client-side filter specifically: a job at the departure airport would already be hidden server-side by v0.65.0 pool visibility once the plane leaves, so the destination is where only this change has an effect. No landing wait; the next test's flyHomeViaApi self-heal finishes the leg.
  • Local verification: tsc --noEmit clean, npx vitest run 41 files / 449 tests pass, npx playwright test --list → 68 tests in 18 files. Full e2e suite runs in CI only (per AGENTS.md).
ISS-159 — display-only change in `components/RightPane.tsx`: new exported `visibleOpenPackages(state)` replaces the bare `status === 'open'` filter at the open-package list. A row is hidden while no GROUNDED plane sits at the package's origin, so jobs whose only claimant is still en route disappear from the list and reappear on landing. Payload-blocked rows (grounded plane at the origin with no room) stay visible with their disabled Load button — `loadEligiblePlanes` untouched. **Deliberately NOT touched:** `poolAirports` / the spawner in `lib/game/state.ts` — shared with job spawning (`engine.ts`) and deliberately includes flying planes' destinations so work waits for you on landing; changing it would alter world state, not just display. The v0.65.0 server-side pool visibility filter is unchanged too. **Known pre-existing gap (NOT fixed here):** `loadEligiblePlanes` ignores plane ownership per the v1.4.0 shared-market design — another player's grounded plane at an origin can make Load enabled for you → 403 on click. ## Tests - Unit: new `visibleOpenPackages` suite in `components/right-pane.test.ts` (grounded at origin → visible; only flying there → hidden; grounded elsewhere + one flying to the origin → hidden; payload-blocked grounded plane at origin → still visible with Load disabled). 41 files / 449 tests pass. - E2E: new test in `e2e/right-pane.spec.ts` — dispatches the only plane toward an airport, creates a job AT that destination (in the pool while airborne, so it reaches `/api/state`), asserts no row renders until landing. This pins the NEW client-side filter specifically: a job at the departure airport would already be hidden server-side by v0.65.0 pool visibility once the plane leaves, so the destination is where only this change has an effect. No landing wait; the next test's `flyHomeViaApi` self-heal finishes the leg. - Local verification: `tsc --noEmit` clean, `npx vitest run` 41 files / 449 tests pass, `npx playwright test --list` → 68 tests in 18 files. Full e2e suite runs in CI only (per AGENTS.md).
kamilkrzywda added 1 commit 2026-09-28 00:56:37 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-28 00:57:15 +02:00
kamilkrzywda merged commit db5ad639fb into master 2026-09-28 01:02:04 +02:00
kamilkrzywda deleted branch feat/hide-in-air-jobs 2026-09-28 01:02:04 +02:00
Sign in to join this conversation.