From dfe6ba6e77bf1fc47a6d8162c6c642ffab90f9ed Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 09:29:46 +0000 Subject: [PATCH] web: raise the mast from the periscope card The browser periscope card said only "Mast down" and had no control, so the Mast & ESM operator had to find the mast buttons in the card above, and Command (who sees the periscope but does not own the mast) got no hint who does. The card now carries the mast pair for Mast & ESM and the hint names that station. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01BdXs5tkJ6kzdeubNWqPHtG --- data/commander/index.html | 2 +- data/i18n/de.json | 2 +- data/i18n/en.json | 2 +- tests/test_uboot_scope_web.py | 12 ++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/data/commander/index.html b/data/commander/index.html index c14d8f0d..1a77bb45 100644 --- a/data/commander/index.html +++ b/data/commander/index.html @@ -194,7 +194,7 @@ - + diff --git a/data/i18n/de.json b/data/i18n/de.json index a32579f2..2a3e1893 100644 --- a/data/i18n/de.json +++ b/data/i18n/de.json @@ -902,7 +902,7 @@ "commander.web.uboot_esm_none": "Kein Radar erfasst.", "commander.web.uboot_esm_mast_down": "Mast eingefahren: kein ESM.", "commander.web.uboot_scope_title": "Sehrohr", - "commander.web.uboot_scope_mast_down": "Mast eingefahren: kein Sehrohrbild.", + "commander.web.uboot_scope_mast_down": "Mast eingefahren: kein Sehrohrbild. Die Station Mast & ESM fährt den Mast aus.", "commander.web.uboot_scope_bearing": "Sichtlinie {bearing}° (relativ {relative}°)", "commander.web.uboot_scope_conditions": "{light} · Sicht {visibility} NM · Seegang {sea}", "commander.web.uboot_scope_day": "Tag", diff --git a/data/i18n/en.json b/data/i18n/en.json index 650bf133..0ec64218 100644 --- a/data/i18n/en.json +++ b/data/i18n/en.json @@ -902,7 +902,7 @@ "commander.web.uboot_esm_none": "No radar intercepted.", "commander.web.uboot_esm_mast_down": "Mast down: no ESM.", "commander.web.uboot_scope_title": "Periscope", - "commander.web.uboot_scope_mast_down": "Mast down: no periscope view.", + "commander.web.uboot_scope_mast_down": "Mast down: no periscope view. The Mast & ESM station raises the mast.", "commander.web.uboot_scope_bearing": "Line of sight {bearing}° (relative {relative}°)", "commander.web.uboot_scope_conditions": "{light} · visibility {visibility} NM · sea state {sea}", "commander.web.uboot_scope_day": "Day", diff --git a/tests/test_uboot_scope_web.py b/tests/test_uboot_scope_web.py index a97586d3..8aa83e90 100644 --- a/tests/test_uboot_scope_web.py +++ b/tests/test_uboot_scope_web.py @@ -202,3 +202,15 @@ def test_periscope_view_trains_and_reads_the_stadimeter_in_the_browser(tmp_path, assert {row[0] for row in applied} == {"uboot_mast", "uboot_scope_bearing", "uboot_scope_mark"} assert all(row[2] == "uboot_esm" and row[3] is True for row in applied) assert "\u00b0\u00b0" not in root.get("data-status", "") + + +def test_periscope_card_offers_the_mast_to_its_owner_and_names_it_for_command(): + html = index_html() + card = html[html.index('class="station-card-view station-wide uboot-scope-card"'):] + card = card[:card.index("")] + # The Mast & ESM station raises the mast from the periscope card itself. + assert 'data-uboot-stations="uboot_esm">