Skip to content

chore(konflux): bump Backstage from 1.45.2 to 1.49.4#2848

Merged
rrosatti merged 2 commits intoredhat-developer:mainfrom
rrosatti:KFLUXUI-1221/konflux-bump-backstage-version-1.49.X
Apr 22, 2026
Merged

chore(konflux): bump Backstage from 1.45.2 to 1.49.4#2848
rrosatti merged 2 commits intoredhat-developer:mainfrom
rrosatti:KFLUXUI-1221/konflux-bump-backstage-version-1.49.X

Conversation

@rrosatti
Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

Description

In this PR we're bumping the Backstage version for the konflux workspace to 1.49.4 version. Here are the main changes:

  • bump all @backstage/* dependencies via backstage-cli versions:bump --release 1.49.4
  • bump TypeScript from 5.3 to 5.7 and node.js engine to 22/24
  • bump react-router and react-router-dom to 6.30.2
  • simplify EntityPage.tsx to Konflux-only components (removes unused boilerplate)
  • fix TS2742 in useKonfluxResource.ts with explicit type annotation (explicit ApiRef type error)
  • add @backstage/cli-defaults dev dependency

Fixes https://redhat.atlassian.net/browse/KFLUXUI-1221

How to test it?

Prerequisites:

  • use node.js 22 or 24 (node -v to verify)

Build validation:

  • run yarn tsc — should compile without errors
  • run yarn test — all tests should pass

Local dev validation:

  1. run yarn dev to start the local Backstage instance
  2. navigate to an entity with Konflux annotations
  3. verify the Overview tab shows the Latest Releases table and Status card
  4. verify the CI/CD tab loads and displays pipeline runs
  5. verify the Konflux tab loads and displays resources

Visual references

konflux-plugin-bump-backstage-version.mov

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

- bump all @backstage/* dependencies via backstage-cli versions:bump --release 1.49.4
- bump TypeScript from 5.3 to 5.7 (required for DOM.AsyncIterable)
- bump react-router and react-router-dom to 6.30.2
- bump node.js engine from 18/20/22 to 22/24
- add @backstage/cli-defaults to suppress CLI warning
- simplify EntityPage.tsx to Konflux-only components
- fix TS2742 in useKonfluxResource.ts (explicit ApiRef type error)
@rrosatti rrosatti self-assigned this Apr 21, 2026
@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented Apr 21, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. Blank Overview without annotation 🐞 Bug ≡ Correctness
Description
EntityPage.tsx now renders the Overview tab content only inside EntitySwitch.Case blocks guarded
by isKonfluxOverviewAvailable, with no fallback UI, so entities missing `konflux-ci.dev/overview:
'true' will show an empty Overview tab. Since entityPage is mounted under CatalogEntityPage` for
all entities, this impacts every catalog entity that doesn’t carry that annotation.
Code

workspaces/konflux/packages/app/src/components/catalog/EntityPage.tsx[R29-45]

+const overviewContent = (
+  <Grid container spacing={3} alignItems="stretch">
    <EntitySwitch>
-      <EntitySwitch.Case if={hasCatalogProcessingErrors}>
+      <EntitySwitch.Case if={isKonfluxOverviewAvailable}>
        <Grid item xs={12}>
-          <EntityProcessingErrorsPanel />
+          <KonfluxLatestReleases />
        </Grid>
      </EntitySwitch.Case>
    </EntitySwitch>
-  </>
-);
-
-const overviewContent = (
-  <Grid container spacing={3} alignItems="stretch">
-    {entityWarningContent}
-    <Grid item md={6}>
-      <EntityAboutCard variant="gridItem" />
-    </Grid>
-    <Grid item md={6} xs={12}>
-      <EntityCatalogGraphCard variant="gridItem" height={400} />
-    </Grid>
-
-    <Grid item md={4} xs={12}>
-      <EntityLinksCard />
-    </Grid>
-    <Grid item md={8} xs={12}>
-      <EntityHasSubcomponentsCard variant="gridItem" />
-    </Grid>
    <EntitySwitch>
      <EntitySwitch.Case if={isKonfluxOverviewAvailable}>
-        <Grid item xs={12}>
-          <KonfluxLatestReleases />
+        <Grid item md={6} xs={12}>
+          <KonfluxStatus />
        </Grid>
      </EntitySwitch.Case>
    </EntitySwitch>
-
-    <Grid item md={6} xs={12}>
-      <EntitySwitch>
-        <EntitySwitch.Case if={isKonfluxOverviewAvailable}>
-          <Grid item xs={12}>
-            <KonfluxStatus />
-          </Grid>
-        </EntitySwitch.Case>
-      </EntitySwitch>
-    </Grid>
  </Grid>
Relevance

⭐⭐⭐ High

Team often adds explicit empty-states; Overview gated by annotation risks blank UI for non-Konflux
entities.

PR-#2209
PR-#1826

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Overview route renders overviewContent, but overviewContent contains only Konflux components
gated by isKonfluxOverviewAvailable. That predicate is a strict annotation check
(konflux-ci.dev/overview === 'true'), therefore entities without the annotation will render an
empty Grid container. The app mounts entityPage as the child routes for CatalogEntityPage, so
this blank Overview behavior applies broadly across catalog entities.

workspaces/konflux/packages/app/src/components/catalog/EntityPage.tsx[29-52]
workspaces/konflux/plugins/konflux/src/index.ts[29-32]
workspaces/konflux/packages/app/src/App.tsx[79-88]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The entity Overview tab is empty for entities that don't have `konflux-ci.dev/overview: 'true'`, because `overviewContent` only renders Konflux components inside an `EntitySwitch.Case` with no fallback.

### Issue Context
This workspace app mounts `entityPage` under `CatalogEntityPage`, so the blank Overview affects all catalog entities that don't opt into Konflux overview via annotation.

### Fix Focus Areas
- workspaces/konflux/packages/app/src/components/catalog/EntityPage.tsx[29-46]
- workspaces/konflux/plugins/konflux/src/index.ts[29-32]
- workspaces/konflux/packages/app/src/App.tsx[79-88]

### Suggested fix
Add a fallback UI when `isKonfluxOverviewAvailable` is false (e.g., restore a minimal default like `EntityAboutCard`/links, or render an explicit empty-state message explaining that the Konflux overview annotation is missing).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented Apr 21, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-konflux-backend
  • @red-hat-developer-hub/backstage-plugin-konflux-common
  • @red-hat-developer-hub/backstage-plugin-konflux

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/konflux/packages/app none v0.0.0
backend workspaces/konflux/packages/backend none v0.0.0
@red-hat-developer-hub/backstage-plugin-konflux-backend workspaces/konflux/plugins/konflux-backend none v0.1.6
@red-hat-developer-hub/backstage-plugin-konflux-common workspaces/konflux/plugins/konflux-common none v0.1.6
@red-hat-developer-hub/backstage-plugin-konflux workspaces/konflux/plugins/konflux none v0.1.6

@sonarqubecloud
Copy link
Copy Markdown

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Bump Backstage to 1.49.4 with TypeScript 5.7 and simplified entity page

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Bump Backstage from 1.45.2 to 1.49.4 across all packages
• Update TypeScript from 5.3 to 5.7 and Node.js engine to 22/24
• Upgrade react-router dependencies to 6.30.2
• Simplify EntityPage.tsx to Konflux-only components, removing boilerplate
• Fix TypeScript TS2742 error with explicit ApiRef type annotation
• Add @backstage/cli-defaults dev dependency
Diagram
flowchart LR
  A["Backstage 1.45.2"] -- "version bump" --> B["Backstage 1.49.4"]
  C["TypeScript 5.3"] -- "upgrade" --> D["TypeScript 5.7"]
  E["Node.js 18/20/22"] -- "update engines" --> F["Node.js 22/24"]
  G["react-router 6.3.0"] -- "upgrade" --> H["react-router 6.30.2"]
  I["EntityPage.tsx"] -- "simplify" --> J["Konflux-only components"]
  K["useKonfluxResource.ts"] -- "fix TS2742" --> L["Explicit ApiRef type"]
Loading

Grey Divider

File Changes

1. workspaces/konflux/backstage.json ⚙️ Configuration changes +3/-1

Update Backstage version to 1.49.4

workspaces/konflux/backstage.json


2. workspaces/konflux/package.json Dependencies +6/-5

Bump dependencies and update Node.js engine

workspaces/konflux/package.json


3. workspaces/konflux/packages/app/package.json Dependencies +27/-27

Update all Backstage and routing dependencies

workspaces/konflux/packages/app/package.json


View more (6)
4. workspaces/konflux/packages/backend/package.json Dependencies +24/-24

Upgrade Backstage backend plugin dependencies

workspaces/konflux/packages/backend/package.json


5. workspaces/konflux/plugins/konflux-backend/package.json Dependencies +5/-5

Update Backstage backend plugin API dependencies

workspaces/konflux/plugins/konflux-backend/package.json


6. workspaces/konflux/plugins/konflux-common/package.json Dependencies +2/-2

Update Backstage catalog model dependency

workspaces/konflux/plugins/konflux-common/package.json


7. workspaces/konflux/plugins/konflux/package.json Dependencies +10/-10

Upgrade Backstage core and plugin dependencies

workspaces/konflux/plugins/konflux/package.json


8. workspaces/konflux/plugins/konflux/src/hooks/useKonfluxResource.ts 🐞 Bug fix +5/-4

Fix TypeScript TS2742 with explicit ApiRef type

workspaces/konflux/plugins/konflux/src/hooks/useKonfluxResource.ts


9. workspaces/konflux/packages/app/src/components/catalog/EntityPage.tsx ✨ Enhancement +9/-385

Simplify to Konflux-only entity page components

workspaces/konflux/packages/app/src/components/catalog/EntityPage.tsx


Grey Divider

Qodo Logo

Copy link
Copy Markdown

@milantaky milantaky left a comment

Choose a reason for hiding this comment

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

LGTM, tests are passing, project compiles with no errors, and UI working as expected:)

@rrosatti rrosatti merged commit 15e7261 into redhat-developer:main Apr 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants