fix(ui): copy GCG to clipboard on Android in-app WebViews #151

Merged
developer merged 1 commits from feature/gcg-export-android-fix into development 2026-07-01 11:24:00 +00:00
Owner

Follow-up to the #150 diagnostic. Your on-device readings confirmed the root cause: both Android Telegram and VK expose no navigator.share AND no navigator.canShare, so the export fell through to a Blob <a download> that those WebViews silently ignore.

pickGcgDelivery is now a 3-way decision:

  • Web Share where available (iOS Telegram / mobile browsers),
  • clipboard copy in an Android in-app WebView (Telegram/VK — no share, dead download),
  • Blob download on a plain desktop browser.

The copy is VKWebAppCopyText inside VK (also covers the desktop VK iframe, where navigator.clipboard is blocked) and navigator.clipboard otherwise — the same clipboard path the #150 diagnostic's Share button already used successfully on your devices. A GCG copied toast confirms it.

Unit tests cover the 3-way choice + copy/failed outcomes; i18n game.gcgCopied (en+ru); docs updated. Verified: check (0/0), unit (357), build, e2e (160).

Follow-up to the #150 diagnostic. Your on-device readings confirmed the root cause: **both Android Telegram and VK expose no `navigator.share` AND no `navigator.canShare`**, so the export fell through to a Blob `<a download>` that those WebViews silently ignore. `pickGcgDelivery` is now a **3-way** decision: - **Web Share** where available (iOS Telegram / mobile browsers), - **clipboard copy** in an Android in-app WebView (Telegram/VK — no share, dead download), - **Blob download** on a plain desktop browser. The copy is `VKWebAppCopyText` inside VK (also covers the desktop VK iframe, where `navigator.clipboard` is blocked) and `navigator.clipboard` otherwise — the same clipboard path the #150 diagnostic's Share button already used successfully on your devices. A `GCG copied` toast confirms it. Unit tests cover the 3-way choice + copy/failed outcomes; i18n `game.gcgCopied` (en+ru); docs updated. Verified: check (0/0), unit (357), build, e2e (160).
developer added 1 commit 2026-07-01 11:17:14 +00:00
fix(ui): copy GCG to clipboard on Android in-app WebViews
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 57s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m16s
88b6761e28
On-device diagnostics from Android Telegram and VK confirmed both expose
no navigator.share AND no navigator.canShare, so the export fell to a Blob
<a download> that those WebViews silently ignore — nothing happened.

pickGcgDelivery is now a 3-way decision: Web Share where available (iOS),
a clipboard copy in an Android in-app WebView (Telegram/VK: no share, dead
download), else a desktop Blob download. shareOrDownloadGcg reports the
outcome so the game shows a "GCG copied" toast; the copy is VKWebAppCopyText
inside VK (which also covers the desktop VK iframe, where navigator.clipboard
is blocked) and navigator.clipboard otherwise.

Unit tests cover the 3-way choice and the copy/failed outcomes; new i18n key
game.gcgCopied (en+ru); docs ARCHITECTURE/FUNCTIONAL(+ru)/UI_DESIGN/TESTING.
owner approved these changes 2026-07-01 11:21:06 +00:00
developer merged commit 4458f0e545 into development 2026-07-01 11:24:00 +00:00
developer deleted branch feature/gcg-export-android-fix 2026-07-01 11:24:00 +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#151