From 7657417f8beacbabb0831829c6ec5d00e9462b06 Mon Sep 17 00:00:00 2001 From: nulmete Date: Tue, 10 Mar 2026 14:28:49 -0300 Subject: [PATCH 1/2] Invalidate vppSoftware and fleet-maintained-apps cache entries after adding software --- .../SoftwareAppStoreVpp/SoftwareAppStoreVpp.tsx | 3 +++ .../FleetMaintainedAppDetailsPage.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareAppStore/SoftwareAppStoreVpp/SoftwareAppStoreVpp.tsx b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareAppStore/SoftwareAppStoreVpp/SoftwareAppStoreVpp.tsx index 2a0fd90a491..67481b66199 100644 --- a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareAppStore/SoftwareAppStoreVpp/SoftwareAppStoreVpp.tsx +++ b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareAppStore/SoftwareAppStoreVpp/SoftwareAppStoreVpp.tsx @@ -186,6 +186,9 @@ const SoftwareAppStoreVpp = ({ queryClient.invalidateQueries({ queryKey: [{ scope: "software-titles" }], }); + queryClient.invalidateQueries({ + queryKey: ["vppSoftware", currentTeamId], + }); router.push( getPathWithQueryParams( diff --git a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/FleetMaintainedAppDetailsPage.tsx b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/FleetMaintainedAppDetailsPage.tsx index 032aecd48cb..a74a37dd68d 100644 --- a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/FleetMaintainedAppDetailsPage.tsx +++ b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/FleetMaintainedAppDetailsPage.tsx @@ -229,6 +229,9 @@ const FleetMaintainedAppDetailsPage = ({ queryClient.invalidateQueries({ queryKey: [{ scope: "software-titles" }], }); + queryClient.invalidateQueries({ + queryKey: [{ scope: "fleet-maintained-apps" }], + }); router.push( getPathWithQueryParams( From e8fdb994754204c83349d4cc7584390e70fdeeb3 Mon Sep 17 00:00:00 2001 From: nulmete Date: Tue, 10 Mar 2026 14:39:31 -0300 Subject: [PATCH 2/2] fix also for custom packages --- .../SoftwareCustomPackage/SoftwareCustomPackage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareCustomPackage/SoftwareCustomPackage.tsx b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareCustomPackage/SoftwareCustomPackage.tsx index 9a029405c38..87810ec8964 100644 --- a/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareCustomPackage/SoftwareCustomPackage.tsx +++ b/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareCustomPackage/SoftwareCustomPackage.tsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useState } from "react"; import { InjectedRouter } from "react-router"; -import { useQuery } from "react-query"; +import { useQuery, useQueryClient } from "react-query"; import PATHS from "router/paths"; import { DEFAULT_USE_QUERY_OPTIONS } from "utilities/constants"; @@ -42,6 +42,7 @@ const SoftwareCustomPackage = ({ }: ISoftwarePackageProps) => { const { renderFlash } = useContext(NotificationContext); const { isPremiumTier, config } = useContext(AppContext); + const queryClient = useQueryClient(); const gitOpsModeEnabled = config?.gitops.gitops_mode_enabled; const [uploadProgress, setUploadProgress] = useState(0); @@ -144,6 +145,10 @@ const SoftwareCustomPackage = ({ ); } + queryClient.invalidateQueries({ + queryKey: [{ scope: "software-titles" }], + }); + const newQueryParams: QueryParams = { fleet_id: currentTeamId, gitops_yaml: gitOpsModeEnabled ? "true" : undefined,