diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c88c58..48d06a2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Made the official full Mol municipality area and the largest authoritative building layer the initial map context. - Added an idempotent operator provisioner for official Mol GRB roads, water and parcels through the existing API/DatasetService/PostGIS persistence flow. - Prevented stale asynchronous dataset-detail responses from replacing the latest selected map layer and its visible context. +- Kept GeoJSON download/copy actions attached to the active theme result when switching themes after a rectangle analysis. ## Sprint 185 Coverage-aware Mol operational benchmark (2026-07-14) diff --git a/backend/tests/test_sprint186_map_first_geographic_explorer.py b/backend/tests/test_sprint186_map_first_geographic_explorer.py index bcf30782..77096d6e 100644 --- a/backend/tests/test_sprint186_map_first_geographic_explorer.py +++ b/backend/tests/test_sprint186_map_first_geographic_explorer.py @@ -24,6 +24,8 @@ def test_map_first_explorer_is_the_default_product_flow() -> None: assert "useMapThemeSelectionInsights" in workspace assert "datasetsApi.selectVectorFeatures" in read("frontend/src/hooks/useMapThemeSelectionInsights.ts") assert "activeSelectionResult" in workspace + assert "downloadActiveThemeSelection" in workspace + assert "disabled={!activeSelectionResult}" in workspace assert "bboxesEqual(mapSelectionBbox, selectedAreaBbox)" in workspace diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 75fccc16..8821c811 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -7761,6 +7761,7 @@ Validated: - The official provisioner persisted 8,444 roads, 3,668 water features and 32,961 parcels alongside the existing 36,941 GRB buildings for the complete Mol municipality. - In-app browser validation of `Volledige gemeente` reported 114.55 km2, 36,941 buildings and a building density of 322.5/km2; the bounded preview clearly reported 1,000 of 36,941 features. - Dataset-detail loading now ignores stale asynchronous responses, preventing a slower municipality-boundary request from overwriting the currently selected building layer or its map context. +- Theme switching reuses the same analyzed rectangle and keeps GeoJSON download/copy actions bound to the active theme result instead of a stale technical dataset selection. Limitations: - Population and forest/green remain unavailable rather than simulated until suitable authoritative sources and semantics are selected. diff --git a/frontend/src/components/map/MapWorkspace.tsx b/frontend/src/components/map/MapWorkspace.tsx index b20da1f2..25b46d11 100644 --- a/frontend/src/components/map/MapWorkspace.tsx +++ b/frontend/src/components/map/MapWorkspace.tsx @@ -604,6 +604,17 @@ export function MapWorkspace({ copyText(JSON.stringify(mapSelectionResult?.geojson ?? { type: 'FeatureCollection', features: [] }, null, 2)) } + const downloadActiveThemeSelection = () => { + if (!activeSelectionResult) { + return + } + downloadJsonFile(`${activeTheme.id}-selection.geojson`, activeSelectionResult.geojson) + } + + const copyActiveThemeSelection = () => { + copyText(JSON.stringify(activeSelectionResult?.geojson ?? { type: 'FeatureCollection', features: [] }, null, 2)) + } + const saveAreaSelectionExport = () => { const bbox = parseBboxInput(bboxInput) if (!bbox) { @@ -961,8 +972,8 @@ export function MapWorkspace({ ) : null}
- - + +
)}