From 9bc95aba6f20bcb39efb4fd4cfab195210307b5d Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Fri, 20 Feb 2026 17:03:34 -0500 Subject: [PATCH] Fleet UI: Several display name instances (#40123) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Issue Closes #39699 ## Description - `display_name` is super far reaching and was not caught as needing updates in several places by design nor dev (original ticket made me deep dive in the code looking for more missed instances and I found several) Fixes: - during setup experience, if a critical software fails, it shows the display_name instead of the default name - when viewing the versions modal from fleet desktop, it shows the display_name instead of the default name as the modal title (screenshot below) - when getting an error message from changing the package type when editing software, it shows the display_name instead of the default name (screenshot below) - ORIGINAL REQUEST: when editing auto updates for an ipados/ios software, it shows the display_name instead of the default name (screenshot below) ## Screenshots of fixes Screenshot 2026-02-20 at 3 30 26 PM Screenshot 2026-02-20 at 3 36 18 PM Screenshot 2026-02-20 at 3 41 38 PM ## Testing - [x] QA'd all new/changed functionality manually --- .../EditAutoUpdateConfigModal.tsx | 17 +++++++++++++++-- .../EditSoftwareModal/helpers.tsx | 9 +++++++-- .../SettingUpYourDevice/SettingUpYourDevice.tsx | 11 ++++++++++- .../InventoryVersionsModal.tests.tsx | 4 ++-- .../InventoryVersionsModal.tsx | 6 +++++- 5 files changed, 39 insertions(+), 8 deletions(-) diff --git a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditAutoUpdateConfigModal/EditAutoUpdateConfigModal.tsx b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditAutoUpdateConfigModal/EditAutoUpdateConfigModal.tsx index 377190b060..edf0ffda4e 100644 --- a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditAutoUpdateConfigModal/EditAutoUpdateConfigModal.tsx +++ b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditAutoUpdateConfigModal/EditAutoUpdateConfigModal.tsx @@ -22,6 +22,7 @@ import { CUSTOM_TARGET_OPTIONS, generateSelectedLabels, getCustomTarget, + getDisplayedSoftwareName, generateHelpText, getTargetType, } from "pages/SoftwarePage/helpers"; @@ -122,7 +123,13 @@ const EditAutoUpdateConfigModal = ({ renderFlash( "success", <> - {softwareTitle.name} configuration updated. + + {getDisplayedSoftwareName( + softwareTitle.name, + softwareTitle.display_name + )} + {" "} + configuration updated. ); @@ -209,7 +216,13 @@ const EditAutoUpdateConfigModal = ({
Auto updates
- Automatically update {softwareTitle.name}{" "} + Automatically update{" "} + + {getDisplayedSoftwareName( + softwareTitle.name, + softwareTitle.display_name + )} + {" "} on all targeted hosts when a new version is available.
diff --git a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/helpers.tsx b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/helpers.tsx index 7ebf5be587..aba40c8494 100644 --- a/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/helpers.tsx +++ b/frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditSoftwareModal/helpers.tsx @@ -4,7 +4,10 @@ import { isAxiosError } from "axios"; import { getErrorReason } from "interfaces/errors"; import { IAppStoreApp, ISoftwarePackage } from "interfaces/software"; -import { generateSecretErrMsg } from "pages/SoftwarePage/helpers"; +import { + generateSecretErrMsg, + getDisplayedSoftwareName, +} from "pages/SoftwarePage/helpers"; const DEFAULT_ERROR_MESSAGE = "Couldn't edit software. Please try again."; @@ -23,7 +26,9 @@ export const getErrorMessage = ( } else if (reason.includes("selected package is")) { return ( <> - Couldn't edit {software.name}. {reason} + Couldn't edit{" "} + {getDisplayedSoftwareName(software.name, software.display_name)}.{" "} + {reason} ); } else if (reason.includes("Secret variable")) { diff --git a/frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/SettingUpYourDevice.tsx b/frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/SettingUpYourDevice.tsx index 0881d2e0a9..1be117b2a2 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/SettingUpYourDevice.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/components/SettingUpYourDevice/SettingUpYourDevice.tsx @@ -1,3 +1,5 @@ +import { getDisplayedSoftwareName } from "pages/SoftwarePage/helpers"; + import Card from "components/Card"; import { ISetupStep } from "interfaces/setup"; import Icon from "components/Icon"; @@ -40,7 +42,14 @@ const SettingUpYourDevice = ({ <>

Your organization requires that critical software be installed before - you use your device. {failedSoftware.name} failed to install. + you use your device.{" "} + + {getDisplayedSoftwareName( + failedSoftware.name, + failedSoftware.display_name + )} + {" "} + failed to install.

{" "} diff --git a/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tests.tsx b/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tests.tsx index a85b26ea96..1cf38817f5 100644 --- a/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tests.tsx +++ b/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tests.tsx @@ -17,8 +17,8 @@ describe("SoftwareDetailsModal", () => { ); - // Modal title - expect(screen.getByText(mockSoftware.name)).toBeVisible(); + // Modal title is display_name and not name + expect(screen.getByText("Mock Software")).toBeVisible(); // Version, Type, Bundle identifier, Last opened expect(screen.getByText("Version")).toBeVisible(); diff --git a/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tsx b/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tsx index ea7356ddf4..15e6c6948a 100644 --- a/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tsx +++ b/frontend/pages/hosts/details/modals/InventoryVersionsModal/InventoryVersionsModal.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useRef, useState } from "react"; import { IHostSoftware } from "interfaces/software"; +import { getDisplayedSoftwareName } from "pages/SoftwarePage/helpers"; import Modal from "components/Modal"; import ModalFooter from "components/ModalFooter"; @@ -57,7 +58,10 @@ const InventoryVersionsModal = ({ return (