fix(dashboard): the SBOM arrow on a target opens the SBOM filtered to it #533

Merged
sharang merged 2 commits from fix/b-sbom-link into main 2026-10-08 21:50:29 +00:00
Owner

What was wrong

The arrow on the SBOM card of a Prüfobjekt linked to /sbom without any filter, so the Stückliste showed the components of all targets instead of this one.

What changed

  • The SBOM route takes an optional query parameter, /sbom?target=<id>, the same way the findings page does (/findings?target=<id>). It preselects the target filter of the Pakete tab (the dropdown shows the target as selected).
  • The target page's SBOM arrow passes its target id. Sidebar and Übersicht links stay unfiltered (target empty).
  • The sidebar keeps "SBOM" highlighted on a filtered SBOM view.
  • Based on main, independent of #530 (different lines in pages/target.rs).

Known limitation, same as the findings page today: navigating from a filtered /sbom?target=… straight to the sidebar's SBOM link keeps the previous filter until the page is reloaded or the dropdown is reset (the component is reused, the filter signal is only seeded once).

Tests

  • New app::tests::the_sbom_page_carries_its_target_in_the_query (route serialises and parses with and without target).
  • cargo fmt --all --check, clippy -D warnings for compliance-dashboard with server and with web.
  • Not clicked through in a browser locally.

Stage re-test

  1. Open a Prüfobjekt with a completed scan.
  2. Click the arrow on the "Stückliste" card: the URL is /sbom?target=<id>, the target dropdown shows that Prüfobjekt and only its components are listed.
  3. Switch the dropdown to "Alle Prüfobjekte": all components appear.
  4. Open SBOM from the sidebar in a fresh tab: unfiltered as before.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

## What was wrong The arrow on the SBOM card of a Prüfobjekt linked to `/sbom` without any filter, so the Stückliste showed the components of all targets instead of this one. ## What changed - The SBOM route takes an optional query parameter, `/sbom?target=<id>`, the same way the findings page does (`/findings?target=<id>`). It preselects the target filter of the Pakete tab (the dropdown shows the target as selected). - The target page's SBOM arrow passes its target id. Sidebar and Übersicht links stay unfiltered (`target` empty). - The sidebar keeps "SBOM" highlighted on a filtered SBOM view. - Based on main, independent of #530 (different lines in `pages/target.rs`). Known limitation, same as the findings page today: navigating from a filtered `/sbom?target=…` straight to the sidebar's SBOM link keeps the previous filter until the page is reloaded or the dropdown is reset (the component is reused, the filter signal is only seeded once). ## Tests - New `app::tests::the_sbom_page_carries_its_target_in_the_query` (route serialises and parses with and without `target`). - `cargo fmt --all --check`, clippy `-D warnings` for compliance-dashboard with `server` and with `web`. - Not clicked through in a browser locally. ## Stage re-test 1. Open a Prüfobjekt with a completed scan. 2. Click the arrow on the "Stückliste" card: the URL is `/sbom?target=<id>`, the target dropdown shows that Prüfobjekt and only its components are listed. 3. Switch the dropdown to "Alle Prüfobjekte": all components appear. 4. Open SBOM from the sidebar in a fresh tab: unfiltered as before. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-08 21:26:30 +00:00
fix(dashboard): the SBOM arrow on a target opens the SBOM filtered to it
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) Canceled after 8m43s
839fb727f2
The arrow on the target page's SBOM card linked to the bare SBOM page, so
it showed every target's components. The SBOM route now takes an optional
?target=<id> (like the findings page) that preselects the target filter;
the target page passes its id, the sidebar and overview links stay
unfiltered, and the sidebar keeps SBOM highlighted for a filtered view.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-08 21:36:30 +00:00
docs(sbom): the target page's SBOM arrow opens the filtered list
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 10m35s
425e84aee4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit b6955db9e0 into main 2026-10-08 21:50:29 +00:00
Sign in to join this conversation.