fix(web): send mobile invitees to the app stores, not GitHub releases - #3464
Open
TheSeydiCharyyev wants to merge 1 commit into
Open
fix(web): send mobile invitees to the app stores, not GitHub releases#3464TheSeydiCharyyev wants to merge 1 commit into
TheSeydiCharyyev wants to merge 1 commit into
Conversation
An invite opened on a phone offered github.com/block/buzz/releases - a list of desktop binaries. normalizeOperatingSystem folded every non-desktop user agent into `unknown`, assetPattern has no pattern for `unknown`, so the resolver fell back to the releases page. That fallback was the right answer while there was no mobile app. Both listings are live now, so iOS and Android become classified platforms and resolve straight to their store URL, ahead of the GitHub release lookup. ChromeOS and Fire tablets keep the releases fallback on purpose: neither is served by the Play Store listing. Desktop detection is untouched - macOS, Windows and Linux still resolve a release asset exactly as before. The existing non-desktop e2e case pinned the old fallback for all four devices. It now asserts the expected destination per device and covers a Fire tablet as well. Refs block#3357. This is the store-links half of that issue; the blank mobile render it also reports is not addressed here. Signed-off-by: Seydi Charyyev <seydi.charyev@gmail.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.
Summary
An invite link opened on a phone offers
github.com/block/buzz/releases— a list of desktop binaries.normalizeOperatingSystemfolds every non-desktop user agent intounknown,assetPatternhas no pattern forunknown, andresolveBuzzDownloadUrlForPlatformtherefore falls back to the releases page.That fallback was the right answer while there was no mobile app to point at. Both listings are live now, so this classifies iOS and Android as real platforms and resolves them straight to their store URL, ahead of the GitHub release lookup:
https://apps.apple.com/us/app/buzz-chat-with-your-hive/id6779728271https://play.google.com/store/apps/details?id=xyz.block.buzz.mobileVerified both listings resolve, and that the Play Store id matches
namespace = "xyz.block.buzz.mobile"inmobile/android/app/build.gradle.kts.iPadOS in desktop mode (
MacIntel+maxTouchPoints > 1) is classified as iOS rather than being discarded — the App Store listing reports iPad support. ChromeOS and Fire tablets (kindle/silk) keep the releases fallback on purpose: neither is served by the Play Store listing. Desktop detection is untouched, so macOS, Windows and Linux still resolve a release asset exactly as before, including the "which Mac do you have?" flow.This is the store-links half of #3357 only. That issue also reports a blank render of the invite page on iOS Safari against a self-hosted relay. I could not reproduce that and it is not addressed here — the invite page renders the download link unconditionally, so the two symptoms do not share a cause.
Related issue
Refs #3357 (partial — see the scope note above). No open PR touches
web/src/shared/lib/buzz-download.tsorweb/tests/e2e/smoke.spec.ts; #2255 is the closest, adding a "Browse releases" link to the same invite page.Testing
webpackage, node 22.17.1, pnpm 11.4.0.The existing e2e case
invite download falls back for mobile and non-desktop devicespinned the releases-page fallback for iPhone, iPadOS desktop mode, Android and ChromeOS. It now carries an expected destination per device, covers a Fire tablet too, and is renamed toinvite download sends each non-desktop device where its app lives.Reverting only the
buzz-download.tschange fails it exactly as reported in the issue:With the change, all six smoke tests pass, including the desktop download assertion and the Mac-choice dialog.
pnpm checkandpnpm typecheckare clean.Platform classification was also exercised directly against real user-agent strings — iPhone Safari, iPadOS desktop mode, Android Chrome (with UA client hints) and Android Firefox (without) all classify as
ios/android, while macOS, Windows, Linux, ChromeOS and Fire tablet keep their previous classification.