From 161564f3d4cf4d0a9f42cd7b380bef24fffac15d Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 17 Jul 2026 03:06:05 +0200 Subject: [PATCH] Preserve map analysis across workspaces --- CHANGELOG.md | 3 +++ backend/tests/test_sprint232_v1_completion_flow.py | 4 ++++ docs/CODEX_EXECUTION_LOG.md | 4 ++++ docs/TODO.md | 3 ++- frontend/src/App.tsx | 4 ++-- frontend/src/styles/app.css | 3 +++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e791e5aa..4c29f75d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ governed raster analyses and complete historical comparisons. - Added compact post-analysis actions for the local grounded Ollama assistant and the existing Downloads workspace, preserving the active area context. +- Kept the map workspace mounted while visiting AI, Downloads or another + workspace so the selected theme, computed result and evolution comparison + remain available when the operator returns to the map. - Replaced the accumulated TODO lists as the product roadmap with one current V1 completion board; historical sprint checklists remain retained as implementation evidence. diff --git a/backend/tests/test_sprint232_v1_completion_flow.py b/backend/tests/test_sprint232_v1_completion_flow.py index 426678e7..93fbc8b4 100644 --- a/backend/tests/test_sprint232_v1_completion_flow.py +++ b/backend/tests/test_sprint232_v1_completion_flow.py @@ -39,5 +39,9 @@ def test_completed_analysis_hands_off_to_ai_and_downloads_responsively() -> None assert "Open downloads" in workspace assert "onOpenAssistant={() => setActiveWorkspace('assistant')}" in app assert "onOpenExports={() => setActiveWorkspace('exports')}" in app + assert 'className="workspace-persistent-map"' in app + assert "hidden={activeWorkspace !== 'map'}" in app + assert "{activeWorkspace === 'map' ? (" not in app assert ".geo-result-next-actions" in styles assert ".geo-results-panel > .geo-result-next-actions" in styles + assert ".workspace-persistent-map[hidden]" in styles diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 193c830d..ad5c17c9 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -9854,6 +9854,10 @@ Implemented: analysis response rather than an empty raster GeoJSON shell. - Added direct post-analysis handoff buttons to `AI-vragen` and `Downloads`. The selected Area or drawn bbox remains in shared App state. +- Kept the geographic explorer mounted while other workspaces are active so + its selected theme, analysis result and temporal comparison survive the + round trip to AI or Downloads. Hidden workspaces remain non-interactive and + MapLibre resizes through its existing `ResizeObserver` when shown again. - Added one current V1 completion board to `docs/TODO.md`; legacy checklists remain preserved but no longer define product readiness. diff --git a/docs/TODO.md b/docs/TODO.md index 6a3824da..b5b19b3e 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -19,7 +19,8 @@ geen open productroadmap meer. - [x] Download vectorresultaten als GeoJSON, rasteranalyses als JSON en historische vergelijkingen als JSON; kopieren blijft voor alle drie mogelijk. - [x] Ga vanuit een afgeronde analyse rechtstreeks naar de lokale - brongebonden Ollama-assistent of naar Downloads. + brongebonden Ollama-assistent of naar Downloads en keer terug zonder het + zichtbare kaartresultaat of de evolutievergelijking te verliezen. - [x] Gebruik de operationele lokale YOLO/PyTorch-keten alleen met persisted detecties, GRB-QA en expliciete controlewaarschuwingen. - [x] Draai de volledige applicatie in de beheersbare Unraid-container op poort diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index a1088e20..c6464e05 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -999,7 +999,7 @@ function App(): JSX.Element { ) : null} - {activeWorkspace === 'map' ? ( + {activeWorkspace === 'analysis' ? (
diff --git a/frontend/src/styles/app.css b/frontend/src/styles/app.css index a97ab48d..dabe8460 100644 --- a/frontend/src/styles/app.css +++ b/frontend/src/styles/app.css @@ -7262,3 +7262,6 @@ section { flex-direction: column; } } +.workspace-persistent-map[hidden] { + display: none; +}