feat(dashboard): onboarding starts the first scan and shows its progress #344

Merged
sharang merged 1 commits from feat/onboarding-flow into main 2026-09-23 14:03:47 +00:00
Owner

Part of #271 and the pilot P0 (#338), item E (onboarding). Stacked on #343 (→ #342).

Why

The wizard created a target and then left the customer to find the scan button. A failed create or upload could pass unnoticed, and a large upload showed no sign of life.

What

  • Create → upload → scan:
    • staged files upload one by one ("Wird hochgeladen 1/2: firmware.tar.gz");
    • the review step lists staged files with readable sizes;
    • the first scan starts on its own, except:
      • when an upload failed: the target is kept, the failed files are listed with the agent's reason, and the scan is not started;
      • when the target offers opt-in scans (live devices, never in source_only): the user ticks them first.
  • Last step:
    • live scan progress (the ScanRunList from #343);
    • links to the target's findings (/findings?target=) and to the targets list;
    • "onboard another" resets everything, including the opt-in ticks.
  • Readable errors: agent_client::json_or_error. Every onboarding API call now turns a non-2xx response into the agent's error message, or the status text, plus the code, instead of a JSON parse error.
  • German/English: the wizard, the target-type hints, and the shared SourceOnlyNote.
  • Scan history: also polls while it is still empty, because a scan just started may not be recorded when the first request lands.

Verification

  • Unit tests:
    • opt-in selection;
    • refusal messages;
    • byte formatting per language.
    • 36 dashboard lib tests pass.
  • clippy with the CI flags (server, web); fmt.
  • Not yet seen in a browser. Staging walkthrough on Tue 29:
    • zip upload → scan starts → progress → findings link;
    • an oversized upload shows the 413 reason and no scan.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Part of #271 and the pilot P0 (#338), item E (onboarding). **Stacked on #343** (→ #342). ## Why The wizard created a target and then left the customer to find the scan button. A failed create or upload could pass unnoticed, and a large upload showed no sign of life. ## What - **Create → upload → scan:** - staged files upload one by one ("Wird hochgeladen 1/2: firmware.tar.gz"); - the review step lists staged files with readable sizes; - the first scan **starts on its own**, except: - when an upload failed: the target is kept, the failed files are listed with the agent's reason, and the scan is not started; - when the target offers opt-in scans (live devices, never in `source_only`): the user ticks them first. - **Last step:** - live scan progress (the `ScanRunList` from #343); - links to the target's findings (`/findings?target=`) and to the targets list; - "onboard another" resets everything, including the opt-in ticks. - **Readable errors:** `agent_client::json_or_error`. Every onboarding API call now turns a non-2xx response into the agent's `error` message, or the status text, plus the code, instead of a JSON parse error. - **German/English:** the wizard, the target-type hints, and the shared `SourceOnlyNote`. - **Scan history:** also polls while it is still empty, because a scan just started may not be recorded when the first request lands. ## Verification - Unit tests: - opt-in selection; - refusal messages; - byte formatting per language. - 36 dashboard lib tests pass. - clippy with the CI flags (`server`, `web`); fmt. - **Not yet seen in a browser.** Staging walkthrough on Tue 29: - zip upload → scan starts → progress → findings link; - an oversized upload shows the 413 reason and no scan. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang changed target branch from feat/scan-run-view to main 2026-09-23 13:55:07 +00:00
sharang added 1 commit 2026-09-23 13:55:07 +00:00
feat(dashboard): onboarding starts the first scan and shows its progress
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 8m13s
8f0ce55ae3
The wizard created a target and then left the customer to find the scan
button; a failed create or upload could pass unnoticed, and a large
upload gave no sign of life.

- Create uploads the staged files one by one and says which; the review
  step lists the staged files with readable sizes (12,3 MB).
- The first scan starts on its own, unless an upload failed (the target
  is then kept, the scan is not started, and the failed files are
  listed) or the target offers opt-in scans to decide on first.
- The last step follows that scan live (the scan history component) and
  links to the target's findings and to the targets list.
- Onboarding API calls report the agent's refusal (its `error` message or
  the status text) instead of a JSON parse error: json_or_error in the
  agent client.
- The wizard and the source-only note are in German and English; the
  scan history also polls while it is still empty, since a scan just
  started may not be recorded yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed feat/onboarding-flow from adbb36a364 to 8f0ce55ae3 2026-09-23 13:55:08 +00:00 Compare
sharang merged commit efb2c8a1ea into main 2026-09-23 14:03:47 +00:00
Sign in to join this conversation.