From 6aaa770554fb9d8b0e33549eb32b9a189f7770c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Fri, 27 Feb 2026 14:32:44 +0000 Subject: [PATCH 1/2] fix(web): do not render an empty software page Instead of rendering a blank page, display an informative message. While this may not be what the user expects, it is significantly more helpful than showing nothing. This change covers a weird corner case where a proposal is not yet ready and there is no associated software progress. --- .../components/software/SoftwarePage.test.tsx | 19 ++++++++++++++++++- web/src/components/software/SoftwarePage.tsx | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/web/src/components/software/SoftwarePage.test.tsx b/web/src/components/software/SoftwarePage.test.tsx index b22cd366eb..b55e177715 100644 --- a/web/src/components/software/SoftwarePage.test.tsx +++ b/web/src/components/software/SoftwarePage.test.tsx @@ -27,6 +27,8 @@ import testingPatterns from "./patterns.test.json"; import testingProposal from "./proposal.test.json"; import SoftwarePage from "./SoftwarePage"; +const mockProposal = jest.fn(); + jest.mock("~/components/layout/Header", () => () =>
Header Mock
); jest.mock("~/components/questions/Questions", () => () =>
Questions Mock
); @@ -35,7 +37,7 @@ jest.mock("~/hooks/model/issue", () => ({ })); jest.mock("~/hooks/model/proposal/software", () => ({ - useProposal: () => testingProposal, + useProposal: () => mockProposal(), })); jest.mock("~/hooks/model/system/software", () => ({ @@ -43,6 +45,10 @@ jest.mock("~/hooks/model/system/software", () => ({ })); describe("SoftwarePage", () => { + beforeEach(() => { + mockProposal.mockReturnValue(testingProposal); + }); + it("renders a list of selected patterns", () => { installerRender(); screen.getAllByText(/GNOME/); @@ -64,4 +70,15 @@ describe("SoftwarePage", () => { installerRender(); screen.getByRole("link", { name: "Change selection" }); }); + + describe("when there is no proposal yet", () => { + beforeEach(() => { + mockProposal.mockReturnValue(null); + }); + + it("renders an informative messsage", () => { + installerRender(); + screen.getByText("No information available yet"); + }); + }); }); diff --git a/web/src/components/software/SoftwarePage.tsx b/web/src/components/software/SoftwarePage.tsx index 8f44697d68..388c7881e3 100644 --- a/web/src/components/software/SoftwarePage.tsx +++ b/web/src/components/software/SoftwarePage.tsx @@ -28,6 +28,7 @@ import { DescriptionListDescription, DescriptionListGroup, DescriptionListTerm, + EmptyState, Grid, GridItem, Spinner, @@ -139,7 +140,7 @@ const Content = () => { const [loading, setLoading] = useState(false); if (!proposal) { - return null; + return ; } // FIXME: temporarily disabled, the API end point is not implemented yet From 1eed1ef3b5cdb9f0fa6d29555f9e797d34f5dd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Fri, 27 Feb 2026 14:51:23 +0000 Subject: [PATCH 2/2] doc(web): add entry in changes files --- web/package/agama-web-ui.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 334e376534..459f734d17 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 27 14:39:08 UTC 2026 - David Diaz + +- Do not show empty software page (related to bsc#1258922). + ------------------------------------------------------------------- Thu Feb 26 16:43:44 UTC 2026 - David Diaz