Skip to content

feat: auto-detect OS in download banner#91

Closed
SebastienMelki wants to merge 1 commit into
koala73:mainfrom
SebastienMelki:feature/auto-detect-os-download
Closed

feat: auto-detect OS in download banner#91
SebastienMelki wants to merge 1 commit into
koala73:mainfrom
SebastienMelki:feature/auto-detect-os-download

Conversation

@SebastienMelki

@SebastienMelki SebastienMelki commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Detects user's OS via navigator.userAgent and shows only the relevant download button (Windows, macOS Apple Silicon, or macOS Intel)
  • Uses WebGL renderer info to distinguish Apple Silicon from Intel Macs where possible
  • Adds a "Show all platforms" toggle so users can still access other platform downloads
  • Falls back to showing all 3 buttons if OS can't be detected

Test plan

  • Open the web app on a Mac — should see only the macOS (Apple Silicon) button
  • Open on Windows — should see only the Windows button
  • Click "Show all platforms" — all 3 buttons should appear
  • Click "Show less" — should collapse back to the detected platform
  • Spoof an unrecognized user agent — all 3 buttons should show (no toggle)
image image

Closes #90

🤖 Generated with Claude Code

@vercel

vercel Bot commented Feb 17, 2026

Copy link
Copy Markdown

@SebastienMelki is attempting to deploy a commit to the eliehabib projects Team on Vercel.

A member of the Team first needs to authorize it.

@SebastienMelki SebastienMelki added enhancement New feature or request UX/UI User interface and experience platform: web Web/browser-specific labels Feb 17, 2026
@SebastienMelki

Copy link
Copy Markdown
Collaborator Author

Closing to reopen from the main repo (branch moved from fork to origin).

@koala73

koala73 commented Feb 17, 2026

Copy link
Copy Markdown
Owner

can you fix the conflict here too @SebastienMelki

@SebastienMelki

SebastienMelki commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator Author

@koala73 yes fixed, it was because of the fact that I moved from my fork to the main repo after being added as a collaborator, fixed the conflict in the other one, and re-opening this one properly -> here #93

@koala73

koala73 commented Feb 17, 2026

Copy link
Copy Markdown
Owner

@SebastienMelki

Incorrect macOS architecture fallback in DownloadBanner.ts (PR head lines 31-49).
detectPlatform() never returns macos-x64; for any Mac where WebGL detection is unavailable/inconclusive, it defaults to macos-arm64.
This contradicts the PR goal (“show relevant platform”) and can drive Intel Mac users to the wrong binary by default.
Suggested fix: only return macos-arm64 when confidently detected; otherwise return unknown (or explicit macos-x64 when confidently detected) so users see both Mac options.

@koala73

koala73 commented Feb 17, 2026

Copy link
Copy Markdown
Owner

@SebastienMelki

Mobile gating regression in DownloadBanner.ts (PR head lines 7-10).
The previous isMobileDevice() guard was removed, and App.ts (line 3185) still calls maybeShowDownloadBanner() unconditionally.
Result: mobile/tablet users will now get a desktop download promo banner (often with irrelevant platform buttons).
Suggested fix: restore mobile exclusion (or an equivalent responsive gate).

@koala73

koala73 commented Feb 17, 2026 via email

Copy link
Copy Markdown
Owner

koala73 added a commit that referenced this pull request Feb 17, 2026
## Summary
- Detects user's OS via `navigator.userAgent` and shows only the
relevant download button (Windows, macOS Apple Silicon, or macOS Intel)
- Uses WebGL renderer info to distinguish Apple Silicon from Intel Macs
where possible
- Adds a "Show all platforms" toggle so users can still access other
platform downloads
- Falls back to showing all 3 buttons if OS can't be detected

## Test plan
- [x] Open the web app on a Mac — should see only the macOS (Apple
Silicon) button
- [x] Open on Windows — should see only the Windows button
- [x] Click "Show all platforms" — all 3 buttons should appear
- [x] Click "Show less" — should collapse back to the detected platform
- [x] Spoof an unrecognized user agent — all 3 buttons should show (no
toggle)

Replaces #91
Closes #90

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@SebastienMelki SebastienMelki added the claude Generated with Claude Code label Feb 19, 2026
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
## Summary
- Detects user's OS via `navigator.userAgent` and shows only the
relevant download button (Windows, macOS Apple Silicon, or macOS Intel)
- Uses WebGL renderer info to distinguish Apple Silicon from Intel Macs
where possible
- Adds a "Show all platforms" toggle so users can still access other
platform downloads
- Falls back to showing all 3 buttons if OS can't be detected

## Test plan
- [x] Open the web app on a Mac — should see only the macOS (Apple
Silicon) button
- [x] Open on Windows — should see only the Windows button
- [x] Click "Show all platforms" — all 3 buttons should appear
- [x] Click "Show less" — should collapse back to the detected platform
- [x] Spoof an unrecognized user agent — all 3 buttons should show (no
toggle)

Replaces koala73#91
Closes koala73#90

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Generated with Claude Code enhancement New feature or request platform: web Web/browser-specific UX/UI User interface and experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-detect OS on download page instead of showing all platforms

2 participants