diff --git a/.env.example b/.env.example index 22c7fbac..754b6466 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,9 @@ OSM_OVERPASS_URL=https://overpass-api.de/api/interpreter # Frontend VITE_API_BASE_URL= VITE_API_PROXY_TARGET=http://localhost:8000 -VITE_MAP_STYLE_URL=https://demotiles.maplibre.org/style.json +# Leave empty to use the local/demo OpenStreetMap fallback with visible attribution. +# Set this to a managed MapLibre style URL for production or heavier tile traffic. +VITE_MAP_STYLE_URL= # Docker Compose / Unraid GEOINTEL_FRONTEND_PORT=1202 diff --git a/backend/tests/test_sprint116_operational_gis_map_workflow.py b/backend/tests/test_sprint116_operational_gis_map_workflow.py index e1aca4e7..ab364661 100644 --- a/backend/tests/test_sprint116_operational_gis_map_workflow.py +++ b/backend/tests/test_sprint116_operational_gis_map_workflow.py @@ -6,12 +6,16 @@ REPO_ROOT = Path(__file__).resolve().parents[2] def test_map_uses_road_basemap_with_attribution_and_env_override() -> None: geo_map = (REPO_ROOT / "frontend/src/components/GeoMap.tsx").read_text(encoding="utf-8") + env_example = (REPO_ROOT / ".env.example").read_text(encoding="utf-8") assert "DEFAULT_ROAD_BASEMAP_STYLE" in geo_map assert "https://tile.openstreetmap.org/{z}/{x}/{y}.png" in geo_map assert "OpenStreetMap contributors" in geo_map assert "VITE_MAP_STYLE_URL" in geo_map assert "AttributionControl" in geo_map + assert "VITE_MAP_STYLE_URL=" in env_example + assert "https://demotiles.maplibre.org/style.json" not in env_example + assert "managed MapLibre style URL" in env_example def test_map_workspace_can_select_persisted_database_layer_and_run_query() -> None: diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 930b0393..a9dce0b0 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -6,13 +6,14 @@ Changed: - Added an Operational GIS run panel that reuses the selected AOI bbox or active layer bbox and calls the existing persisted `vector_features` bbox selection workflow. - Added a visible basemap policy notice when the public OpenStreetMap fallback is active. - Added a guided operational workflow that brings query, derived dataset save, GeoJSON export, reference selection, QA/QC run and evidence handoff into the Map workspace. -- Updated `CHANGELOG.md`, `docs/TODO.md`, `docs/ENVIRONMENT_SPEC.md` and `frontend/README.md`. +- Updated `.env.example`, `CHANGELOG.md`, `docs/TODO.md`, `docs/ENVIRONMENT_SPEC.md` and `frontend/README.md`. - Added regression coverage in `backend/tests/test_sprint116_operational_gis_map_workflow.py`. Validation: - `cd frontend && npm run typecheck` passed. - `python -m pytest backend\tests\test_sprint116_operational_gis_map_workflow.py backend\tests\test_sprint85_map_workspace_density.py backend\tests\test_sprint106_map_bbox_extract.py backend\tests\test_sprint107_map_selection_export.py backend\tests\test_sprint108_map_selection_derived_dataset.py -q` passed: 18 tests. - `python -m pytest backend\tests\test_sprint116_operational_gis_map_workflow.py backend\tests\test_sprint109_map_selection_qa_shortcut.py backend\tests\test_sprint107_map_selection_export.py backend\tests\test_sprint108_map_selection_derived_dataset.py -q` passed: 11 tests. +- `python -m pytest backend\tests\test_sprint116_operational_gis_map_workflow.py -q` passed: 2 tests after aligning `.env.example` with the managed-style override policy. - `cd frontend && npm run build` passed. - `python -m compileall backend/app` passed. - `cd backend && python -m pytest -q` passed: 364 tests. @@ -24,6 +25,9 @@ Validation: - Deploy-time live migration smoke passed after the database became ready on attempt 3; PostGIS reported `3.6 USE_GEOS=1 USE_PROJ=1 USE_STATS=1` and Alembic head was `202606120900`. - Deploy-time browser runtime verification passed for frontend, API proxy and icon. - Internal Codex browser validation passed against `http://192.168.10.150:1202`: the Map workspace rendered a nonblank road basemap, persisted vector layer selector, operational GIS run panel and bbox query action with no console errors. +- `powershell -NoProfile -ExecutionPolicy Bypass -File scripts\deploy_tower.ps1` passed again after the guided workflow update; rebuilt and redeployed the all-in-one container on `http://192.168.10.150:1202` from commit `14b66e6`. +- Deploy-time live migration smoke passed after the database became ready on attempt 2; PostGIS reported `3.6 USE_GEOS=1 USE_PROJ=1 USE_STATS=1` and Alembic head was `202606120900`. +- Internal Codex browser validation passed: the Map workspace showed the basemap policy notice, database layer selector, guided operational GIS steps/actions and nonblank map canvas with no console errors. Limitations: - The default OpenStreetMap tile service is appropriate for local V1 testing and demos, but production or heavier deployments should set `VITE_MAP_STYLE_URL` to a managed tile/style provider.