Skip to content

Conversation

@jkowalski
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented May 25, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.37%. Comparing base (cb455c6) to head (271d068).
Report is 529 commits behind head on master.

Files with missing lines Patch % Lines
internal/server/server.go 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4604      +/-   ##
==========================================
+ Coverage   75.86%   76.37%   +0.50%     
==========================================
  Files         470      529      +59     
  Lines       37301    40161    +2860     
==========================================
+ Hits        28299    30672    +2373     
- Misses       7071     7464     +393     
- Partials     1931     2025      +94     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jkowalski jkowalski marked this pull request as ready for review May 25, 2025 21:05
@jkowalski jkowalski requested a review from Copilot May 25, 2025 21:05
Copy link

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 fixes notification severities on snapshot creation by updating tests, adding an OverallStatusCode method, and unifying the severity reporting across server and CLI components.

  • Added an expectedCode field in tests and its corresponding assertions.
  • Introduced the OverallStatusCode method in the multi_snapshot_status module.
  • Updated both server and CLI code to use reportSeverity for mapping statuses to notification severities.
  • Revised the notification level constants and default behavior in the frontend JavaScript.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
notification/notifydata/multi_snapshot_status_test.go Added expectedCode to test cases; duplicate test case names could be clarified.
notification/notifydata/multi_snapshot_status.go Implemented OverallStatusCode to derive correct notification severity.
internal/server/server.go Updated severity mapping with reportSeverity; contains duplicate logic noted for refactor.
cli/command_snapshot_create.go Updated severity mapping to use reportSeverity.
app/public/notifications.js Updated exported constants and notification level default.
app/public/electron.js Aligned notification severity checks with newly exported constants.
Comments suppressed due to low confidence (1)

notification/notifydata/multi_snapshot_status_test.go:46

  • Duplicate test case names may lead to confusion in test reports; consider renaming one of the 'one fatal error' cases to clearly represent different scenarios.
name: "one fatal error",

}
}

func (*Server) reportSeverity(st notifydata.MultiSnapshotStatus) notification.Severity {
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

The reportSeverity function duplicates logic present in 'cli/command_snapshot_create.go'; consider refactoring into a shared utility to enhance maintainability.

Copilot uses AI. Check for mistakes.
@jkowalski jkowalski requested a review from julio-lopez May 25, 2025 22:44
@jkowalski jkowalski merged commit 1ee2497 into kopia:master May 25, 2025
27 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.

1 participant