fix(ui): Android Telegram nav — windowed mode, no close guard #128

Merged
developer merged 6 commits from feature/telegram-android-nav-fixes into development 2026-06-23 13:14:05 +00:00
Owner

Fixes three Android Telegram Mini App issues found on Pixel 10 / Android 17 / TG 12.8.2.

Issues

  1. No back button when entering a game — the native top control stays "close".
  2. Swipe-back minimises the app instead of navigating back.
  3. "changes that you made may not be saved" on every close from the game board, even when untouched.

Fix

  • Fullscreen on iOS only (#1 + #2 — same root cause). On Android requestFullscreen replaces the native header — and its BackButton, which also captures the Android system swipe-back — with a bare close/menu pill, so back-nav has no control and the system back minimises. Staying windowed on Android restores the native header + BackButton. iOS keeps immersive fullscreen (unchanged); the iOS decision is deferred pending the owner's emulator check.
  • Remove the close-confirmation guard (#3). It was armed unconditionally on game mount. Move drafts auto-save (debounced during play + flushed on destroy), so closing loses nothing; the generic dialog was pure noise.
  • Drops the now-unused telegramClosingConfirmation / isMobilePlatform helpers + their SDK interface fields.

Verification

Not reproducible in Playwright (real Telegram webview) — verify on the Android emulator against the test contour. Local: pnpm check clean, 324 unit, build, 156 e2e green. The iOS path and the manual tg-fullscreen header-layout e2e are unaffected. Docs: UI_DESIGN.md.

Fixes three Android Telegram Mini App issues found on Pixel 10 / Android 17 / TG 12.8.2. ## Issues 1. **No back button when entering a game** — the native top control stays "close". 2. **Swipe-back minimises** the app instead of navigating back. 3. **"changes that you made may not be saved" on every close** from the game board, even when untouched. ## Fix - **Fullscreen on iOS only** (#1 + #2 — same root cause). On Android `requestFullscreen` replaces the native header — and its `BackButton`, which also captures the Android system swipe-back — with a bare close/menu pill, so back-nav has no control and the system back minimises. Staying windowed on Android restores the native header + BackButton. iOS keeps immersive fullscreen (unchanged); the iOS decision is deferred pending the owner's emulator check. - **Remove the close-confirmation guard** (#3). It was armed unconditionally on game mount. Move drafts auto-save (debounced during play + flushed on destroy), so closing loses nothing; the generic dialog was pure noise. - Drops the now-unused `telegramClosingConfirmation` / `isMobilePlatform` helpers + their SDK interface fields. ## Verification Not reproducible in Playwright (real Telegram webview) — **verify on the Android emulator against the test contour**. Local: `pnpm check` clean, **324** unit, build, **156** e2e green. The iOS path and the manual `tg-fullscreen` header-layout e2e are unaffected. Docs: `UI_DESIGN.md`.
developer added 1 commit 2026-06-23 09:48:51 +00:00
fix(ui): Android Telegram nav — windowed mode, no close guard
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 1m18s
6aa5023b24
Three Android Mini App issues, all in the Telegram chrome:

- Entering a game showed no native back button, and the Android system
  swipe-back minimised the app instead of navigating. Root cause: immersive
  fullscreen (requestFullscreen). On Android, fullscreen replaces the native
  header — and its BackButton, which also captures the system back — with a bare
  close/menu pill, so back navigation has no control to land on. Request
  fullscreen on iOS only; Android stays windowed, keeping the native header +
  BackButton (and the system swipe-back that routes to it). iOS is unchanged.

- Closing the game board always prompted "changes that you made may not be
  saved", even on a board just opened and untouched. The close-confirmation was
  armed unconditionally on game mount. Remove it entirely: move drafts auto-save
  (debounced during play + flushed on destroy), so nothing is lost on close.

Drops the now-unused telegramClosingConfirmation + isMobilePlatform helpers and
their SDK interface fields. Docs: UI_DESIGN.md.
developer added 1 commit 2026-06-23 11:36:56 +00:00
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
79766438a2
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.
developer added 1 commit 2026-06-23 12:04:24 +00:00
chore(ui): TEMP disable fullscreen for testing + Android back chevron + BackButton diag
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) Failing after 8s
CI / gate (pull_request) Failing after 0s
CI / deploy (pull_request) Has been skipped
6f00c2f41d
WIP for the Android nav investigation (TEMP bits reverted before merge):
- telegramRequestFullscreen: temporarily a no-op (incl. iOS) so the owner can
  confirm the Android "fullscreen look" is Telegram's own Mini App presentation,
  not our requestFullscreen (isFullscreen is already false on Android).
- Header: show the app's own back chevron in Telegram on Android, where the
  native BackButton does not render — a reliable tap-back. [keep]
- Diagnostic overlay moved app-wide (pointer-events:none) and now reports
  BackButton state (req/present/visible) + viewport geometry, to see whether the
  native BackButton can capture the Android system swipe-back.
developer added 1 commit 2026-06-23 12:09:41 +00:00
test(ui): TEMP-skip the iOS fullscreen unit test (requestFullscreen is a no-op for the owner test; restore with the iOS path)
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 1m30s
93c57b3558
developer added 1 commit 2026-06-23 12:37:45 +00:00
fix(ui): own back chevron in Telegram on all platforms; drop the native BackButton
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 55s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m30s
53d6883ffd
The Telegram native BackButton does not render in the windowed Mini App (the
owner's emulator + a fresh beta TG report backVisible=false on both iOS and
Android), so relying on it lost back navigation — iOS had no back affordance at
all. Show the app's own back chevron whenever there is a back target, on every
platform (Header showBack = !!back), and drop the now-dead native BackButton
effect (App.svelte). The native close control stays — a windowed Mini App
cannot hide it (no Telegram API).

WIP: the temp lobby diagnostic overlay and the requestFullscreen no-op remain
for the owner's emulator test; finalize after confirmation.
developer added 1 commit 2026-06-23 13:05:14 +00:00
feat(ui): drop Telegram fullscreen; own back chevron everywhere; hidden debug panel
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 2m13s
37070c3cb7
Finalises the Telegram Mini App navigation work after on-device testing (Pixel
10 / Android 17 + iOS, fresh beta clients):

- Remove requestFullscreen entirely. Immersive fullscreen hid Telegram's native
  header (and its BackButton) and the Android system swipe-back minimised the
  app; the owner prefers the windowed full-size (expand) presentation, so the
  app never requests fullscreen on any platform now.
- The app's own back chevron (Header, showBack = !!back) drives back-navigation
  on every platform; the native Telegram BackButton is dropped — it does not
  render in the windowed Mini App (backVisible=false on iOS and Android), so
  relying on it lost back navigation (notably none on iOS).
- Replace the temporary always-on diagnostic overlay with a hidden debug panel
  (components/DebugPanel): ten quick taps on the header title open it; it shows a
  privacy-safe client diagnostic snapshot (app version, locale, online, userId,
  Telegram chrome / viewport / SDK state — no secrets, no IP) and shares it via
  the OS share sheet / clipboard; a tap anywhere except Share dismisses it.
- Drop the now-dead telegramRequestFullscreen / telegramBackButton /
  isTelegramAndroid helpers and the iOS-fullscreen unit test.

Telegram has no native non-modal notification API (only modal showPopup /
showAlert), so in-app toasts stay ours. Docs: UI_DESIGN.md.
owner approved these changes 2026-06-23 13:13:27 +00:00
developer merged commit e6277dcd43 into development 2026-06-23 13:14:05 +00:00
developer deleted branch feature/telegram-android-nav-fixes 2026-06-23 13:14:05 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#128