From 4367400397034c38d553d789f845afa8c31cf8c2 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 24 Jun 2026 21:57:24 +0200 Subject: [PATCH] Polish detection tile handoff --- CHANGELOG.md | 7 ++++++ ..._sprint101_ai_handoff_interaction_smoke.py | 1 + .../tests/test_sprint99_raster_ui_handoff.py | 1 + docs/CODEX_EXECUTION_LOG.md | 24 +++++++++++++++++++ docs/TODO.md | 1 + frontend/src/App.tsx | 1 + scripts/verify_ai_handoff_interactions.sh | 3 ++- 7 files changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c4af78..b485395f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ # Changelog +## Sprint 102 Detection Lab handoff polish (2026-06-24) + +- Updated the raster tile manifest handoff to Detection Lab so it automatically selects `yolo-configured`. +- Tightened the AI handoff browser smoke so it now verifies that the model selection is set by the UI handoff rather than by the test. +- Added regression coverage for the automatic model handoff. +- No backend API, persistence, migration, provider fetching or AI dependency behavior changed. + ## Sprint 101 AI Lab handoff browser smoke (2026-06-24) - Added `scripts/verify_ai_handoff_interactions.sh` to exercise the browser click path from raster tiling into Detection Lab and Segmentation Lab. diff --git a/backend/tests/test_sprint101_ai_handoff_interaction_smoke.py b/backend/tests/test_sprint101_ai_handoff_interaction_smoke.py index f05033a2..1b1ea220 100644 --- a/backend/tests/test_sprint101_ai_handoff_interaction_smoke.py +++ b/backend/tests/test_sprint101_ai_handoff_interaction_smoke.py @@ -22,5 +22,6 @@ def test_ai_handoff_interaction_smoke_is_registered_and_clicks_both_handoffs() - assert "Use in Detection Lab" in script assert "Use in Segmentation Lab" in script assert "yolo-configured" in script + assert "detection model handoff mismatch" in script assert "Raster tile manifest path" in script assert "AI handoff interaction verification passed" in script diff --git a/backend/tests/test_sprint99_raster_ui_handoff.py b/backend/tests/test_sprint99_raster_ui_handoff.py index 9445219d..fa99e86f 100644 --- a/backend/tests/test_sprint99_raster_ui_handoff.py +++ b/backend/tests/test_sprint99_raster_ui_handoff.py @@ -17,6 +17,7 @@ def test_raster_tile_manifest_is_visible_and_can_handoff_to_detection_lab() -> N assert "onUseTileManifestForDetection: useRasterTileManifestForDetection" in app assert "setDetectionTileManifestPath(manifestPath)" in app assert "setSelectedDetectionDatasetId(selectedDataset.id)" in app + assert "setSelectedDetectionModelId('yolo-configured')" in app assert "latestRasterTileManifestPath" in detail_panel assert "onUseTileManifestForDetection" in detail_panel assert "Latest tile manifest" in raster_controls diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 9f03549d..531c59fe 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -3679,3 +3679,27 @@ Limitations: Next recommended pass: - After validation and deploy, keep using the AI handoff smoke as the browser-level regression guard for raster-to-AI workspace wiring. + +## Sprint 102 Detection Lab handoff polish (2026-06-24) + +Changed: +- Updated `useRasterTileManifestForDetection` in `frontend/src/App.tsx` to set `selectedDetectionModelId` to `yolo-configured` when a raster tile manifest is handed off from the dataset inspector. +- Tightened `scripts/verify_ai_handoff_interactions.sh` so it verifies that Detection Lab is already on `yolo-configured` after the handoff instead of selecting that model inside the smoke. +- Updated `backend/tests/test_sprint99_raster_ui_handoff.py` and `backend/tests/test_sprint101_ai_handoff_interaction_smoke.py`. +- Updated `CHANGELOG.md` and `docs/TODO.md`. + +Tested: +- Red step: `python -m pytest backend\tests\test_sprint99_raster_ui_handoff.py -q` failed while the detection handoff did not set `yolo-configured`. +- `python -m pytest backend\tests\test_sprint99_raster_ui_handoff.py backend\tests\test_sprint101_ai_handoff_interaction_smoke.py -q` (`2 passed`) +- `cd frontend && npm run typecheck` +- `cd frontend && npm run build` +- `bash -n scripts/verify_ai_handoff_interactions.sh` + +Open: +- Complete broad validation, deploy and live internal-browser handoff check for this pass. + +Limitations: +- Frontend handoff polish only; no backend API, persistence, migration, provider fetching, AI dependency or model execution behavior changed. + +Next recommended pass: +- After live validation, continue with the next V1 usability gap from the workbench flow rather than adding new model/provider scope. diff --git a/docs/TODO.md b/docs/TODO.md index 01588d4d..17ed16a2 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -368,3 +368,4 @@ This file now starts with the current implementation status. Older preparation/b - [x] Add QA/QC evidence drilldown for selected checks, false-positive/negative evidence and provenance JSON. - [x] Add raster pipeline readiness and guardrail surfaces for metadata, CRS, preview, tile manifest and clip-AOI handoff. - [x] Add useful default dataset context so Data, Map and Exports are immediately usable after project/demo load. +- [x] Make raster tile handoff to Detection Lab auto-select the configured YOLO run form. diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 26b69ed5..62ae96ad 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -262,6 +262,7 @@ function App(): JSX.Element { } setDetectionTileManifestPath(manifestPath) setSelectedDetectionDatasetId(selectedDataset.id) + setSelectedDetectionModelId('yolo-configured') setActiveWorkspace('ai') } const { diff --git a/scripts/verify_ai_handoff_interactions.sh b/scripts/verify_ai_handoff_interactions.sh index da8accde..7efcab8b 100755 --- a/scripts/verify_ai_handoff_interactions.sh +++ b/scripts/verify_ai_handoff_interactions.sh @@ -126,7 +126,8 @@ try { await page.locator('[data-testid="workspace-nav-ai"]').waitFor({ state: 'visible', timeout: 10000 }) const detectionPanel = page.locator('.detection-lab-shell') await detectionPanel.waitFor({ state: 'visible', timeout: 10000 }) - await detectionPanel.locator('select').nth(1).selectOption('yolo-configured') + const detectionModelValue = await detectionPanel.locator('select').nth(1).inputValue() + assert(detectionModelValue === 'yolo-configured', `detection model handoff mismatch: ${detectionModelValue}`) const detectionDatasetValue = await detectionPanel.getByLabel('Raster dataset').inputValue() assert(detectionDatasetValue === rasterDatasetId, `detection dataset handoff mismatch: ${detectionDatasetValue}`) const detectionManifestValue = await detectionPanel.getByPlaceholder('Raster tile manifest path').inputValue()