From 43dd5359bacf148865fde9461c36589ecde8da82 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 16 Jul 2026 04:14:25 +0200 Subject: [PATCH] Polish assistant wording and mobile explorer --- backend/app/services/geo_assistant_service.py | 6 +++++- .../tests/test_sprint202_temporal_metrics_and_ollama.py | 2 +- backend/tests/test_sprint72_mobile_overflow_hardening.py | 8 ++++++++ frontend/src/styles/app.css | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/backend/app/services/geo_assistant_service.py b/backend/app/services/geo_assistant_service.py index 2fd867f5..1c9b4ceb 100644 --- a/backend/app/services/geo_assistant_service.py +++ b/backend/app/services/geo_assistant_service.py @@ -112,7 +112,11 @@ class GeoAssistantService: if "population" in estimated_themes: answer = re.sub( r"\bde officiële telling\b", - "de van de officiële bron afgeleide schatting", + lambda match: ( + "De uit de officiële bron afgeleide schatting" + if match.group(0)[0].isupper() + else "de uit de officiële bron afgeleide schatting" + ), answer, flags=re.IGNORECASE, ) diff --git a/backend/tests/test_sprint202_temporal_metrics_and_ollama.py b/backend/tests/test_sprint202_temporal_metrics_and_ollama.py index 8c604bb5..412437be 100644 --- a/backend/tests/test_sprint202_temporal_metrics_and_ollama.py +++ b/backend/tests/test_sprint202_temporal_metrics_and_ollama.py @@ -163,7 +163,7 @@ def test_geo_assistant_never_labels_area_weighted_population_as_official_count() ) assert "officiële telling" not in answer.casefold() - assert answer.startswith("de van de officiële bron afgeleide schatting") + assert answer.startswith("De uit de officiële bron afgeleide schatting") def test_geo_assistant_does_not_add_irrelevant_estimate_disclosure() -> None: diff --git a/backend/tests/test_sprint72_mobile_overflow_hardening.py b/backend/tests/test_sprint72_mobile_overflow_hardening.py index 5e53877b..180f3ae3 100644 --- a/backend/tests/test_sprint72_mobile_overflow_hardening.py +++ b/backend/tests/test_sprint72_mobile_overflow_hardening.py @@ -18,6 +18,14 @@ def test_mobile_overflow_hardening_css_contracts() -> None: assert "repeat(2, minmax(0, 1fr))" in css assert "overflow-x: clip;" in css assert "overscroll-behavior-x: contain;" in css + assert ( + "section > div:not(.map-controls):not(.feature-inspector):not(.quick-action-grid)" + ":not(.geo-explorer-layout)" + ) in css + + explorer_mobile_css = css.split("@media (max-width: 920px)", 1)[1] + explorer_mobile_rule = explorer_mobile_css.split(".geo-explorer-layout", 1)[1] + assert "display: block;" in explorer_mobile_rule.split("}", 1)[0] def test_long_identifier_wrapping_contracts() -> None: diff --git a/frontend/src/styles/app.css b/frontend/src/styles/app.css index 6526984a..efcb7a03 100644 --- a/frontend/src/styles/app.css +++ b/frontend/src/styles/app.css @@ -931,7 +931,7 @@ section li strong + div { } section form, -section > div:not(.map-controls):not(.feature-inspector):not(.quick-action-grid) { +section > div:not(.map-controls):not(.feature-inspector):not(.quick-action-grid):not(.geo-explorer-layout) { display: grid; gap: 0.55rem; }