Skip to content

refactor(RHINENG-19360): remove obsolete UpgradePage and upgrade route#2634

Open
Siasurai wants to merge 1 commit into
RedHatInsights:masterfrom
Siasurai:RHINENG-24556
Open

refactor(RHINENG-19360): remove obsolete UpgradePage and upgrade route#2634
Siasurai wants to merge 1 commit into
RedHatInsights:masterfrom
Siasurai:RHINENG-24556

Conversation

@Siasurai
Copy link
Copy Markdown
Contributor

@Siasurai Siasurai commented May 18, 2026

Removed the obsolete UpgradePage

How to test

  1. Open Vulnerability → CVEs (/insights/vulnerability/cves). Expected: The CVEs page loads and works as before
  2. Open Systems (/insights/vulnerability/systems). Expected: The systems table loads and works as before
  3. Manually open a /insights/vulnerability/upgrade. Expected: the app redirects to CVEs

Summary by Sourcery

Remove the obsolete vulnerability Upgrade page and its route from the application.

Enhancements:

  • Delete the unused Upgrade static page component, route configuration, and related i18n messages.
  • Clean up vulnerability routing and path constants by removing the upgrade path entry.
  • Broaden Jest transformIgnorePatterns to support additional transitive dependencies used in tests.

@Siasurai Siasurai requested a review from a team as a code owner May 18, 2026 09:45
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 18, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the obsolete Vulnerability Upgrade page and its route, cleans up associated i18n messages and static assets, and slightly expands Jest’s transformIgnorePatterns to support additional dependencies used in tests.

Flow diagram for updated VulnerabilityRoutes routing

flowchart LR
  App[InsightsVulnerabilityApp] --> VR[VulnerabilityRoutes]

  VR --> CVEsRoute[Route PATHS.cves]
  VR --> SystemsRoute[Route PATHS.systems]
  VR --> CVEDetailsRoute[Route PATHS.cvedetails]
  VR --> ReportsRoute[Route PATHS.reports]

  %% Upgrade route and UpgradePage component have been removed
Loading

File-Level Changes

Change Details Files
Remove Upgrade static page, route, and navigation constants so the obsolete /upgrade view is no longer served.
  • Deleted the UpgradePage component, its unit test, and its Jest snapshot under StaticPages.
  • Removed the lazy-loaded Upgrade route from VulnerabilityRoutes and its use of the upgrade page title message.
  • Removed the upgrade path definition from the PATHS constants to prevent generating links to the obsolete route.
src/Components/PresentationalComponents/StaticPages/UpgradePage.js
src/Components/PresentationalComponents/StaticPages/UpgradePage.test.js
src/Components/PresentationalComponents/StaticPages/__snapshots__/UpgradePage.test.js.snap
src/Utilities/VulnerabilityRoutes.js
src/Helpers/constants.js
Clean up unused i18n messages related to the removed Upgrade and empty pages.
  • Removed empty-page title, body, and button messages that were specific to the obsolete static page.
  • Removed the upgradePageTitle message that was only used by the deleted upgrade route/component.
  • Updated the English locale bundle to drop the corresponding message keys.
src/Messages.js
locales/en.json
Adjust Jest configuration to transform additional node_modules dependencies needed by the remaining test suite.
  • Expanded transformIgnorePatterns to allow Babel/transform for aggregate-error, indent-string, clean-stack, and escape-string-regexp packages used transitively in tests.
jest.config.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

Copy link
Copy Markdown

@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 - I've reviewed your changes and they look great!


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.

@Siasurai Siasurai changed the title refactor(RHINENG-24556): remove obsolete UpgradePage and upgrade route refactor(RHINENG-19360): remove obsolete UpgradePage and upgrade route May 18, 2026
@Siasurai Siasurai self-assigned this May 20, 2026
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