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 <markol.lisica@gmail.com>
Co-authored-by: Jordan Montgomery <elijah.jordan.montgomery@gmail.com>
Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
This commit is contained in:
kiloconnect[bot]
2026-02-19 13:24:58 +00:00
committed by GitHub
co-authored by Marko Lisica Marko Lisica Jordan Montgomery Gabriel Hernandez
parent b957188b84
commit 20049689ea
2 changed files with 34 additions and 0 deletions
@@ -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(<LockModal {...MOCK_PROPS} platform="ios" hostName="iphone-1" />);
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(<LockModal {...MOCK_PROPS} platform="darwin" />);
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(<LockModal {...MOCK_PROPS} />);
@@ -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 = ({
.
</p>
<p> It can only be unlocked through Fleet.</p>
<p>
If the host is turned off or restarted while locked, it will
disconnect from Wi-Fi, and you won&apos;t be able to unlock it
remotely.{" "}
<CustomLink
newTab
text="Learn more"
url={`${LEARN_MORE_ABOUT_BASE_LINK}/unlock-ios-ipados`}
/>
</p>
</>
);
}