Part of #284 and the pilot P0 (#338), item E (scan runs). Stacked on #342, which is its base; it retargets to main after #342 merges.
Why
A customer could start a scan but never see whether it ran, which step it was at, why it failed, or which stages it left out. The dashboard's fetch_scan_runs was never used.
What
Agent
GET /api/v1/scan-runs?target_id=<id> lists one target's runs. Without the parameter it lists all, as before.
GET /api/v1/targets: each item gains last_scan (the newest ScanRun, or null), fetched for the whole page with one aggregation. The field is additive, so existing clients are unaffected.
Dashboard
Targets list:
a "Letzte Prüfung / Last scan" column shows the status badge, plus the current step while a scan runs;
the findings count links to /findings?target=<id>, the findings list pre-filtered to that target;
"Run scan" refreshes the list.
Target details: scan history, newest 10:
status, start and finish (dd.mm.yyyy in German);
new findings;
the error of a failed run, and a hint for an interrupted one;
every stage that was not run, with its reason.
It re-fetches every 5 s while a run is running. Only the browser polls.
i18n:
the targets page is fully German/English;
target types and artifact kinds are shared label tables (i18n::texts::kinds);
phase names are an exhaustive match over ScanPhase, so a new phase needs both translations to compile.
Stage ids from #339/#340 (sast, sast_c_cpp, sast_vendor_code, ingest) already have labels. Unknown ids show as they are.
Skip reasons stay as the agent writes them (English) for now.
Verification
Unit tests:
scan-run filter document;
date format per language;
stage-label fallback.
All 33 dashboard lib tests pass.
clippy with the CI flags: agent; dashboard server and web. fmt.
Not yet seen in a browser. Staging check: expand a target during a scan and watch the step change; a failed upload shows its error; the findings link filters.
Part of #284 and the pilot P0 (#338), item E (scan runs). **Stacked on #342**, which is its base; it retargets to `main` after #342 merges.
## Why
A customer could start a scan but never see whether it ran, which step it was at, why it failed, or which stages it left out. The dashboard's `fetch_scan_runs` was never used.
## What
**Agent**
- `GET /api/v1/scan-runs?target_id=<id>` lists one target's runs. Without the parameter it lists all, as before.
- `GET /api/v1/targets`: each item gains `last_scan` (the newest `ScanRun`, or `null`), fetched for the whole page with one aggregation. The field is additive, so existing clients are unaffected.
**Dashboard**
- **Targets list:**
- a "Letzte Prüfung / Last scan" column shows the status badge, plus the current step while a scan runs;
- the findings count links to `/findings?target=<id>`, the findings list pre-filtered to that target;
- "Run scan" refreshes the list.
- **Target details:** scan history, newest 10:
- status, start and finish (dd.mm.yyyy in German);
- new findings;
- the error of a failed run, and a hint for an interrupted one;
- every stage that was not run, with its reason.
- It re-fetches every 5 s while a run is `running`. Only the browser polls.
- **i18n:**
- the targets page is fully German/English;
- target types and artifact kinds are shared label tables (`i18n::texts::kinds`);
- phase names are an exhaustive `match` over `ScanPhase`, so a new phase needs both translations to compile.
- Stage ids from #339/#340 (`sast`, `sast_c_cpp`, `sast_vendor_code`, `ingest`) already have labels. Unknown ids show as they are.
- Skip reasons stay as the agent writes them (English) for now.
## Verification
- Unit tests:
- scan-run filter document;
- date format per language;
- stage-label fallback.
- All 33 dashboard lib tests pass.
- clippy with the CI flags: agent; dashboard `server` and `web`. fmt.
- **Not yet seen in a browser.** Staging check: expand a target during a scan and watch the step change; a failed upload shows its error; the findings link filters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A customer could start a scan but never see whether it ran, where it was,
why it failed or which stages it left out: fetch_scan_runs was unused.
- Agent: GET /api/v1/scan-runs takes ?target_id=; GET /api/v1/targets
adds each target's newest run as `last_scan` (one aggregation).
- Targets list: a "last scan" column (status, and the step a running
scan is at); the findings count links to the findings list filtered to
that target (/findings?target=<id>); starting a scan refreshes the list.
- Target details: the scan history, newest first, with start and finish
times, new findings, the error of a failed run, and each stage that was
not run with its reason. It refreshes every 5 s while a scan runs.
- The targets page is in German and English; target types and artifact
kinds are shared label tables. Phase names are an exhaustive match, so
a new phase does not compile without both translations.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #284 and the pilot P0 (#338), item E (scan runs). Stacked on #342, which is its base; it retargets to
mainafter #342 merges.Why
A customer could start a scan but never see whether it ran, which step it was at, why it failed, or which stages it left out. The dashboard's
fetch_scan_runswas never used.What
Agent
GET /api/v1/scan-runs?target_id=<id>lists one target's runs. Without the parameter it lists all, as before.GET /api/v1/targets: each item gainslast_scan(the newestScanRun, ornull), fetched for the whole page with one aggregation. The field is additive, so existing clients are unaffected.Dashboard
/findings?target=<id>, the findings list pre-filtered to that target;running. Only the browser polls.i18n::texts::kinds);matchoverScanPhase, so a new phase needs both translations to compile.sast,sast_c_cpp,sast_vendor_code,ingest) already have labels. Unknown ids show as they are.Verification
serverandweb. fmt.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
a96519bfc7to466ff01283