From 799365e939ba9cb7a3910413f757ebb3ce5882ae Mon Sep 17 00:00:00 2001 From: Kamil Krzywda Date: Wed, 23 Sep 2026 06:23:34 +0000 Subject: [PATCH] =?UTF-8?q?v0.60.0:=20retune=20map=20overlay=20colors=20fo?= =?UTF-8?q?r=20the=20Fiord=20default=20(ISS-118)=20=E2=80=94=20brighten=20?= =?UTF-8?q?airport=20dot=20fill=20rose-600=E2=86=92rose-500=20and=20hovere?= =?UTF-8?q?d-route=20highlight=20red-500=E2=86=92red-400,=20the=20two=20el?= =?UTF-8?q?ements=20below=203:1=20on=20Fiord's=20dark=20slate/navy=20palet?= =?UTF-8?q?te;=20all=20other=20overlay=20colors=20audited=20=E2=89=A53.3:1?= =?UTF-8?q?=20and=20left=20untouched?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ components/Map.tsx | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2b60e1..4eb93e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.60.0 — 2026-09-23 06:22 +- **Overlay colors retuned for the Fiord default (ISS-118).** The first half of this issue landed in v0.4.0 (`DEFAULT_STYLE_ID = 'fiord'` + top-bar switcher, e2e already pins `toHaveValue('fiord')`); this completes the second half — auditing every color drawn on the map against Fiord's actual palette. Key finding: OpenFreeMap's Fiord is a DARK cool-toned basemap (land #45516E slate, water #38435C navy — verified byte-identical between the self-hosted `public/styles/fiord.json` and `tiles.openfreemap.org/styles/fiord`), not a light one. WCAG contrast audit of all nine overlay colors against both base surfaces: seven already read fine (≥ 3.3:1 on land AND water) and are untouched — amber flying leg #f59e0b, gold dotted queue line #d4a017 (ISS-098 picked it for light+dark), sky-blue grounded plane + hover halo #38bdf8, green flying plane #22c55e, yellow hover ring/trace #facc15, green target ring #4ade80. Two were weak and got brightened one step within the same hue family: airport dot fill rose-600 #e11d48 (1.68:1 on slate land — the weakest element on the map) → rose-500 #f43f5e (2.15:1), and the hovered-route highlight red-500 #ef4444 (2.10:1, below the 3:1 graphical-object bar for an emphasis layer) → red-400 #f87171 (2.86:1 on land / 3.57:1 on water). White strokes and all other paint values unchanged; no new constants — both colors are single-use inline paint values, matching the existing style of this file. +- **Tests.** No test changes needed: `components/map.test.ts` pins only #d4a017 (untouched), e2e specs query rendered features by id/layer rather than color, and `lib/mapStyles.test.ts` already pins `DEFAULT_STYLE_ID = 'fiord'`. + ## v0.59.0 — 2026-09-23 05:48 - **SSE frames no longer carry package history (ISS-133).** Measured on the live instance first: each `/api/events` frame was compact JSON at ~597 KB, pushed once per real second regardless of time scale (the background tick is a fixed 1 s interval; ×1000 just advances the clock further per frame) — and 99.8 % of it was `packages`: 1,521 rows because terminal packages are never deleted from the DB (expired 564, delivered 528, ignored 386, abandoned 31), while only 12 were `open`. No component ever reads a package with a terminal status — the market list renders `open`, and on-board cargo is `loaded`/`expired` (`LeftPane`, `cargoWeightFor`) — so the history was pure re-sent weight. New `sseFrame(snapshot)` in `lib/game/state.ts` projects a snapshot down to the client-rendered statuses (`SSE_PACKAGE_STATUSES = open|loaded|expired`); both SSE paths use it — the broadcast in `lib/sim/engine.ts` and the initial frame in `app/api/events/route.ts`, so a connect never costs one full-history frame. Live payload drops ~597 KB → ~10 KB per frame (≈ 60×), bounded forever by fleet/market size instead of growing with play time. `/api/state` and action responses keep the FULL package set unchanged, so every e2e oracle that asserts `delivered`/`abandoned` transitions via state lookups still works; the polling fallback stays a strict superset of what SSE pushes. Deliberately NOT done: hash-skip broadcasts (the snapshot's `clockMs` advances on every tick even while idle — `advanceMs = min(elapsed, 2000 ms) × scale ≥ 1 s` — so no two frames are ever equal), throttling (already exactly 1 Hz), and a diff/patch engine. - **Tests.** Unit +3 in new `lib/game/state.test.ts`: the projection keeps exactly open/loaded/expired (order preserved, terminal rows dropped), passes account/simState/planes through untouched without mutating its input, and pins the status set itself. E2E: `e2e/events.spec.ts` now records every package status seen in any frame plus the largest frame — asserts no terminal status ever appears and frames stay under 200 KB (a full-history regression at ~597 KB fails loudly). diff --git a/components/Map.tsx b/components/Map.tsx index 50ef8ac..eb13bbe 100644 --- a/components/Map.tsx +++ b/components/Map.tsx @@ -360,7 +360,7 @@ export default function FlightMap({ state, hovered, applySnapshot }: MapProps) { source: AIRPORTS_SOURCE_ID, paint: { 'circle-radius': 5, // ISS-010 (v0.18.0): bigger — the r=3 dots were hard to click - 'circle-color': '#e11d48', + 'circle-color': '#f43f5e', // ISS-118 (v0.60.0): rose-500 — old #e11d48 (rose-600) was tuned for light tiles; 1.7:1 on Fiord's dark slate land 'circle-stroke-width': 1.5, 'circle-stroke-color': '#ffffff', }, @@ -462,7 +462,7 @@ export default function FlightMap({ state, hovered, applySnapshot }: MapProps) { source: ROUTES_SOURCE_ID, filter: ['==', ['get', 'planeId'], ''], paint: { - 'line-color': '#ef4444', // red — distinct from the amber routes-legs line + 'line-color': '#f87171', // ISS-118 (v0.60.0): red-400 — old #ef4444 sat at 2.1:1 on Fiord's dark slate; brighter so the hover emphasis reads, still distinct from the amber routes-legs line 'line-width': 6, }, }); diff --git a/package.json b/package.json index 7fc8263..af6d98e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flight-ops", - "version": "0.59.0", + "version": "0.60.0", "private": true, "scripts": { "dev": "next dev -p 3000",