Skip to content

Refactor average remediation times#680

Merged
timbastin merged 4 commits intomainfrom
refactor-average-remediation-times
Mar 16, 2026
Merged

Refactor average remediation times#680
timbastin merged 4 commits intomainfrom
refactor-average-remediation-times

Conversation

@Hubtrick-Git
Copy link
Copy Markdown
Collaborator

Adapted the frontend types to the data structure returned by the api and adjusted the data parsing of the repository overview accordingly

Copilot AI review requested due to automatic review settings March 6, 2026 15:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the frontend to match a new API response shape for “average remediation/fixing time” stats, and refactors the asset repository overview page to fetch and display the new structure.

Changes:

  • Introduces a new AllAverageFixingTimes API type to represent averages for all severities and both risk/CVSS modes.
  • Refactors the asset version overview page to fetch average fixing times with a single SWR request instead of one request per severity.
  • Adjusts chart input parsing by mapping the new response fields into the existing AverageFixingTimeChart prop shape.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/types/api/api.ts Adds AllAverageFixingTimes to represent the updated API response structure for average fixing times across severities/modes.
src/app/(loading-group)/[organizationSlug]/projects/[projectSlug]/assets/[assetSlug]/refs/[assetVersionSlug]/page.tsx Switches from 4 SWR calls to 1 and maps the new response into per-severity chart props.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/types/api/api.ts
@timbastin timbastin merged commit 45ec342 into main Mar 16, 2026
11 checks passed
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.

3 participants