fix(file-transfer): reconnect signaling + branded OG/app icons - #66
Merged
Conversation
…ing' Root cause: on mobile, the sender opens the tool, gets the link, then switches apps to share it — backgrounding the browser closes the sender's signaling WebSocket. When the receiver later opens the link it's alone in the room → becomes host → 'Waiting for the other device to join…' forever, because there was no reconnect. Fix: - Reconnect the signaling socket on close/error and on tab foreground (visibilitychange), until the P2P data channel is established. Robust to either peer being first (WebRTC role already decoupled from send/receive). - Once the P2P channel is open, ignore signaling peer-left/close (transfer is independent of signaling by then); a real P2P drop after connect is terminal. - Keepalive: client pings every 25s; the Durable Object auto-responds 'pong' (setWebSocketAutoResponse) without waking or relaying it — prevents idle proxy timeouts. Manual (serverless) mode unaffected (no reconnect needed). DO relay + ping/pong auto-response re-verified via local wrangler dev. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
goodwebtools | b9af331 | Aug 01 2026, 04:15 AM |
Share previews (WhatsApp/Twitter/etc.) showed a blank/black box because the default og:image was /icon-512.png — a 512x512 square that is essentially solid black — while the card type is summary_large_image (expects ~1200x630). Add a proper branded 1200x630 OG image (public/og.png, generated by scripts/make-og-image.mjs via sharp — brutalist cream + violet GWT badge + wordmark + tagline), set it as the default in Base.astro, and add og:image:width/height/alt. Fixes previews site-wide, not just file transfer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
icon-192.png / icon-512.png were near-black squares — so the installed PWA icon and any og:image fallback were blank. Regenerate them with the GWT brand (full-bleed violet, white 'GWT' kept inside the maskable safe zone since the manifest marks them purpose 'any maskable'), add a dedicated 180x180 apple-touch-icon.png, and point <link rel=apple-touch-icon> at it. Generated by scripts/make-icons.mjs via sharp. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes from testing the file-transfer link share:
1. Peer stuck on 'Waiting for the other device to join…'
On mobile the sender gets the link, switches apps to share it → backgrounding closes the sender's signaling WebSocket → the receiver opens the link alone → becomes host → waits forever (no reconnect).
setWebSocketAutoResponse('ping','pong')— not relayed. Re-verified DO relay + ping via local wrangler dev.2. Blank/black share preview
Default
og:imagewas/icon-512.png— a 512×512 essentially-black square — with asummary_large_imagecard. Replaced with a proper branded 1200×630public/og.png(generated via sharp) +og:image:width/height/alt. Fixes previews site-wide.539 tests · lint clean · build green.
🤖 Generated with Claude Code