fix: isolate regional project context
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-14 18:41:05 +02:00
parent bb7310e015
commit 9fff0c5706
6 changed files with 46 additions and 7 deletions
+9
View File
@@ -30,6 +30,14 @@ function toRasterMetadata(metadata: Record<string, unknown> | null | undefined):
return metadata as unknown as RasterMetadataResponse
}
function isOperationalScopeBoundaryDataset(dataset: DatasetCreateResponse): boolean {
return (
dataset.status === 'ready' &&
(dataset.dataset_type === 'vector' || dataset.dataset_type === 'geojson') &&
dataset.source_metadata?.layer_type === 'regional_boundary'
)
}
function extractRasterTileManifestPath(job: JobRead | null | undefined): string {
const manifest = toRasterTileHandoff(job)
return manifest?.manifest_path ?? ''
@@ -131,6 +139,7 @@ export function useDatasetWorkflow({
}
// Auto-open the first usable dataset so Data, Map and Exports start with real context.
const defaultDataset =
datasets.find(isOperationalScopeBoundaryDataset) ??
datasets.find(isPrimaryFocusMunicipalityBoundaryDataset) ??
datasets.find((dataset) => isVectorDatasetType(dataset.dataset_type) && dataset.status === 'ready') ??
datasets.find((dataset) => dataset.status === 'ready') ??