From 8e38691251d7d20171d049285cca2acf57ee1b46 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 17 Jul 2026 21:39:44 +0200 Subject: [PATCH] Clear stale on-demand map layers --- CHANGELOG.md | 3 ++- .../tests/test_sprint239_bounded_grb_acquisition.py | 1 + docs/CODEX_EXECUTION_LOG.md | 12 +++++++++++- frontend/src/components/map/MapWorkspace.tsx | 4 +++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 029a6751..2ece96a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,8 @@ 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. + selection has produced its measured result, and stale previously opened + vector features are not rendered behind an on-demand theme. - 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 424529e2..784713b7 100644 --- a/backend/tests/test_sprint239_bounded_grb_acquisition.py +++ b/backend/tests/test_sprint239_bounded_grb_acquisition.py @@ -389,5 +389,6 @@ def test_grb_frontend_and_contracts_use_only_the_governed_backend_path() -> None assert "datasetsApi.listGrbProducts" in catalog_hook assert "officialMapProducts.grb" in workspace assert "result[product.key] = null" in workspace + assert ": onDemandThemeActive\n ? null\n : mapFeatureCollection" 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 b1e010d2..ceee64c5 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -10245,7 +10245,8 @@ Implemented: - 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. + the exact bounded result is shown only after selection and an older active + vector layer is not rendered behind it. Validation: - Focused provider, acquisition, route-envelope and frontend contract tests @@ -10258,3 +10259,12 @@ Validation: - The complete readiness gate passed 943 backend tests, backend compilation, the 118-route API contract audit, Alembic head `202607160001`, frontend TypeScript typecheck and the production Vite build. +- Tower live acceptance persisted bounded Mol GRB results through PostGIS: + 339 building contours (5.953873 ha footprint), one road segment + (0.0137304 km), two water features (0.0027273 ha plus 0.0050982 km + supporting linework) and eight parcels (1.2566294 ha). A repeated exact + building request reused the same Dataset and reported `reused=true`. +- The rebuilt all-in-one deployment remained healthy on port 1202 with + PostGIS 3.6 and Alembic head `202607160001`. Live browser acceptance showed + all four Flanders GRB cards as `Op aanvraag` and no stale vector content + underneath an unmeasured on-demand theme. diff --git a/frontend/src/components/map/MapWorkspace.tsx b/frontend/src/components/map/MapWorkspace.tsx index 600fc563..fdfb6d51 100644 --- a/frontend/src/components/map/MapWorkspace.tsx +++ b/frontend/src/components/map/MapWorkspace.tsx @@ -1039,7 +1039,9 @@ export function MapWorkspace({ ? null : analysisMode === 'evolution' && temporalComparison?.geojson.features.length ? temporalComparison.geojson - : mapFeatureCollection + : onDemandThemeActive + ? null + : mapFeatureCollection const explorerSelectionFeatureCollection = analysisMode === 'current' ? activeSelectionResult?.geojson ?? null : null