Variable
ConstShown imperatively with NiceModal.show(InstallPromptModal, { onAccept }),
so the header chip can open it without the modal being prop-drilled down to
it. The provider is already mounted in global-providers.
It shows where the app will come to rest before it asks — the home screen on a handheld, the application switcher on a desktop. The Safari guides all end on that frame, because a guide that stops at the confirmation asks for effort and never shows the payoff; this prompt used to make the same omission in one screen. The picture carries the icon, which is why no identity row sits beside it.
It installs nothing itself. Accepting calls onAccept, which opens the
browser's own install dialog, and the modal closes out of its way — two
stacked dialogs would leave the learner confirming into this one while the
real question waited behind it. Nothing here reports success either: the
outcome belongs to a dialog this application does not draw, so claiming it
would be claiming to know something it cannot see.
onAccept is called before the modal is hidden and with nothing awaited in
between. A browser only honours an install request made from inside a real
gesture, and anything asynchronous ahead of it spends that gesture.
Declining closes the modal and records nothing. The prompt is reached from a header control the learner chose to press, so it is a reference they can come back to rather than a one-shot offer; remembering a refusal would take the control away from someone who pressed it again on purpose.
The dialog is named by its own title rather than by the visible heading: the heading sells the idea while a dialog's accessible name should say what the dialog is — the same split AddToHomeScreenModal makes.
The install prompt: one question, two answers, then the browser takes over.