feat(ui): force Mini App fullscreen on mobile, not via the share link
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 47s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m15s

Replace the shared-link &mode=fullscreen (which would also force fullscreen on
desktop) with an imperative requestFullscreen() on launch, gated to mobile
clients (ios/android/android_x) — mirroring how Telegram's own Mini Apps go
immersive on phones while desktop keeps the bot's full-size window. It triggers
the existing fullscreenChanged -> safe-area resync; a no-op on clients predating
Bot API 8.0.
This commit is contained in:
Ilia Denisov
2026-06-15 17:34:07 +02:00
parent 853730823b
commit 00129414e5
5 changed files with 66 additions and 25 deletions
+1 -3
View File
@@ -78,7 +78,5 @@ export function shareLink(param: string, lang = ''): string | null {
const base = telegramBase(lang);
if (!base) return null;
const sep = base.includes('?') ? '&' : '?';
// mode=fullscreen opens the Mini App fullscreen, matching how the bot's own entry
// opens it, so a shared link and the bot give the same experience.
return `${base}${sep}startapp=${encodeURIComponent(param)}&mode=fullscreen`;
return `${base}${sep}startapp=${encodeURIComponent(param)}`;
}