feat(vk): native share/copy, auto theme, friend-code deep link, home-bar safe area #142

Merged
developer merged 4 commits from feature/vk-bridge-integration into development 2026-06-29 21:04:53 +00:00
Owner

Group B of the VK integration — the deferred polish from the launch+auth MVP (#140), found while testing on the contour.

Fixes (VK Mini App)

  • #7 share/copy in the iframe: route through VK Bridge — VKWebAppShare for the invite and VKWebAppCopyText for copy — since navigator.share is absent in the desktop VK iframe and navigator.clipboard is blocked there.
  • #6 invite link: build a VK Mini App direct link vk.com/app<id>#f<code> on VK (was always the Telegram link). The app id comes from vk_app_id in the launch params — no VITE_VK_APP_ID build arg / CI config needed. The recipient routes the deep link from VK's hash launch query parameter (VK forwards everything after #; location.hash collides with our hash router, so we read the query param).
  • #5 auto theme: the app's auto theme follows the VK client light/dark (VKWebAppUpdateConfig); the VK mobile webview's prefers-color-scheme does not track it. Explicit light/dark prefs are respected.
  • #8 home bar: the --tg-safe-* CSS vars default to env(safe-area-inset-*) (the meta already has viewport-fit=cover), so the VK mobile layout clears the home bar (Capacitor/PWA benefit too). Telegram still overrides them from its SDK; a plain browser tab reports 0 (no change).

Verify

Local: svelte-check 0, unit 347 (+ vkAppId/vkStartParam/vkShareLink), build, bundle-gate 96.2/100. Docs: .claude/vk-games-integration.md, FUNCTIONAL (+_ru).

Needs your live VK check (not reproducible headless, like the iOS gestures): the actual VK share/copy dialogs (mobile + desktop iframe), the auto light/dark following the VK client, the friend-code link opening + redeeming, and the home bar on VK Android.

Deferred

Payments (VK Pay/votes), native (Capacitor) VK, vk-identity account-linking, VK push.

Group B of the VK integration — the deferred polish from the launch+auth MVP (#140), found while testing on the contour. ## Fixes (VK Mini App) - **#7 share/copy in the iframe**: route through VK Bridge — `VKWebAppShare` for the invite and `VKWebAppCopyText` for copy — since `navigator.share` is absent in the desktop VK iframe and `navigator.clipboard` is blocked there. - **#6 invite link**: build a VK Mini App direct link `vk.com/app<id>#f<code>` on VK (was always the Telegram link). The app id comes from `vk_app_id` in the launch params — **no `VITE_VK_APP_ID` build arg / CI config needed**. The recipient routes the deep link from VK's `hash` launch query parameter (VK forwards everything after `#`; `location.hash` collides with our hash router, so we read the query param). - **#5 auto theme**: the app's `auto` theme follows the VK client light/dark (`VKWebAppUpdateConfig`); the VK mobile webview's `prefers-color-scheme` does not track it. Explicit light/dark prefs are respected. - **#8 home bar**: the `--tg-safe-*` CSS vars default to `env(safe-area-inset-*)` (the meta already has `viewport-fit=cover`), so the VK mobile layout clears the home bar (Capacitor/PWA benefit too). Telegram still overrides them from its SDK; a plain browser tab reports 0 (no change). ## Verify Local: svelte-check 0, unit 347 (+ `vkAppId`/`vkStartParam`/`vkShareLink`), build, bundle-gate 96.2/100. Docs: `.claude/vk-games-integration.md`, FUNCTIONAL (+\_ru). **Needs your live VK check** (not reproducible headless, like the iOS gestures): the actual VK share/copy dialogs (mobile + desktop iframe), the auto light/dark following the VK client, the friend-code link opening + redeeming, and the home bar on VK Android. ## Deferred Payments (VK Pay/votes), native (Capacitor) VK, vk-identity account-linking, VK push.
developer added 1 commit 2026-06-29 19:27:58 +00:00
feat(vk): native share/copy, auto theme, friend-code deep link, home-bar safe area
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 1m25s
da17c18895
Group B of the VK integration — the contour-verified follow-up to the launch+auth MVP:

- Share/copy inside the VK iframe go through VK Bridge: the friend-code invite shares via
  VKWebAppShare and copies via VKWebAppCopyText, since navigator.share is absent in the desktop
  iframe and navigator.clipboard is blocked there.
- The invite link is a VK Mini App direct link (vk.com/app<id>#f<code>) on VK instead of the
  Telegram link; the app id comes from vk_app_id in the launch params (no build arg needed). The
  recipient's launch routes the deep link from VK's `hash` launch query parameter.
- The app's "auto" theme follows the VK client's light/dark appearance (VKWebAppUpdateConfig),
  which the VK mobile webview's prefers-color-scheme does not track.
- The safe-area CSS vars default to env(safe-area-inset-*), so the VK mobile layout clears the
  home bar (and Capacitor/PWA too); Telegram still overrides them from its SDK.

vk.ts adds vkAppId/vkStartParam/vkShare/vkCopyText/vkOnScheme. Verified: svelte-check, 347 unit
(+ vkAppId/vkStartParam/vkShareLink), build, bundle-gate. The VK-Bridge behaviours need the live
contour (not reproducible headless).
developer added 1 commit 2026-06-29 20:15:44 +00:00
fix(vk): friend-code link as ?hash, Android safe-area via bridge insets, landscape home-bar colour
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 1m22s
6a5ce12fab
Contour review of the VK Bridge group:

- #6 invite link: VK's documented '#' direct-link payload is eaten by the vk.com SPA before it
  reaches the app, so the friend-code link now carries the payload as a query param
  (vk.com/app<id>?hash=f<code>); the recipient already reads the `hash` query param (vkStartParam).
  (Whether VK forwards the '?' through to the iframe is being confirmed on the contour.)
- #8 Android: the VK mobile webview does not surface the home-bar inset via CSS env() (config
  insets are iOS-only), so subscribe to the bridge insets (VKWebAppUpdateConfig + VKWebAppUpdateInsets)
  and set --tg-safe-* to max(env(), the VK value).
- #8 landscape colour: the home-indicator strip was the (grey) page background because the two-pane
  landscape game has no bottom bar. The left-panel controls bar now paints its own chrome into the
  inset (Screen gains a selfInset flag that drops the shell's detached padding strip), and the
  game-land runs flush to the edge.

Verified: svelte-check, 347 unit, build, bundle-gate; the landscape safe-area painting reproduced in
the mock (controls bar + board reach the edge, strip takes the bar colour). The VK-Bridge / VK launch
behaviours (Android insets, the ?hash forward) need the live contour.
developer added 1 commit 2026-06-29 20:41:09 +00:00
chore(vk): temporary deep-link diagnostic (remove after contour catch)
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 1m26s
0ea9764a0d
developer added 1 commit 2026-06-29 20:58:45 +00:00
fix(vk): friend-code link is the plain vk.com/app link (VK strips iframe query payload)
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 1m33s
d76f1f4026
The contour diagnostic confirmed VK forwards only the signed vk_* params to the iframe — a
custom payload on the app link is dropped (the '#' eaten by the vk.com SPA, a '?' query
stripped), so the friend-code cannot ride the link. The VK share link is now just
vk.com/app<id>; the recipient enters the copied code by hand (VKWebAppCopyText works). The
vkStartParam reader + bootVK routing stay as a no-op, ready for a post-moderation channel.
Removes the temporary deep-link diagnostic.
owner approved these changes 2026-06-29 21:04:29 +00:00
developer merged commit e900d592f8 into development 2026-06-29 21:04:53 +00:00
developer deleted branch feature/vk-bridge-integration 2026-06-29 21:04:53 +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#142