fix(flights): address review — quotable squawk only, all military tint sites, no test churn

- aircraftEmergency: `source` is 'squawk' only when the Mode A code itself
  names the status; the Cockpit HUD no longer quotes an unrelated squawk
  (e.g. SQUAWK 1200 on an ADS-B `downed` status).
- military: new billboards and the untrack restore use the fleet tint, so an
  emergency stays red instead of snapping back to amber; tint helpers take the
  record already in hand instead of a second lookup.
- cockpit/cyber CSS: emergency colour via a custom property / theme token,
  meta line bolded so the status does not rely on colour alone in the HUD.
- tests: revert Prettier churn in unscoped test files; only semantic edits.
- docs/CURRENT-STATE.md: transponder emergency highlighting section.
- qa-emergency-squawk: (iv) RELEASE check; new files added to format scope.

Co-Authored-By: Claude <[email protected]>
This commit is contained in:
Leo PechnickiandClaude authored and Mazeyar Moeini Feizabadi committed 2026-10-13 17:23:19 +02:00
1 parent eb7f059750
commit 15b13e947b
16 files changed
+543 -1600

No files matched your search

+9 -3
View File
@@ -85,8 +85,11 @@ export function cockpitAltitudeDisplayFt(altitudeM, onGround) {
/**
* HUD wording for a tracked aircraft's transponder emergency, or null.
* States the broadcast code, never a conclusion about the flight.
* @param {{label?: string, squawk?: string|null}|null|undefined} emergency
* States what was broadcast, never a conclusion about the flight: the Mode A
* code when it names the status, else the ADS-B field it came from (an
* unrelated squawk is dropped).
* @param {{label?: string, squawk?: string|null, source?: string,
* severity?: string}|null|undefined} emergency
* @returns {string|null}
*/
export function formatCockpitEmergency(emergency) {
@@ -94,7 +97,10 @@ export function formatCockpitEmergency(emergency) {
.trim()
.toUpperCase();
if (!label) return null;
return emergency.squawk ? `SQUAWK ${emergency.squawk} · ${label}` : label;
if (emergency.source === 'squawk' && emergency.squawk)
return `SQUAWK ${emergency.squawk} · ${label}`;
const field = emergency.severity === 'priority' ? 'PRIORITY' : 'EMERGENCY';
return `ADS-B ${field} · ${label}`;
}
/** Format the cockpit Context scope without overstating installation coverage. */