From 20049689eab0bc128a2c650377c93663485c976a Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 13:24:58 +0000 Subject: [PATCH] Add copy to Lock modal for iOS/iPadOS: explain that if host is turned off it gets disconnected from WiFI and can't be unlocked (#39967) Resolves: #39251 ## Changes This PR updates the lock modal for iOS/iPadOS hosts to display the copy which explains that host can't be unlocked if restarted, because Wi-Fi can't be connected. - [x] Changes are covered by tests - [x] Manual QA for all new/changed functionality --- Built for [Marko Lisica](https://fleetdm.slack.com/archives/D0AFA3M07AP/p1771343829171799?thread_ts=1771342741.687709&cid=D0AFA3M07AP) by [Kilo for Slack](https://kilo.ai/features/slack-integration) --------- Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com> Co-authored-by: Marko Lisica Co-authored-by: Jordan Montgomery Co-authored-by: Gabriel Hernandez --- .../modals/LockModal/LockModal.tests.tsx | 22 +++++++++++++++++++ .../modals/LockModal/LockModal.tsx | 12 ++++++++++ 2 files changed, 34 insertions(+) diff --git a/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tests.tsx b/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tests.tsx index 5a44e6507f..d8f955e17a 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tests.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tests.tsx @@ -49,6 +49,28 @@ describe("LockModal", () => { expect(screen.getByText(/iphone-1/i)).toBeInTheDocument(); }); + it("renders WiFi warning for iOS/iPadOS platforms", () => { + const render = createCustomRenderer({ withBackendMock: true }); + render(); + + expect( + screen.getByText( + /If the host is turned off or restarted while locked, it will disconnect from Wi-Fi, and you won't be able to unlock it remotely/i + ) + ).toBeInTheDocument(); + }); + + it("does not render WiFi warning for macOS platform", () => { + const render = createCustomRenderer({ withBackendMock: true }); + render(); + + expect( + screen.queryByText( + /If the device is turned off or restarted while locked/i + ) + ).not.toBeInTheDocument(); + }); + it("disables Lock button until confirm checkbox is checked", async () => { const render = createCustomRenderer({ withBackendMock: true }); const { user } = render(); diff --git a/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tsx b/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tsx index 22f6d4e348..41889d6db9 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/modals/LockModal/LockModal.tsx @@ -1,6 +1,8 @@ import React, { useContext } from "react"; import { Link } from "react-router"; +import { LEARN_MORE_ABOUT_BASE_LINK } from "utilities/constants"; + import PATHS from "router/paths"; import { NotificationContext } from "context/notification"; import { getErrorReason } from "interfaces/errors"; @@ -91,6 +93,16 @@ const LockModal = ({ .

It can only be unlocked through Fleet.

+

+ If the host is turned off or restarted while locked, it will + disconnect from Wi-Fi, and you won't be able to unlock it + remotely.{" "} + +

); }