Complete temporal detection safety gate
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-18 00:53:00 +02:00
parent fc42ea9af5
commit 9146981802
16 changed files with 689 additions and 23 deletions
+4 -10
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react'
import { useState } from 'react'
import { datasetsApi, detectionApi } from '../services/api'
import type {
DatasetCreateResponse,
@@ -126,12 +126,6 @@ export function useDetectionWorkflow({
const [detectionCalibrationError, setDetectionCalibrationError] = useState<string | null>(null)
const [detectionWorkflowStage, setDetectionWorkflowStage] = useState<DetectionWorkflowStage>('idle')
useEffect(() => {
if (!selectedDetectionDatasetId && rasterDatasets.length > 0) {
setSelectedDetectionDatasetId(rasterDatasets[0].id)
}
}, [rasterDatasets, selectedDetectionDatasetId])
const loadDetectionModels = async () => {
setLoadingDetectionModels(true)
setDetectionModelError(null)
@@ -259,7 +253,7 @@ export function useDetectionWorkflow({
setDetectionRunError('Select a project first')
return
}
const datasetId = selectedDetectionDatasetId || rasterDatasets[0]?.id
const datasetId = selectedDetectionDatasetId
if (!datasetId) {
setDetectionRunError('Select a raster dataset')
return
@@ -317,7 +311,7 @@ export function useDetectionWorkflow({
setDetectionRunError('De regionale werkruimte is nog niet geladen')
return null
}
const datasetId = datasetIdOverride || selectedDetectionDatasetId || rasterDatasets[0]?.id
const datasetId = datasetIdOverride || selectedDetectionDatasetId
if (!datasetId) {
setDetectionRunError('Kies of voeg eerst een gegeorefereerd luchtbeeld toe')
return null
@@ -446,7 +440,7 @@ export function useDetectionWorkflow({
setDetectionCalibrationError('Select a project before calibration')
return
}
const datasetId = selectedDetectionDatasetId || rasterDatasets[0]?.id
const datasetId = selectedDetectionDatasetId
if (!datasetId) {
setDetectionCalibrationError('Select a raster dataset before calibration')
return