From 0c29411f492422c9ddb3195afdfc1b963ebc9d1c Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 17 Jul 2026 21:34:32 +0200 Subject: [PATCH] Fix bounded GRB coverage display --- CHANGELOG.md | 3 +++ backend/tests/test_sprint239_bounded_grb_acquisition.py | 1 + docs/CODEX_EXECUTION_LOG.md | 4 ++++ frontend/src/components/map/MapWorkspace.tsx | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e29bfc4..029a6751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ legal-boundary or water-volume data. - Extended the Flanders map catalog and all-theme analysis so the four GRB products are usable on demand without browser-side external calls. +- Prevented a single bounded municipality Dataset from being presented as + complete Flanders coverage; GRB cards remain `Op aanvraag` until the active + selection has produced its measured result. - Updated the provider registry to report the bounded GRB integration as configured while keeping the old generic import/fetch contract non-fetching and directing callers to the governed project endpoint. diff --git a/backend/tests/test_sprint239_bounded_grb_acquisition.py b/backend/tests/test_sprint239_bounded_grb_acquisition.py index 915a8224..424529e2 100644 --- a/backend/tests/test_sprint239_bounded_grb_acquisition.py +++ b/backend/tests/test_sprint239_bounded_grb_acquisition.py @@ -388,5 +388,6 @@ def test_grb_frontend_and_contracts_use_only_the_governed_backend_path() -> None assert "datasetsApi.acquireGrb" in selection_hook assert "datasetsApi.listGrbProducts" in catalog_hook assert "officialMapProducts.grb" in workspace + assert "result[product.key] = null" in workspace assert "/datasets/grb/acquire" in contracts assert "geo.api.vlaanderen.be" not in workspace diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 9ae53cb9..b1e010d2 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -10242,6 +10242,10 @@ Implemented: unsupported. - Extended the Flanders map product catalog with the four GRB products and kept all provider traffic behind the backend. +- Browser acceptance caught and closed a coverage-label defect: a newly + acquired small Mol Dataset no longer makes a complete-Flanders theme card + appear fully loaded. In the Flanders workspace GRB stays `Op aanvraag`; + the exact bounded result is shown only after selection. Validation: - Focused provider, acquisition, route-envelope and frontend contract tests diff --git a/frontend/src/components/map/MapWorkspace.tsx b/frontend/src/components/map/MapWorkspace.tsx index 2a7ce602..600fc563 100644 --- a/frontend/src/components/map/MapWorkspace.tsx +++ b/frontend/src/components/map/MapWorkspace.tsx @@ -770,6 +770,11 @@ export function MapWorkspace({ && datasetCoversSelectedArea(dataset, selectedMapAreaId, regionalScopeSelected), ) ?? null } + if (flandersScopeSelected && officialMapProducts.grb.length > 0) { + for (const product of officialMapProducts.grb) { + result[product.key] = null + } + } return result }, [ availableMapDatasets, @@ -777,6 +782,7 @@ export function MapWorkspace({ floodHazardDatasets, officialMapProducts.dhmv.length, officialMapProducts.floodHazard.length, + officialMapProducts.grb, regionalScopeSelected, selectedDhmvProductKey, selectedFloodHazardDatasetId,