fix: Remove dead polling code from BannerCheckTab
Build + Deploy / build-admin-compliance (push) Successful in 2m32s
Build + Deploy / build-backend-compliance (push) Successful in 3m20s
Build + Deploy / build-ai-sdk (push) Successful in 53s
Build + Deploy / build-developer-portal (push) Successful in 1m19s
Build + Deploy / build-tts (push) Successful in 1m28s
Build + Deploy / build-document-crawler (push) Successful in 35s
Build + Deploy / build-dsms-gateway (push) Successful in 24s
Build + Deploy / build-dsms-node (push) Successful in 11s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 19s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m9s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 1m0s
CI / test-python-backend (push) Successful in 42s
CI / test-python-document-crawler (push) Successful in 32s
CI / test-python-dsms-gateway (push) Successful in 24s
CI / validate-canonical-controls (push) Successful in 19s
Build + Deploy / trigger-orca (push) Successful in 3m11s

The /banner-check endpoint is synchronous (Playwright completes in
<30s and returns result directly). Removed unused async polling loop
that would never match since no scan_id is returned.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-09 08:22:36 +02:00
parent 445a2f7c7c
commit 751f4a5ee7
@@ -57,25 +57,7 @@ export function BannerCheckTab() {
})
if (!res.ok) throw new Error(`Fehler: ${res.status}`)
const data = await res.json()
if (data.scan_id) {
let attempts = 0
while (attempts < 60) {
await new Promise(r => setTimeout(r, 3000))
const poll = await fetch(`/api/sdk/v1/agent/banner-check?scan_id=${data.scan_id}`)
if (!poll.ok) { attempts++; continue }
const pollData = await poll.json()
if (pollData.progress) setProgress(pollData.progress)
if (pollData.status === 'completed' && pollData.result) {
setResult(pollData.result)
break
}
if (pollData.status === 'failed') throw new Error(pollData.error || 'Scan fehlgeschlagen')
attempts++
}
} else {
setResult(data)
}
setResult(data)
} catch (e) {
setError(e instanceof Error ? e.message : 'Unbekannter Fehler')
} finally {