fix(dashboard): Findings/SBOM filter by targets + accurate target findings_count #155

Merged
sharang merged 1 commits from feat/dashboard-targets-dropdowns into main 2026-07-13 07:59:46 +00:00
Owner

Follow-up to #154 for the firmware-path visibility gaps.

  • Findings and SBOM dropdowns now list onboarded targets (fetch_targets), not the legacy repositories collection (empty). The findings/SBOM data was already stored keyed by the target id — you just couldn't filter to it by name.
  • run_target now sets OnboardedTarget.findings_count to the accurate total (Stage 7 of the shared pipeline bumps the legacy repositories doc, which the unified path doesn't have — so the Targets page showed 0).

Local: fmt + clippy (agent, dashboard web) clean.

Part of the move to targets-only. Next: full legacy cutover (TrackedRepository, repositories collection, add-repo API, webhooks, remaining dashboard pages) + firmware SBOM via tramiton.

Follow-up to #154 for the firmware-path visibility gaps. - **Findings** and **SBOM** dropdowns now list **onboarded targets** (`fetch_targets`), not the legacy `repositories` collection (empty). The findings/SBOM data was already stored keyed by the target id — you just couldn't filter to it by name. - **`run_target`** now sets `OnboardedTarget.findings_count` to the accurate total (Stage 7 of the shared pipeline bumps the legacy `repositories` doc, which the unified path doesn't have — so the Targets page showed 0). Local: fmt + clippy (agent, dashboard web) clean. Part of the move to targets-only. Next: full legacy cutover (TrackedRepository, `repositories` collection, add-repo API, webhooks, remaining dashboard pages) + firmware SBOM via tramiton.
sharang added 1 commit 2026-07-13 07:52:20 +00:00
fix(dashboard): Findings/SBOM filter by onboarded targets; accurate target findings_count
CI / Check (pull_request) Successful in 7m4s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
e3b918b365
The Findings and SBOM pages populated their target dropdown from the legacy
`repositories` collection, so onboarded targets never appeared and their
findings/SBOM couldn't be filtered by name (the data was there, keyed by the
target id). Point both dropdowns at `onboarded_targets` via `fetch_targets`.

Also refresh `OnboardedTarget.findings_count` at the end of `run_target`: the
shared pipeline (Stage 7) increments the legacy `repositories` doc, which the
unified path has none of, so the Targets page always showed 0. Set the accurate
total (count of findings keyed by the target id) on the target itself.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sharang merged commit 0ec5fd8295 into main 2026-07-13 07:59:46 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sharang/compliance-scanner-agent#155