Android visitors are offered the Linux .deb on cap.so's homepage and download page

Offen Anfängerfreundlich
#3,677 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@patrickballard arbeitet bereits daran.

Seit 03.11.2026.

  • #3678 von @patrickballard — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
nextjs, react, typescript
Bereich
frontend

Rechercherichtung

Beginne in apps/web/hooks/useDetectPlatform.ts, wo jeder User Agent, der "Linux" enthält, als Desktop-Linux eingestuft wird. Prüfe danach den Button auf der Startseite und die Download-Seite, die beide das Ergebnis dieses Hooks lesen und auf /download/linux-deb verlinken. Fertig ist es, wenn ein Android-User-Agent wie das Pixel-8-Beispiel nicht mehr als Linux erkannt wird, während iPhone und nicht erkannte User Agents die bisherigen Standardwerte beibehalten. Überprüfe dies, indem du den User Agent in den Chrome-DevTools auf Android setzt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

useDetectPlatform (apps/web/hooks/useDetectPlatform.ts) treats any user agent containing "Linux" as desktop Linux. Android browsers include "Linux" in theirs (Mozilla/5.0 (Linux; Android 14; Pixel 8) ...), so on an Android phone or tablet:

  • the homepage's main button reads "Download free for Linux" and links to /download/linux-deb;
  • the download page's main button has the Linux logo, links to /download/linux-deb, and is captioned "Linux x86_64 • .deb, AppImage, RPM and Arch available".

Tapping either downloads the desktop Linux package to the phone. iPhones and other unrecognised devices get the site's default instead: the macOS app on the homepage, and a generic "Download Cap" on the download page.

Reproduction
  1. Open cap.so in Chrome on an Android phone, or in desktop Chrome with device emulation set to an Android device such as a Pixel 8.
  2. The homepage's main button reads "Download free for Linux".
  3. On cap.so/download, the main button has the Linux logo and links to /download/linux-deb.
cap.so homepage in Chrome's Android emulation (Pixel 8): the main button reads Download free for Linux
Expected

Android isn't treated as desktop Linux, so it isn't offered the Linux package.

Vorherrschende Sprache
Rust
Sterne
24.2k
Forks
2.2k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
731

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CapSoftware/Cap

Alle Issues in CapSoftware/Cap

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.