From 6f18b2339d8df9bc835a51e04dca93f156e56297 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Tue, 18 Nov 2025 09:27:43 -0500 Subject: [PATCH] Fleet UI: Nuances between platform and last opened time (#35857) --- frontend/interfaces/platform.ts | 3 ++ .../Software/HostSoftwareTableConfig.tsx | 31 +++++++++++++------ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/frontend/interfaces/platform.ts b/frontend/interfaces/platform.ts index f69109a33f..84ce2958ef 100644 --- a/frontend/interfaces/platform.ts +++ b/frontend/interfaces/platform.ts @@ -146,6 +146,9 @@ export const isAppleDevice = (platform = "") => { ); }; +export const isWindows = (platform: string | HostPlatform) => + platform === "windows"; + export const isMacOS = (platform: string | HostPlatform) => platform === "darwin"; diff --git a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx index fc80a0f445..4443a877e7 100644 --- a/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx +++ b/frontend/pages/hosts/details/cards/Software/HostSoftwareTableConfig.tsx @@ -7,7 +7,13 @@ import { IHostSoftware, isIpadOrIphoneSoftwareSource, } from "interfaces/software"; -import { HostPlatform, isLinuxLike } from "interfaces/platform"; +import { + HostPlatform, + isIPadOrIPhone, + isLinuxLike, + isMacOS, + isWindows, +} from "interfaces/platform"; import { IHeaderProps, IStringCellProps } from "interfaces/datatable_config"; import PATHS from "router/paths"; @@ -125,15 +131,20 @@ export const generateSoftwareTableHeaders = ({ }, { Header: (): JSX.Element => { - const lastOpenedHeader = isLinuxLike(platform) ? ( - - The last time the package was opened by the end user
- or accessed by any process on the host. - - } - > + let tooltipContent = <>; + + if (isMacOS(platform)) { + tooltipContent = ( + <>When the version installed most recently was last opened. + ); + } else if (isLinuxLike(platform) || isWindows(platform)) { + tooltipContent = <>When any version was last opened.; + } else if (isIPadOrIPhone(platform)) { + tooltipContent = <>Date and time of last opened.; + } + + const lastOpenedHeader = tooltipContent ? ( + Last opened ) : (