Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/marketing/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ const mobileEndorsementRows = [
function detectPlatform(): Platform | null {
const ua = navigator.userAgent;
if (/Win/i.test(ua)) return { os: "win", label: "Download for Windows" };
if (/Linux/i.test(ua)) return { os: "linux", label: "Download for Linux" };
if (/Mac/i.test(ua)) {
return { os: "mac", label: "Download for macOS", arch: "arm64" };
}
if (/Linux/i.test(ua)) return { os: "linux", label: "Download for Linux" };
return null;
}

Expand Down Expand Up @@ -548,7 +548,6 @@ const mobileEndorsementRows = [
:global([data-platform="mac"]) .dl-icon--apple { display: block; }
:global([data-platform="win"]) .dl-icon--windows { display: block; }
:global([data-platform="linux"]) .dl-icon--linux { display: block; }
Comment on lines 548 to 550
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium pages/index.astro:548

The removed CSS fallback :global(:not([data-platform])) .dl-icon--apple { display: block; } causes the download buttons to show the hardcoded macOS label text with no icon during page load (before JS runs) or permanently for unrecognized user agents. The icon only appears after detectPlatform() executes and sets data-platform, creating a flash of unstyled content for all users.

  :global([data-platform="mac"]) .dl-icon--apple { display: block; }
   :global([data-platform="win"]) .dl-icon--windows { display: block; }
   :global([data-platform="linux"]) .dl-icon--linux { display: block; }
+  :global(:not([data-platform])) .dl-icon--apple { display: block; }
🤖 Copy this AI Prompt to have your agent fix this:
In file apps/marketing/src/pages/index.astro around lines 548-550:

The removed CSS fallback `:global(:not([data-platform])) .dl-icon--apple { display: block; }` causes the download buttons to show the hardcoded macOS label text with no icon during page load (before JS runs) or permanently for unrecognized user agents. The icon only appears after `detectPlatform()` executes and sets `data-platform`, creating a flash of unstyled content for all users.

:global(:not([data-platform])) .dl-icon--apple { display: block; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed CSS fallback leaves default state without icon

Medium Severity

The :global(:not([data-platform])) .dl-icon--apple { display: block; } CSS rule was removed, but it served as the fallback that displayed the Apple icon when no data-platform attribute was set. Since the static HTML still defaults to "Download for macOS" text and all .dl-icon elements start with display: none, the download buttons now show the macOS label with no accompanying icon during initial page load (before JS runs) and permanently when detectPlatform() returns null. The PR description states "No layout, color, or animation changes," but this removal is an unintended styling regression.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7a1b209. Configure here.


/* Floating harness marks */
.hero-float {
Expand Down
Loading