Add ability to chain flights in queue #43

Closed
opened 2026-09-20 10:45:03 +02:00 by kamilkrzywda · 2 comments
Owner

When having multiple packages you can add multiple flight to flight queue.
When hovering over packages "on board" the trace will be shown starting on current end of queue to target of this package.
Entire trace of current wueue will be shown as dotted line instead of solid one as current flight,
Queue will be shown next to plane "on board" list and not yet started flight can be canceled.

When having multiple packages you can add multiple flight to flight queue. When hovering over packages "on board" the trace will be shown starting on current end of queue to target of this package. Entire trace of current wueue will be shown as dotted line instead of solid one as current flight, Queue will be shown next to plane "on board" list and not yet started flight can be canceled.
Author
Owner

Part 1 (backend) shipped — v0.25.0, PR #50, merge commit 3395fb4, deployed to https://flight.dev.kkhost.pl.

What's live now:

  • Planes hold a queue of upcoming flight legs (queue column on planes; active leg unchanged).
  • Auto-chain: when a leg completes, the plane auto-starts the next queued leg if fuel covers it; otherwise it grounds safely with the remaining queue intact. Composes correctly with v0.24.0 pause-on-landing (a chained plane counts as airborne, so no premature pause mid-chain).
  • New endpoints: POST /api/planes/{planeId}/queue {destIcao} and POST /api/planes/{planeId}/queue/cancel {index}; OpenAPI updated.

Still to come (part 2 — UI + map, next version): the queue list shown next to a plane's "on board" cargo in the left pane with cancel buttons for not-yet-started legs, and the full queue path drawn as a dotted line on the map (active leg stays solid). Issue stays open until that lands.

**Part 1 (backend) shipped — v0.25.0, PR #50, merge commit `3395fb4`, deployed to https://flight.dev.kkhost.pl.** What's live now: - Planes hold a **queue of upcoming flight legs** (`queue` column on `planes`; active leg unchanged). - **Auto-chain:** when a leg completes, the plane auto-starts the next queued leg if fuel covers it; otherwise it grounds safely with the remaining queue intact. Composes correctly with v0.24.0 pause-on-landing (a chained plane counts as airborne, so no premature pause mid-chain). - New endpoints: `POST /api/planes/{planeId}/queue {destIcao}` and `POST /api/planes/{planeId}/queue/cancel {index}`; OpenAPI updated. Still to come (**part 2 — UI + map**, next version): the queue list shown next to a plane's "on board" cargo in the left pane with cancel buttons for not-yet-started legs, and the full queue path drawn as a dotted line on the map (active leg stays solid). Issue stays open until that lands.
Author
Owner

✅ Done — flight-queue chaining is live in production (v0.26.0).

Part 1 — backend (v0.25.0, PR #50, merge commit 3395fb4):

  • New queue column on planes: ordered JSON array of ICAOs = not-yet-started legs (+ guarded migration)
  • POST /api/planes/{planeId}/queue {destIcao} — append a leg (works grounded or mid-flight; nothing auto-starts, the active leg is always set via /fly)
  • POST /api/planes/{planeId}/queue/cancel {index} — cancel a not-yet-started queued leg
  • Auto-chain: on landing, if the queue has a next leg and fuel covers it, the plane immediately departs on it; otherwise it grounds with the remaining queue intact. Composes with v0.24.0 pause-on-landing (a chained plane counts as airborne → no premature pause)
  • OpenAPI updated (PlaneState.queue + both new endpoints)

Part 2 — UI (v0.26.0, PR #51, merge commit 85b7b07):

  • Map: the full queue path is drawn as a dotted line (queue-routes layer); the active in-progress leg stays solid amber
  • Left pane: Queue sub-section in every on-board block — queued legs with per-leg cancel buttons, plus an add-leg airport select + button
  • e2e/queue.spec.ts: UI add/cancel mid-flight, dotted map line (per-tile endpoint checks), auto-chain end-to-end

Deployed to https://flight.dev.kkhost.pl (/api/version = 0.26.0, verified).

✅ Done — flight-queue chaining is live in production (v0.26.0). **Part 1 — backend (v0.25.0, PR #50, merge commit `3395fb4`):** - New `queue` column on planes: ordered JSON array of ICAOs = not-yet-started legs (+ guarded migration) - `POST /api/planes/{planeId}/queue {destIcao}` — append a leg (works grounded or mid-flight; nothing auto-starts, the active leg is always set via `/fly`) - `POST /api/planes/{planeId}/queue/cancel {index}` — cancel a not-yet-started queued leg - Auto-chain: on landing, if the queue has a next leg and fuel covers it, the plane immediately departs on it; otherwise it grounds with the remaining queue intact. Composes with v0.24.0 pause-on-landing (a chained plane counts as airborne → no premature pause) - OpenAPI updated (`PlaneState.queue` + both new endpoints) **Part 2 — UI (v0.26.0, PR #51, merge commit `85b7b07`):** - Map: the full queue path is drawn as a **dotted line** (`queue-routes` layer); the active in-progress leg stays solid amber - Left pane: Queue sub-section in every on-board block — queued legs with per-leg cancel buttons, plus an add-leg airport select + button - `e2e/queue.spec.ts`: UI add/cancel mid-flight, dotted map line (per-tile endpoint checks), auto-chain end-to-end Deployed to https://flight.dev.kkhost.pl (`/api/version` = 0.26.0, verified).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#43