chore(ui): TEMP lobby diagnostic for the Android fullscreen issue
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 56s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m19s

Renders Telegram viewport/fullscreen state (isFullscreen, isExpanded, viewport
heights, innerH vs screenH, safe-area insets) in the lobby, inside Telegram
only, to diagnose why the app still opens fullscreen on Android with
requestFullscreen now iOS-only and no persisted state (fresh TG + test account).
REVERT before merge.
This commit is contained in:
Ilia Denisov
2026-06-23 13:36:54 +02:00
parent 6aa5023b24
commit 79766438a2
2 changed files with 30 additions and 0 deletions
+23
View File
@@ -14,6 +14,10 @@ interface TelegramWebApp {
themeParams?: TelegramThemeParams;
colorScheme?: 'light' | 'dark';
isFullscreen?: boolean;
isExpanded?: boolean;
viewportHeight?: number;
viewportStableHeight?: number;
exitFullscreen?: () => void;
safeAreaInset?: { top: number; bottom: number; left: number; right: number };
contentSafeAreaInset?: { top: number; bottom: number; left: number; right: number };
ready?: () => void;
@@ -469,6 +473,25 @@ export function collectTelegramDiag(): TelegramDiag {
};
}
/**
* telegramChromeDiag is a TEMPORARY on-device readout of Telegram's viewport / fullscreen state,
* rendered in the lobby to debug the Android fullscreen-persistence issue (the app still opens
* fullscreen on Android even though requestFullscreen is now iOS-only). REMOVE before merge.
*/
export function telegramChromeDiag(): string {
const w = webApp();
if (!w) return 'no telegram';
const ih = typeof window === 'undefined' ? 0 : window.innerHeight;
const sh = typeof screen === 'undefined' ? 0 : screen.height;
return [
`platform: ${w.platform ?? '—'} version: ${w.version ?? '—'}`,
`isFullscreen: ${w.isFullscreen} isExpanded: ${w.isExpanded}`,
`viewportH: ${w.viewportHeight ?? '—'} stableH: ${w.viewportStableHeight ?? '—'}`,
`innerH: ${ih} screenH: ${sh}`,
`contentSafeTop: ${w.contentSafeAreaInset?.top ?? '—'} safeTop: ${w.safeAreaInset?.top ?? '—'}`,
].join('\n');
}
// --- Login Widget (web sign-in for account linking) ---
// The Login Widget is the web (non-Mini-App) Telegram sign-in. It is used only to