Reject duplicate queue legs — same route can no longer be queued twice (ISS-065, v0.34.0) #67

Merged
kamilkrzywda merged 1 commits from feat/queue-duplicate-guard into master 2026-09-21 04:31:54 +02:00
Owner

Fixes #65

queueLeg (lib/game/actions.ts) now refuses to append a destination that is already in the plane's flight queue ("{icao} is already in the flight queue"), and — while the plane is flying — re-queuing the active leg's destination ("already flying to {icao}"). Previously the same route could be queued any number of times, producing pointless repeated/zero-length hops when landing auto-chains queue[0].

No UI or OpenAPI changes (the endpoint already documents error responses). Unit: new cases in lib/game/actions.test.ts; e2e: duplicate-queue 409 assertion added to e2e/queue.spec.ts (verified by CI against the isolated dind stack).

Fixes #65 `queueLeg` (`lib/game/actions.ts`) now refuses to append a destination that is already in the plane's flight queue ("{icao} is already in the flight queue"), and — while the plane is flying — re-queuing the active leg's destination ("already flying to {icao}"). Previously the same route could be queued any number of times, producing pointless repeated/zero-length hops when landing auto-chains `queue[0]`. No UI or OpenAPI changes (the endpoint already documents error responses). Unit: new cases in `lib/game/actions.test.ts`; e2e: duplicate-queue 409 assertion added to `e2e/queue.spec.ts` (verified by CI against the isolated dind stack).
kamilkrzywda added 1 commit 2026-09-21 04:23:15 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-21 04:23:21 +02:00
kamilkrzywda merged commit 847e74b7b8 into master 2026-09-21 04:31:54 +02:00
Sign in to join this conversation.