Merge pull request 'v0.50.0 — queued/planned route dotted line yellow-ish instead of gray (#98)' (#103) from feat/queued-route-color into master
CI / build + unit + e2e (push) Successful in 9m11s
CI / build + unit + e2e (push) Successful in 9m11s
This commit was merged in pull request #103.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## v0.50.0 — 2026-09-22 08:00
|
||||
- **Queued/planned route line is now amber/gold instead of gray (ISS-098).** The dotted queue line in `components/Map.tsx` (a flying plane's not-yet-started legs, ISS-043) was drawn in muted slate `#64748b`. It is now an amber/gold `#d4a017`, readable on both light and dark tiles. The color was extracted from the inline literal to a new exported module-scope constant `QUEUE_ROUTE_LINE_COLOR` so it is testable; the dashed/dotted style (`line-dasharray [0.1, 1.5]`) and width (3) are unchanged
|
||||
- **Tests.** Unit +1: new `components/map.test.ts` pins `QUEUE_ROUTE_LINE_COLOR === '#d4a017'`. No new e2e spec — the existing queued-route rendering paths (`e2e/queue.spec.ts`, `e2e/relocation.spec.ts`) already exercise this layer, and a pure color swap needs no behavioral coverage
|
||||
|
||||
## v0.49.0 — 2026-09-22 07:25
|
||||
- **Airport popup Relocate now works for flying/repairing planes (ISS-096).** The Relocate row in the map's airport popup (`components/Map.tsx`) previously listed only grounded planes and showed "No grounded planes to relocate." when none was available. It now lists ALL planes from the latest snapshot, and the click handler picks the endpoint by the SELECTED plane's current status: `available` → `POST /api/planes/{id}/fly` (immediate relocation, unchanged), `flying`/`repairing` → `POST /api/planes/{id}/queue` (the destination is appended to the plane's flight queue and chains on landing). Success text is "Relocation started." for fly and "Added to queue." for queue; the no-planes fallback guard is reworded to "No planes to relocate." No API changes — both endpoints existed since v0.25.0/v0.46.0
|
||||
- **Tests.** E2E +1 (`e2e/relocation.spec.ts`): dispatches the starter plane on a leg via the API so it is flying, slows the sim to 1x so the leg cannot land mid-test, opens the airport popup for a different airport, selects the flying plane from the (now full) list and clicks "Relocate here", then asserts via state that the plane's `queue` contains the clicked airport's ICAO while it is still flying its original destination
|
||||
|
||||
+5
-3
@@ -32,6 +32,8 @@ const ROUTES_LEGS_LAYER_ID = 'routes-legs';
|
||||
// (dest → queue[0] → …) as their own source + layer, drawn under everything else dynamic.
|
||||
const QUEUE_ROUTES_SOURCE_ID = 'queue-routes';
|
||||
const QUEUE_ROUTES_LAYER_ID = 'queue-routes';
|
||||
// ISS-098 (v0.50.0): amber/gold — planned legs read as "queued", visible on light and dark tiles alike.
|
||||
export const QUEUE_ROUTE_LINE_COLOR = '#d4a017';
|
||||
// ISS-002 (v0.15.0): top-most hover-highlight layers, added after the base layers so they
|
||||
// render above them. Each starts filtered to match nothing; applyHoverRef drives the filters.
|
||||
const PLANES_HIGHLIGHT_LAYER_ID = 'planes-highlight';
|
||||
@@ -382,8 +384,8 @@ export default function FlightMap({ state, hovered, applySnapshot }: MapProps) {
|
||||
});
|
||||
}
|
||||
// ISS-043 (v0.26.0): dotted queue line — added after routes-legs but BEFORE the hover
|
||||
// layers so a hovered trace still draws on top of it. Muted slate + fine dots reads as
|
||||
// "planned/future", distinct from the solid amber active leg and the [2,2] yellow hover dash.
|
||||
// layers so a hovered trace still draws on top of it. Amber/gold + fine dots reads as
|
||||
// "planned/future", distinct from the solid bright-amber active leg and the [2,2] yellow hover dash.
|
||||
if (!map.getSource(QUEUE_ROUTES_SOURCE_ID)) {
|
||||
map.addSource(QUEUE_ROUTES_SOURCE_ID, {
|
||||
type: 'geojson',
|
||||
@@ -396,7 +398,7 @@ export default function FlightMap({ state, hovered, applySnapshot }: MapProps) {
|
||||
type: 'line',
|
||||
source: QUEUE_ROUTES_SOURCE_ID,
|
||||
paint: {
|
||||
'line-color': '#64748b', // muted slate — planned legs, not actively flying
|
||||
'line-color': QUEUE_ROUTE_LINE_COLOR, // amber/gold — planned legs, not actively flying (ISS-098)
|
||||
'line-width': 3,
|
||||
'line-dasharray': [0.1, 1.5], // dotted — distinct from solid legs and the [2,2] hover dash
|
||||
},
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { QUEUE_ROUTE_LINE_COLOR } from './Map';
|
||||
|
||||
// ISS-098 (v0.50.0): the dotted queued/planned route line is amber/gold, not gray — pinned so a
|
||||
// future retune is deliberate. E2E already exercises the rendering path (queue.spec.ts, relocation.spec.ts).
|
||||
|
||||
describe('queued route line color', () => {
|
||||
it('pins the amber/gold queue-line color readable on light and dark tiles', () => {
|
||||
expect(QUEUE_ROUTE_LINE_COLOR).toBe('#d4a017');
|
||||
});
|
||||
});
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "flight-ops",
|
||||
"version": "0.49.0",
|
||||
"version": "0.50.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3000",
|
||||
|
||||
Reference in New Issue
Block a user