Include the game link in native card shares on phones - #16
Merged
Merged
Conversation
On Android, share targets that receive a file only reliably read the text member of navigator.share; the separate url member gets dropped, so the victory card arrived with no link. The url is now folded into the text while still being passed separately for platforms that honor it. The native-share e2e test asserts the link reaches the shared text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rs2vdovnTd4RjchV1b5dnF
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.
What
On Android, share targets that receive a file only reliably read the
textmember ofnavigator.share; the separateurlmember gets dropped (platform behavior, w3c/web-share). So the victory card arrived in the picked app with no game link. The fix folds the URL into the shared text insideshareCardImage, still passingurlfor platforms that honor it, which covers both the save/share card button and the platform chips.Note on the chip behavior itself: opening the OS share sheet (instead of the platform app directly) on phones is intentional; the sheet is the only way to attach the card image, and the Web Share API cannot preselect a target app.
Validation
game.spec.jsgreen, including the native-share test which now asserts the shared text contains the link.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rs2vdovnTd4RjchV1b5dnF
Generated by Claude Code