Skip to content

refactor: fjern historikk og MTTF fra sårbarhetsvisningene - #766

Draft
ybelMekk wants to merge 4 commits into
mainfrom
remove-vulnerability-history-mttf
Draft

ybelMekk wants to merge 4 commits into
mainfrom
remove-vulnerability-history-mttf

Conversation

@ybelMekk

Copy link
Copy Markdown
Contributor

Historikk- og MTTF-grafene tas ut som del av arbeidet med å gjøre Console enklere og mer faktabasert. Fjerner visningene og direkte ubrukte komponenter, queries, hjelpere og tester.

Endringen trenger ikke vente på at API-feltene fjernes.

@ybelMekk
ybelMekk requested a balanced review from Copilot November 20, 2026 08:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The client tests still expect history fetches after the history component was removed, causing failures for both Application and Job; update those expectations while preserving the findings-refresh assertions.

1 open issue
What changed in this PR

Removes vulnerability history and mean-time-to-fix charts from Console, simplifying vulnerability views while preserving current findings, summaries, and image activity.

Changes:

  • Removes history charts and their queries from tenant, team, and workload views.
  • Deletes unused chart components and helpers, removes related helper tests, and updates the SSR assertion.
  • Refreshes the generated GraphQL schema.
File Description
src/​routes/​vulnerabilities/​VulnerabilityHistory.svelte Deletes tenant history view and query.
src/​routes/​vulnerabilities/​(single)/​+page.svelte Removes tenant history rendering.
src/​routes/​team/​[team]/​vulnerabilities/​+page.svelte Removes team history and fix-time sections.
src/​lib/​utils/​vulnerabilities.ts Removes chart-only severity and risk-score helpers.
src/​lib/​utils/​vulnerabilities.test.ts Removes tests for deleted helpers.
src/​lib/​domain/​vulnerability/​WorkloadVulnerabilityHistoryGraph.svelte Deletes workload history view and query.
src/​lib/​domain/​vulnerability/​WorkloadVulnerabilitiesPage.test.ts Expects history to be absent from SSR output.
src/​lib/​domain/​vulnerability/​WorkloadVulnerabilitiesPage.svelte Removes the workload history card.
src/​lib/​domain/​vulnerability/​TeamVulnerabilityHistoryGraph.svelte Deletes team history view and query.
src/​lib/​domain/​vulnerability/​TeamMeanTimeToFixHistoryGraph.svelte Deletes team fix-time view and query.
src/​lib/​domain/​vulnerability/​dateUtils.ts Removes history intervals; retains duration formatting.
src/​lib/​chart/​VulnerabilityChart.svelte Deletes the shared vulnerability history chart.
src/​lib/​chart/​MeanTimeToFixChart.svelte Deletes the shared fix-time chart.
schema.graphql Removes history APIs and includes upstream workload-related additions.

Review effort: Balanced

expect(body).not.toContain('class="priority-group"');
expect(body).toContain('Image activity log');
expect(body).toContain('Vulnerability history');
expect(body).not.toContain('Vulnerability history');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants