From 972c3f0e1bb3780790631654f2ce40a64daca98f Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 17 Jul 2026 18:45:34 +0200 Subject: [PATCH] Keep thematic reference years accurate --- CHANGELOG.md | 3 +++ ...st_sprint237_flanders_thematic_on_demand.py | 1 + docs/CODEX_EXECUTION_LOG.md | 18 ++++++++++++++++++ frontend/src/components/map/MapWorkspace.tsx | 6 ++++++ 4 files changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c58c77..b5c677c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ - Made one explicit municipality or rectangle selection acquire/reuse, persist and analyse space occupation, open space, population density, node value and service level through the canonical Job and Dataset services. +- Automatically selects the usable ruimtebeslag theme when the Flanders + workspace inherits an unavailable theme, and displays annual policy products + by their governed reference year instead of a timezone-shifted timestamp. - Kept whole-Flanders raster acquisition disabled behind the existing 60 km and 30 million cell guardrails while preserving complete-region vector and partitioned bathymetry analysis. diff --git a/backend/tests/test_sprint237_flanders_thematic_on_demand.py b/backend/tests/test_sprint237_flanders_thematic_on_demand.py index 3eb3132c..1119359c 100644 --- a/backend/tests/test_sprint237_flanders_thematic_on_demand.py +++ b/backend/tests/test_sprint237_flanders_thematic_on_demand.py @@ -19,6 +19,7 @@ def test_flanders_workspace_exposes_governed_thematic_products_on_demand() -> No assert "'Op aanvraag'" in workspace assert "theme.id === 'space_occupation'" in workspace assert "setActiveThemeId(fallbackTheme.id)" in workspace + assert "return `referentiejaar ${observationYear}`" in workspace assert "thematicProductKey: thematicProduct.key" in workspace assert "datasetsApi.listThematicRasterProducts" in product_hook assert "datasetsApi.acquireThematicRaster" in selection_hook diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 770c0585..339ac04f 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -10182,3 +10182,21 @@ Validation: - The complete local release gate passed 932 backend tests, backend compilation, the 116-route contract audit, Alembic head `202607160001`, frontend TypeScript typecheck and the production Vite build. + +Final live acceptance: +- The Sprint 237 commits were pushed to Gitea and deployed through the + all-in-one Tower flow. Container health, PostGIS 3.6, collation, + required schema/indexes, Alembic head `202607160001`, frontend proxy and + icon checks passed. +- Browser acceptance exposed and then closed one usability gap: entering + Flanders with an unavailable prior theme now automatically selects the + usable ruimtebeslag profile. +- A complete exact-Area Mol run persisted all five official policy rasters and + returned six real themes including the existing VHA partition: 3,638.41 ha + ruimtebeslag, 8,139.67 ha open space, an estimated 36,783 inhabitants for + 2019, mean node value 0.68, mean service level 0.16 and 828 bathymetry + profiles. A repeated run reused the retained raster requests. +- The five new full-Mol Datasets are `ready`, linked to the canonical Mol Area + and labelled `coverage_scope=municipality`. The UI reports product reference + years directly so an end-of-year UTC timestamp cannot roll 2025 into a + misleading local `1 jan 2026` label. diff --git a/frontend/src/components/map/MapWorkspace.tsx b/frontend/src/components/map/MapWorkspace.tsx index c779ddc4..df9bb60d 100644 --- a/frontend/src/components/map/MapWorkspace.tsx +++ b/frontend/src/components/map/MapWorkspace.tsx @@ -458,6 +458,12 @@ function formatDatasetObservation(dataset: DatasetCreateResponse): string { ? `historische profielen ${firstMeasurement}-${lastMeasurement}` : 'historische profielmetingen' } + if (dataset.source_name === 'department_omgeving_thematic_raster') { + const observationYear = Number(dataset.source_metadata?.['observation_year']) + if (Number.isFinite(observationYear)) { + return `referentiejaar ${observationYear}` + } + } const period = dataset.source_metadata?.['acquisition_period'] if (typeof period === 'string' && period.trim()) { return `opnameperiode ${period}`