Skip to content

Conversation

leSamo
Copy link
Contributor

@leSamo leSamo commented Aug 27, 2025

Copy link

jira-linking bot commented Aug 27, 2025

Commits missing Jira IDs:
9036e9a
0a50a87
5481725

Copy link

sourcery-ai bot commented Aug 27, 2025

Reviewer's Guide

This PR expands the OS exposure report’s advisory filter to include both true and false by default, and improves code clarity by removing redundant comments and simplifying the nested JSX rendering logic in OsExposureReportModal.js.

Entity relationship diagram for advisory_available filter change

erDiagram
    FILTER_DATA {
        impact string
        advisory_available string
    }
    FILTER_DATA ||--o{ ADVISORY_OPTION : includes
    ADVISORY_OPTION {
        value string
    }
    %% advisory_available now includes both 'true' and 'false' by default
Loading

File-Level Changes

Change Details Files
Expand advisory_available filter to include false by default
  • Update default filterData.advisory_available from ['true'] to ['true','false']
src/Components/SmartComponents/Modals/OsExposureReportModal/OsExposureReportModal.js
Remove redundant JSDoc and inline comments in selectedTotal useMemo
  • Delete multiline JSDoc block and inline comments, leaving only the core loop logic
src/Components/SmartComponents/Modals/OsExposureReportModal/OsExposureReportModal.js
Simplify nested exposureMap rendering logic
  • Condense nested map calls into a streamlined arrow function chain
  • Remove unnecessary return statements and adjust JSX indentation
src/Components/SmartComponents/Modals/OsExposureReportModal/OsExposureReportModal.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@leSamo leSamo changed the title exposure report advisory available fix(OS report): Do not apply Advisory filter by default Aug 27, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Review the nested map logic in the JSX to ensure your arrow functions with braces are returning the expected elements (or switch to concise bodies for implicit returns).
  • Consider extracting the multi-level exposureMap mapping into a separate component or helper function to improve readability and maintainability.
  • Double-check that defaulting advisory_available to both 'true' and 'false' aligns with the intended filter behavior and doesn’t introduce unintended data in the report.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Review the nested map logic in the JSX to ensure your arrow functions with braces are returning the expected elements (or switch to concise bodies for implicit returns).
- Consider extracting the multi-level exposureMap mapping into a separate component or helper function to improve readability and maintainability.
- Double-check that defaulting advisory_available to both 'true' and 'false' aligns with the intended filter behavior and doesn’t introduce unintended data in the report.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@LightOfHeaven1994 LightOfHeaven1994 left a comment

Choose a reason for hiding this comment

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

LGTM, works as expected! Thank you

@leSamo
Copy link
Contributor Author

leSamo commented Sep 2, 2025

/retest

@bastilian bastilian force-pushed the exposure-report-advisory-available branch from 0cf1551 to 0a50a87 Compare September 24, 2025 16:35
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.38%. Comparing base (bdc1f0f) to head (5481725).

Files with missing lines Patch % Lines
...als/OsExposureReportModal/OsExposureReportModal.js 0.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2335      +/-   ##
==========================================
- Coverage   59.47%   57.38%   -2.09%     
==========================================
  Files         151      151              
  Lines        4303     4301       -2     
  Branches     1377     1389      +12     
==========================================
- Hits         2559     2468      -91     
- Misses       1574     1656      +82     
- Partials      170      177       +7     
Flag Coverage Δ
combined ?
cypress ?
jest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@bastilian bastilian merged commit 76663eb into master Sep 24, 2025
8 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.

4 participants