feat(dashboard): a running scan shows its stages, time and results live (#371) #389

Merged
sharang merged 1 commits from feat/scan-stepper into main 2026-09-25 10:39:53 +00:00
Owner

Closes #371.

A running scan now visibly works: a stepper through its planned stages, a progress bar and a running clock. A scan that finishes while the page is open counts up its new findings and reveals the first ones one after another. The targets list and the findings page refresh while a scan runs.

Decision (2026-09-25)

The stepper comes first; real per-stage findings follow in #372. Findings are still saved at the end of a run. The one backend addition is the list of planned phases, so the stepper shows real stages rather than a guess.

Agent

  • ScanRun.planned_phases is recorded when a run starts. planned_phases() sits next to run_target_pipeline and follows its branches:
    • PLC/ICS: control-logic analysis, the soft-PLC if enabled, the ICS probe, DAST;
    • code (git or an uploaded archive): the stages of scan_tree in order, with the semantic and grounded passes as configured, then DAST if planned;
    • otherwise DAST alone.
  • Findings list: GET /api/v1/findings takes scan_run_id, so a run's own findings can be listed. Findings already store it.

Dashboard

  • Scan runs (components/scan_runs.rs):
    • While running: a progress bar (steps done / planned), every planned stage as a chip (done, current with a spinner, still to come) and an elapsed timer that ticks each second.
    • When a run finishes while the page is open: "Prüfung abgeschlossen", the new-findings count rising to its value, its first six findings fading in one by one (each links to the finding), and "Alle Befunde ansehen".
    • A run from before planned_phases shows the stages it reached.
  • Auto-refresh:
    • Targets list: every 5 s while any target's last scan is running.
    • Findings page: every 10 s while a scan runs; it also checks every 30 s for a scan that has just started.
  • Browser only: polling and animation run only in the browser, never in a server render. With reduced motion, the reveal appears at once.
  • Texts: all new strings are DE/EN.

Checked

  • cargo fmt --all --check.
  • clippy with the CI flags for compliance-agent and the dashboard (server, web).
  • Tests: agent 429, core 99, dashboard 49 / 33. New tests cover planned phases for a code target and a PLC target, the stepper's done / current / pending states (including the fallback for old runs), and the running-scan check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Closes #371. A running scan now visibly works: a stepper through its planned stages, a progress bar and a running clock. A scan that finishes while the page is open counts up its new findings and reveals the first ones one after another. The targets list and the findings page refresh while a scan runs. ## Decision (2026-09-25) The stepper comes first; real per-stage findings follow in #372. Findings are still saved at the end of a run. The one backend addition is the list of planned phases, so the stepper shows real stages rather than a guess. ## Agent - **`ScanRun.planned_phases`** is recorded when a run starts. `planned_phases()` sits next to `run_target_pipeline` and follows its branches: - PLC/ICS: control-logic analysis, the soft-PLC if enabled, the ICS probe, DAST; - code (git or an uploaded archive): the stages of `scan_tree` in order, with the semantic and grounded passes as configured, then DAST if planned; - otherwise DAST alone. - **Findings list:** `GET /api/v1/findings` takes `scan_run_id`, so a run's own findings can be listed. Findings already store it. ## Dashboard - **Scan runs (`components/scan_runs.rs`):** - While running: a progress bar (steps done / planned), every planned stage as a chip (done, current with a spinner, still to come) and an elapsed timer that ticks each second. - When a run finishes while the page is open: "Prüfung abgeschlossen", the new-findings count rising to its value, its first six findings fading in one by one (each links to the finding), and "Alle Befunde ansehen". - A run from before `planned_phases` shows the stages it reached. - **Auto-refresh:** - Targets list: every 5 s while any target's last scan is running. - Findings page: every 10 s while a scan runs; it also checks every 30 s for a scan that has just started. - **Browser only:** polling and animation run only in the browser, never in a server render. With reduced motion, the reveal appears at once. - **Texts:** all new strings are DE/EN. ## Checked - `cargo fmt --all --check`. - clippy with the CI flags for compliance-agent and the dashboard (`server`, `web`). - Tests: agent 429, core 99, dashboard 49 / 33. New tests cover planned phases for a code target and a PLC target, the stepper's done / current / pending states (including the fallback for old runs), and the running-scan check. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-25 10:09:47 +00:00
feat(dashboard): a running scan shows its stages, time and results live (#371)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m32s
3b17a22c35
The agent records the phases a run will go through; the dashboard shows
them as a stepper with a progress bar and an elapsed timer, reveals a
finished run's new findings one by one, and refreshes the targets list
and the findings page while a scan runs. The findings list can filter
by scan run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed feat/scan-stepper from b825f6fbc4 to 3b17a22c35 2026-09-25 10:09:47 +00:00 Compare
sharang merged commit e6e5b14a04 into main 2026-09-25 10:39:53 +00:00
Sign in to join this conversation.