Skip to content

feat(website): name the installer on the download button - #19505

Merged
benceruleanlu merged 3 commits into
bl/download-installer-linksfrom
bl/download-button-installer-name
Oct 1, 2026
Merged

benceruleanlu merged 3 commits into
bl/download-installer-linksfrom
bl/download-button-installer-name

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Download buttons name the exact installer they open, with matching accessible names and aligned desktop hero buttons.

Changes

  • Show the installer beneath the primary download label for recommended Windows, macOS and Linux downloads and the Windows/macOS fallback.
  • Keep installer subtitles in normal weight and align the taller download buttons with Install from GitHub.
  • Cover accessible names, URLs, fallback alignment and multiline/icon-only label heights; isolate installer click tests and tolerate fractional layout differences within half a pixel.

Review Focus

Stacked on #19364. Verify the primary and fallback button labels and their alignment on /download/.

Before the final restack, validation passed 14 component tests and 24 focused browser tests against a fresh website build. After removing the checkout prerequisite and integrating both installer fixes, the final stack passes 36 focused installer/composable unit tests. CI has not been checked after this final restack. Controlled layout checks reject descender-space and icon-only excess height while accepting quarter-pixel differences; overriding the accessible names makes all four platform table cases fail.

Screenshots (if applicable)

Preview

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Oct 1, 2026 7:08am UTC
billing-web-test Ignored Ignored Oct 1, 2026 7:08am UTC

Request Review

@benceruleanlu benceruleanlu changed the title bl/download button installer name feat(website): name the installer on the download button Sep 29, 2026
@DrJKL
DrJKL self-requested a review September 29, 2026 23:58
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2952113a-fa5c-4746-81c7-1a9f5afff74d

📥 Commits

Reviewing files that changed from the base of the PR and between 4f4f4ef and 99b13e3.

📒 Files selected for processing (3)
  • apps/website/e2e/download.spec.ts
  • apps/website/src/components/product/local/DownloadLocalButton.test.ts
  • apps/website/src/components/product/local/DownloadLocalButton.vue

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The local download button now displays installer-specific labels. The hero groups the download and GitHub buttons. Component and browser tests cover installer links, labels, button alignment, and rendered text.

Changes

Website installer downloads

Layer / File(s) Summary
Display installer labels and links
apps/website/src/components/product/local/DownloadLocalButton.vue, apps/website/src/components/product/local/DownloadLocalButton.test.ts, apps/website/src/i18n/translations.ts
The button displays the translated download label and installer-specific label. Windows x64 labels no longer include the Snapdragon parenthetical. Component tests check download labels and URLs across platforms, plus Linux click tracking.
Group and verify hero buttons
apps/website/src/components/product/local/HeroSection.vue, apps/website/e2e/download.spec.ts, apps/website/e2e/button-height.spec.ts, apps/website/e2e/font-preload.spec.ts
The hero wraps the download and GitHub buttons in a nested flex container. Browser tests check button alignment, wait for download links, use exact fallback link names, and measure label text height.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: robinjhuang, deepme987

Merge Risk: ⚪ Minimal · up to 99b13

The change identifies the selected installer and aligns the download and GitHub buttons. No actionable merge-blocking risk is established; merge after normal checks pass.

Architecture Summary

Architecture risk: 🔵 Low · up to 4f4f4

The change affects 1 system.

Changed systems: apps/website

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/website (service) was modified; 10 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/website/e2e/button-height.spec.ts: The test description now refers to text lines rather than a single line. It adds a visibility check for the first matching desktop download link and replaces the label’s computed line-height measurement with a sum of computed line heights for distinct text-fragment positions, ignoring blank text, invalid line heights, and zero-sized fragments.
  • observed — Modified behavior in apps/website/e2e/button-height.spec.ts: Labels now use the measured text height and are skipped when that measurement is zero; previously, the test parsed the label element’s computed line height and skipped non-finite values.
  • observed — Modified behavior in apps/website/e2e/button-height.spec.ts: The per-label approximate height comparison is replaced with an array comparison requiring each label’s rounded height-minus-text-line-height excess to equal zero.
  • observed — Modified behavior in apps/website/e2e/font-preload.spec.ts: For /download, the test waits for the first matching desktop-download link to appear before continuing.
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed PASS. A bug-fix signal appears in the commit subject fix(website): remove Snapdragon from installer label. However, all changed files are under apps/website, which the check explicitly excludes fr…
Website End-To-End Regression Coverage ✅ Passed The PR changes website runtime behavior in DownloadLocalButton.vue and related download components. It also updates apps/website/e2e/download.spec.ts with assertions for installer labels, accessib…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed-file list contains only apps/website/... files. It does not include src/lib/litegraph/, src/ecs/, or files related to graph entities. The check is therefore not applicable.
Title check ✅ Passed The title clearly describes the main change: naming the installer on the download button. It is concise and related to the implementation.
Description check ✅ Passed The description includes the required Summary, Changes, Review Focus, and Screenshots sections. It explains the functionality, testing, alignment behavior, and review scope. No breaking changes or dep…
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 3585660f7a0c662ae30173aadd47b0fe2c177158

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-19505.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-7wgus8yaz-comfyui.vercel.app

Last updated: 2026-10-01T09:50:55Z for 944f35c

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...bsite/src/components/product/local/HeroSection.vue 0.00% 4 Missing ⚠️

❌ Your patch check has failed because the patch coverage (33.33%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

@@                     Coverage Diff                      @@
##           bl/download-installer-links   #19505   +/-   ##
============================================================
  Coverage                        84.53%   84.53%           
============================================================
  Files                             3318     3318           
  Lines                           160231   160231           
  Branches                         41566    41565    -1     
============================================================
  Hits                            135458   135458           
  Misses                           22966    22966           
  Partials                          1807     1807           
Flag Coverage Δ
website-unit 79.78% <33.33%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...c/components/product/local/DownloadLocalButton.vue 100.00% <100.00%> (+5.55%) ⬆️
...bsite/src/components/product/local/HeroSection.vue 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-official

datadog-official Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 944f35c | Docs | View more details | Give us feedback!

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 30, 2026
DrJKL
DrJKL previously requested changes Sep 30, 2026

@DrJKL DrJKL left a comment

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.

Verdict: request changes. The new second line breaks two website e2e specs that pass on the base branch, and one of them is a real font regression on /download.

CI: Website E2E failed at 1856af4 with two non-screenshot failures. Every website-e2e shard passed at the base 3030ad2.

Pre-merge blockers:

  1. P1 e2e/font-preload.spec.ts fails on /download with PP Formula 500 → /fonts/PPFormula-Medium.woff2. The installer line's font-medium pulls in a face that BaseLayout.astro does not preload, so under font-display: optional it renders in the fallback font on slow loads. Inline on DownloadLocalButton.vue:53.
  2. P1 e2e/button-height.spec.ts fails with DOWNLOAD DESKTOP Windows x64, Expected: 20, Received: 36. Either the spec or the markup has to change. Inline on DownloadLocalButton.vue:51.

The rest are P2 and P3 inline comments on the tests and the composable's return shape.

Findings without an anchorable line
  • P3 PR description. "The download button showed only an OS logo" overstates the old state. The base button already rendered {{ label }} ("DOWNLOAD DESKTOP") beside the logo (base DownloadLocalButton.vue:78). What it lacked was the installer name. Something like "The download button named the platform only through its OS logo" would be accurate.
  • P3 PR description. apps/website/AGENTS.md asks for before and after screenshots on every visitor-visible change. The Screenshots section has a preview link and a prose description, and the preview cannot show the before state. One screenshot of each would also make the 52px to 68px height change easy to judge.
Existing findings confirmed or contested

None. The PR had no reviews or inline comments when I reviewed it. The bot issue comments carry no findings, and Fallow reported nothing new.

Checked and cleared
  • Analytics still records the platform, not the installer. captureDownloadClick gets installers[key].platform, so the fallback buttons still send windows and mac as the old btn.key did. I ran a scratch component test that clicked both fallback buttons.
  • data-astro-prefetch="false" now also applies to Windows ARM, since the check reads .platform. On the base branch the recognized-platform path also used key: platform.value, which was windows for ARM, so nothing changed.
  • No consumer reads the removed downloadUrl return. rg over apps/website/src finds useDownloadUrl only in DownloadLocalButton, InstallerMenu, and MobileDownloadEmailForm. The dropped externalLinks.github fallback was unreachable, because the old template rendered it only when platform was set.
  • All five installer label keys have en and zh-CN entries, and a zh-CN render of the fallback gave spaced accessible names.
  • The layout claim holds from the classes. The inner lg:flex-row keeps the default align-items: stretch, so the GitHub button matches the download button's height. The outer lg:items-end still bottom-aligns that row with MobileDownloadEmailForm. EcoSystemSection also stretches its sibling, and class passthrough reaches both fallback links.
  • The whitespace claim holds. Compiling the template shows sibling spans produce no text node between them, while the text-plus-nested-span form keeps the space. Swapping in sibling spans makes all three DownloadLocalButton.test.ts rows fail with DOWNLOAD DESKTOPWindows x64, so the test does pin the spaced name.
  • The line counts in the change breakdown match git diff --numstat (product +48/-69, tests +79/-5).
  • navigator stubs cannot leak between rows because apps/website/vitest.config.ts sets unstubGlobals: true.
  • The diff adds no any, assertions, suppressions, dark:, !important, array classes, or untranslated template text.
Coverage

Depth standard. I ran five lanes: correctness, maintainability, idiomaticity, tests (including the Playwright spec procedure), and documentation, each over its own set of the six changed files and the consumers outside the diff (InstallerMenu, EcoSystemSection, BrandButton, posthog.ts, both download pages). At this head I ran vitest run on DownloadLocalButton.test.ts and useDownloadUrl.test.ts (26 passed), eslint and oxfmt --check on the changed files (clean), and pnpm typecheck:website (0 errors). I also ran three mutation experiments on the unit tests and playwright test --list e2e/download.spec.ts (45 tests found). I did not run Playwright locally. The two blockers come from the CI job logs for shards 1 and 2 of the run linked above.

/>
<span class="text-left">
{{ t('download.hero.downloadLocal', locale) }}
<span class="block text-xs font-medium tracking-normal">

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.

P1: font-medium renders PP Formula Medium (500) above the fold on /download, and nothing preloads that face. BaseLayout.astro preloads Regular, Light, Bold, Semibold, and NarrowSemibold, and download.astro passes no preloadFonts. Under font-display: optional, this line falls back to the system font on any slow load. e2e/font-preload.spec.ts catches it: shard 2 of the Website E2E run fails with "PP Formula 500 → /fonts/PPFormula-Medium.woff2", and the same spec passes on the base branch.

There are two fixes. Use a weight that is already preloaded (font-normal or font-semibold), or pass preloadFonts={['Medium']} from both src/pages/download.astro and src/pages/zh-CN/download.astro, as routes/models/index.astro does. The first adds no extra font request.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 167a761: the subtitle uses font-normal, whose Regular face is already preloaded. The font test now waits for the hydrated download button before measuring; all six font-preload cases pass.

alt=""
class="inline-block size-5"
/>
<span class="text-left">

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.

P1: This two-line block makes BrandButton's wrapping <span class="flex items-center"> 36px tall while its computed line height stays 20px (text-sm). e2e/button-height.spec.ts measures exactly that span on every nowrap flex link on /download. Shard 1 of the Website E2E run fails with Error: DOWNLOAD DESKTOP Windows x64 ... Expected: 20, Received: 36, and the spec passes on the base branch.

The spec guards against a label box reserving descender space on a one-line label. A deliberate second line is a different case, so I think the spec needs to learn about it rather than the button dropping the line. For example, it could skip labels that contain a display: block child, or compare the height against the sum of the line boxes. Please update the spec's comment to match whichever way you go.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 167a761: the height check sums the visible text lines and still compares them with the enclosing label box. It waits for the download button first. The check passes with the intended two-line label and fails with +4px excess when the original inline-block spacing regression is restored temporarily.

Comment on lines 25 to 29
const offered = computed<Installer[]>(() => {
if (installer.value) return [installer.value]
if (showFallback.value) return ['windows', 'macArm']
return []
})

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.

P3: offered holds keys, so the template goes back to the table on every binding: installers[key].url, .platform twice, ICONS[installers[key].platform], and .label. If useDownloadUrl returned the selected entry (installers.windowsArm and so on) and this computed held entries ([installers.windows, installers.macArm] for the fallback), the template could read entry.url, entry.platform, and entry.label directly. The Installer key type would then have no consumer. :key could use entry.url.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 167a761: useDownloadUrl returns the selected installer entry, and the button list holds entries directly. URL, platform, and label now come from that entry.

}
} as const satisfies Record<string, DesktopInstaller>

export type Installer = keyof typeof installers

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.

P3 Nit: Installer is keyof typeof installers, but the entry shape a few lines up is called DesktopInstaller. So computed<Installer | null> reads as if it returns an installer, when it returns an index into the table. If the key stays (see the comment on DownloadLocalButton.vue), InstallerKey would say what it holds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The key type is gone in 167a761. The computed value now returns a DesktopInstaller entry or null.

})

return { downloadUrl, platform, showFallback, isMobileUa }
return { installer, platform, showFallback, isMobileUa }

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.

P3: With installer returned, platform has one remaining consumer. InstallerMenu.vue:25 uses it only as v-if="platform || showFallback", and installer is non-null exactly when platform is. Switching that check to installer || showFallback would let this return drop platform and keep a single representation of the detected choice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed platform from the public return in 167a761. InstallerMenu already shares its parent button gate after the dropdown cleanup, so it no longer runs device detection or consumes platform.


import DownloadLocalButton from './DownloadLocalButton.vue'

vi.mock(import('../../../scripts/posthog'))

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.

P2: This mocks posthog but no row clicks a link or checks captureDownloadClick. This PR changed the argument from btn.key to installers[key].platform. I hard-coded captureDownloadClick('windows') in the component and all three rows still passed. One case that clicks a non-Windows link (the Linux row, or the fallback's macOS button) and asserts expect(captureDownloadClick).toHaveBeenCalledExactlyOnceWith('linux') would pin the analytics platform. The table can stay as it is for names and URLs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added a Linux click case in 167a761 that asserts captureDownloadClick is called exactly once with linux. The focused component/composable suite passes all 37 cases.

Comment on lines +29 to +38
{
label: 'Linux',
userAgent: UA.linux,
buttons: [
[
'DOWNLOAD DESKTOP Linux x64 (AppImage)',
'https://download.comfy.org/linux/appimage/x64'
]
]
},

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.

P3: No test here or in useDownloadUrl.test.ts feeds a Mac user agent, so nothing checks that useDownloadUrl.ts:114 picks macArm. The fallback's macOS button is hard-coded, so it does not cover that branch. I changed that line to return 'windows' and all 26 tests in both files still passed. A Mac row in this table (Macintosh UA, maxTouchPoints: 0, expecting DOWNLOAD DESKTOP macOS (Apple Silicon) and the dmg URL) would cover it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added a Macintosh UA row with zero touch points in 167a761. It asserts the macOS installer name and arm64 DMG URL through the rendered button.

{{ t('download.hero.installGithub', locale) }}
</span>
</BrandButton>
<div class="flex flex-col gap-4 lg:flex-row">

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.

P3: This wrapper exists so the GitHub button stretches to the taller download button while the outer lg:items-end keeps the email form bottom-aligned. From the classes it works. But no test would fail if someone removed the wrapper or the outer lg:items-end, because download.spec.ts's desktop hero test checks only visibility and hrefs. A bounding-box check in that test at the desktop viewport would guard it: equal heights for the two links, and matching bottom edges for the row and the form.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added rendered height and bottom-edge equality assertions for the desktop download and GitHub links in 167a761. The current device gate shows the email form only on phones, where the desktop download button is absent; that existing behavior remains covered. All 31 focused desktop/mobile download, font, and height checks pass.

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.

Addressed in 681e95c: the Windows desktop hero test now reads both links' bounding boxes and asserts the GitHub button has the same height and bottom as the download button (download.spec.ts:132-140).

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 30, 2026
@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from 1856af4 to 051a434 Compare September 30, 2026 04:05
@benceruleanlu
benceruleanlu requested a review from a team September 30, 2026 04:05
@benceruleanlu
benceruleanlu removed this pull request from stack #19506 September 30, 2026 07:46
@benceruleanlu
benceruleanlu changed the base branch from bl/download-installer-links to bl/website-defer-credits-checkout September 30, 2026 07:46
@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from 051a434 to 167a761 Compare September 30, 2026 07:51
@benceruleanlu
benceruleanlu requested a review from DrJKL September 30, 2026 07:51
@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from 167a761 to 681e95c Compare September 30, 2026 07:56
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 30, 2026

@DrJKL DrJKL left a comment

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.

Verdict: ready to approve. Both P1s and every other finding from my first review are fixed at 681e95c. Three P3 comments and one question remain, all non-blocking.

I reviewed 167a761 and then its rebase, 681e95c. git range-diff shows the rebase adds only whitespace-normal on the installer subtitle. At 681e95c I rebuilt the site and ran button-height, font-preload, and download.spec.ts on the desktop and mobile projects: 32 passed. The /download overflow guards in visual-responsive.spec.ts also passed (4 of 4). Website E2E in CI was still running when I posted.

Non-blocking items (inline):

  • P3 download.spec.ts:132-140 takes two separate layout snapshots and compares them as exact floats. The same file already has a retrying expect.poll + boundingBox() pattern for this.
  • P3 The equal-height check never runs on the two-button fallback, the layout that wraps at 1024 and 1280px.
  • P3 Nit: label in DownloadLocalButton.vue now has one use.
  • Question: whitespace-normal makes the subtitle wrap to two lines at lg widths below 1440px, so the buttons become 84px tall there. Is that intended?
Findings without an anchorable line
  • P3 The commit message is stale in three places, even though the PR body is now accurate. It says the button "showed only an OS logo", but the base already rendered DOWNLOAD DESKTOP beside the logo. It gives "Windows x64" as an example, but the rendered text is "Windows x64 (including Snapdragon)". It says useDownloadUrl "returns the chosen installer key", but it now returns the installer entry. This only matters if the commit message survives the merge.
Checked and cleared
  • The button-height spec still catches the regression it was written for. With BrandButton.vue's label box set back to inline-block (the markup #19023 fixed), it fails with excess: 4 on both INSTALL FROM GITHUB buttons. The two-line download button reads 0 under that mutation. I think that is correct: its inline-flex child extends further below the baseline than the strut does, so the strut adds no height.
  • I checked a claim that the new line counter treats same-line text in two font sizes as two lines, and so hides extra height. That does not happen. With the subtitle made inline, the count doubles, but the spec fails with excess: -16 because it requires exactly 0.
  • Mutation checks on the unit tests. Hard-coding captureDownloadClick('windows') fails the Linux click test. Returning the Windows entry for macOS fails the macOS row. Removing the whitespace between the label and the subtitle fails 4 rows, and removing the subtitle fails 5 tests.
  • No consumer reads the removed downloadUrl or platform returns. InstallerMenu reads only the static installers table. cn() produces lg:p-4 flex-1 rounded-r-none lg:min-w-0 on the split button, so the wrapper's lg:min-w-60 sets the combined width.
  • Analytics still records the platform, and data-astro-prefetch behaves as on the base branch. The zh-CN and English accessible names both come from the same keys that InstallerMenu uses.
  • The diff adds no any, assertions, suppressions, dark:, !important, array classes, or untranslated text.
Coverage

Depth standard. I ran correctness, maintainability, idiomaticity, tests (with the Playwright spec procedure), and documentation lanes against 167a761, then checked the 681e95c delta myself. At 681e95c: vitest run on DownloadLocalButton.test.ts, InstallerMenu.test.ts, and useDownloadUrl.test.ts (37 passed), eslint and oxfmt on the changed component (clean), an astro build, and the Playwright runs above. At 167a761: pnpm typecheck:website (0 errors) and eslint and oxfmt on all 9 changed files. I measured the layout with a scratch Playwright script at 390, 1024, 1280, and 1440px, using a Windows UA and an unrecognized UA.

Review record

Round 1: review at 1856af4, request changes.

  • P1 Subtitle used font-medium, a face that is not preloaded (font-preload.spec failed). Addressed in 681e95c with font-normal and a hydration wait in the spec. Author reply. The spec passes locally.
  • P1 The two-line label failed button-height.spec (36px against 20px). Addressed in 681e95c: the spec now sums the visible text lines. Author reply. It passes locally and still fails on the #19023 regression.
  • P3 The composable returned a key and the template re-indexed installers. Addressed in 681e95c: it now returns the entry. Author reply.
  • P3 Nit: Installer named a key union. Addressed in 681e95c: the alias is removed. Author reply.
  • P3 platform return was redundant. Addressed in 681e95c: it is removed from the return. Author reply.
  • P2 Click analytics was never asserted. Addressed in 681e95c with a Linux click test. Author reply. Mutation-proven.
  • P3 No Mac case. Addressed in 681e95c with a Macintosh row. Author reply. Mutation-proven.
  • P3 The hero stretch had no falsifier. Addressed in 681e95c with a height and bottom comparison in the Windows hero test. My reply. The follow-ups are the P3 inline comments in this review.
  • P3 The PR description said "only an OS logo". Addressed by the rewritten PR body.
  • P3 No before and after screenshots. Addressed: the PR body now has one before image and two after images.

Round 2 (this review) at 681e95c: three P3 inline comments, one question, and one P3 on the commit message, all non-blocking.

Checks at 681e95c: unit tests 37 passed; eslint and oxfmt clean; website build succeeded; Playwright button-height, font-preload, and download 32 passed on the desktop and mobile projects; /download overflow guards 4 passed. CI Website E2E was running when I posted. Typecheck: 0 errors at 167a761, and 681e95c changes only a class string.

const { downloadUrl, platform, showFallback } = useDownloadUrl()
const { installer, showFallback } = useDownloadUrl()

const label = computed(() => t('download.hero.downloadLocal', locale))

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.

P3 Nit: This PR removed the fallback aria-label, so label is now used only at line 75. It no longer does anything beyond aliasing one t() call. Rendering {{ t('download.hero.downloadLocal', locale) }} inline, as the subtitle already does, would let you drop both this computed and the computed import.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in 937043cb: inlined the translated primary label. The computed import remains because buttons still uses it. I also rewrote the commit message to describe the existing Download Desktop text, the translated installer entry, and the final API accurately.

Comment thread apps/website/e2e/download.spec.ts Outdated
Comment on lines +132 to +140
const downloadBox = await downloadBtn.evaluate((element) => {
const { height, bottom } = element.getBoundingClientRect()
return { height, bottom }
})
const githubBox = await githubBtn.evaluate((element) => {
const { height, bottom } = element.getBoundingClientRect()
return { height, bottom }
})
expect(githubBox).toEqual(downloadBox)

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.

P3: This takes two separate getBoundingClientRect() snapshots and then compares them with an exact, non-retrying toEqual. The two links sit in one stretch row, so at any given moment they match. The risk is a layout change between the two evaluate calls, for example a late font swap. The mobile check at the bottom of this file already polls boundingBox(). Something like this would retry and ignore sub-pixel noise:

await expect
  .poll(async () => {
    const [download, github] = await Promise.all([
      downloadBtn.boundingBox(),
      githubBtn.boundingBox()
    ])
    return (
      !!download &&
      !!github &&
      Math.abs(download.height - github.height) < 0.5 &&
      Math.abs(download.y + download.height - (github.y + github.height)) < 0.5
    )
  })
  .toBe(true)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in 937043cb: both rectangles are now read in one evaluateAll callback, with a retrying assertion and a 0.5px tolerance for height and bottom alignment. The same helper covers the fallback row.


const macBtn = hero.getByRole('link', {
name: /DOWNLOAD DESKTOP — macOS/i
name: 'DOWNLOAD DESKTOP macOS (Apple Silicon)'

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.

P3: The equal-height check runs only in the Windows test. This fallback is a different flex shape: two download wrappers plus GitHub in the new inner row, with the installer menu attached to the first. It is also the shape that wraps. With this UA, the Windows subtitle is two lines and all three buttons are 84px at both 1024 and 1280px. The same height assertion as the Windows test, applied to both download links against GitHub, would cover it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in 937043cb: added table-driven fallback cases at 1024px and 1280px. After hydration, each compares both download buttons and GitHub in the same layout snapshot. All 34 desktop/mobile download, font-preload, and button-height checks pass without retries; the 37 focused unit tests also pass.

<span class="text-left">
{{ label }}
<span
class="block text-xs font-normal tracking-normal whitespace-normal"

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.

Question (P3): whitespace-normal lets the subtitle wrap, and it does wrap at lg widths, not only on narrow screens. I measured the built page with a scratch Playwright script:

UA 390px 1024px 1280px 1440px
Windows 1 line, 52px 2 lines, 84px 1 line, 68px 1 line, 68px
Unrecognized (fallback) 1 line, 52px 2 lines, 84px 2 lines, 84px 1 line, 68px

So on a 1280px laptop with the fallback, all three hero buttons are 84px tall, and "Windows x64 (including Snapdragon)" breaks after "(including". If that is intended, fine. If the goal was only to stop overflow on small screens, lg:whitespace-nowrap or a shorter label would keep the desktop row at 68px.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, allowing the installer name to wrap at constrained desktop widths is intentional. Keeping the full compatibility label visible prevents the clipping found at 320px; the adjacent GitHub button stretches with it. The fallback's 1024px and 1280px layouts now have explicit alignment coverage. I kept that behavior and clarified the PR description rather than forcing a desktop no-wrap rule.

@DrJKL DrJKL left a comment

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.

Verdict: ready to approve. 937043c addresses every open item from my second review, and I have no new findings.

Compared with 681e95c, this head inlines the primary label, rewrites the commit message, and adds expectAlignedButtons. That helper reads every matched button's rectangle in one evaluateAll, then polls until the height and bottom spread is under 0.5px. It now runs in the Windows hero test and in new fallback cases at 1024 and 1280px. I confirmed it catches a regression: with lg:items-start added to the hero's inner row, the Windows test and both fallback cases fail (spreads of 14 and 30px). With that mutation reverted, button-height, font-preload, and download.spec.ts pass 34 of 34 on the desktop and mobile projects. Website E2E in CI was still running when I posted.

Review record

Round 1: review at 1856af4, request changes.

  • P1 Subtitle used font-medium, a face that is not preloaded (font-preload.spec failed). Addressed with font-normal and a hydration wait in the spec. Author reply.
  • P1 The two-line label failed button-height.spec. Addressed: the spec now sums the visible text lines, and it still fails (+4px) on the #19023 inline-block regression. Author reply.
  • P3 The composable returned a key and the template re-indexed installers. Addressed: it now returns the entry. Author reply.
  • P3 Nit: Installer named a key union. Addressed: the alias is removed. Author reply.
  • P3 platform return was redundant. Addressed: it is removed. Author reply.
  • P2 Click analytics was never asserted. Addressed with a Linux click test, which fails when the platform is hard-coded. Author reply.
  • P3 No Mac case. Addressed with a Macintosh row, which fails if macOS gets the Windows installer. Author reply.
  • P3 The hero stretch had no falsifier. Addressed with the equal-height assertion. My reply.
  • P3 The PR description said "only an OS logo". Addressed by the rewritten PR body.
  • P3 No before and after screenshots. Addressed: the PR body now has them.

Round 2: review at 681e95c, ready to approve with nits.

  • P3 Nit: label computed had one use. Addressed in 937043c: it is inlined. Author reply. The author also pointed out that my suggestion to drop the computed import was wrong, because buttons still uses it.
  • P3 The equal-height check took two snapshots and compared exact floats. Addressed in 937043c with one evaluateAll per poll and a 0.5px tolerance. Author reply.
  • P3 The fallback layout had no equal-height check. Addressed in 937043c with cases at 1024 and 1280px, which fail under the lg:items-start mutation. Author reply.
  • Question: does the subtitle wrap at lg widths on purpose? The author answered yes: wrapping keeps the full label visible and avoids clipping at 320px, and the GitHub button stretches with it. Author reply. I accept that.
  • P3 The commit message was stale. Addressed in 937043c: the message now describes the entry API and the existing Download Desktop text.
  • I withdrew one candidate before posting round 2: that the new line counter could hide extra height when one line mixes font sizes. Running it showed the spec fails (excess: -16) instead of passing.

Checks at 937043c: 37 unit tests passed in DownloadLocalButton.test.ts, InstallerMenu.test.ts, and useDownloadUrl.test.ts. eslint and oxfmt are clean on the two changed files. The website build succeeded. Playwright button-height, font-preload, and download passed 34 of 34 on desktop and mobile, and the alignment helper fails under the lg:items-start mutation. In CI, lint, typecheck, build, test, and fallow passed. Website E2E and website unit were still running when I posted.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 1, 2026
@benceruleanlu
benceruleanlu dismissed coderabbitai[bot]’s stale review October 1, 2026 06:16

The merge-base changed after approval.

@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from 99b13e3 to e6ac6da Compare October 1, 2026 06:16
Base automatically changed from bl/website-defer-credits-checkout to bl/download-installer-links October 1, 2026 06:16
@benceruleanlu
benceruleanlu removed this pull request from stack #19598 October 1, 2026 06:16
@benceruleanlu
benceruleanlu added this pull request to stack #19719 October 1, 2026 06:18
@benceruleanlu
benceruleanlu removed this pull request from stack #19719 October 1, 2026 06:19
@benceruleanlu
benceruleanlu changed the base branch from bl/download-installer-links to bl/website-router-fixture-isolation October 1, 2026 06:19
@benceruleanlu
benceruleanlu changed the base branch from bl/website-router-fixture-isolation to bl/download-installer-links October 1, 2026 06:19
@benceruleanlu
benceruleanlu added this pull request to stack #19720 October 1, 2026 06:19
@benceruleanlu
benceruleanlu removed this pull request from stack #19720 October 1, 2026 06:37
@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from e6ac6da to 49aa253 Compare October 1, 2026 06:37
@benceruleanlu
benceruleanlu added this pull request to stack #19723 October 1, 2026 06:37
@benceruleanlu
benceruleanlu removed this pull request from stack #19723 October 1, 2026 07:07
Show the selected installer below Download Desktop using its translated
menu label. Return the installer entry from useDownloadUrl so its URL,
platform and label stay together. Keep fallback downloads labeled and
stretch the adjacent GitHub button to match wrapped subtitles.

Cover installer selection, analytics, font preloads and button alignment,
including the unrecognized-desktop fallback at laptop widths.
@benceruleanlu
benceruleanlu force-pushed the bl/download-button-installer-name branch from 49aa253 to 944f35c Compare October 1, 2026 07:08
@benceruleanlu
benceruleanlu added this pull request to stack #19724 October 1, 2026 07:08
@benceruleanlu
benceruleanlu dismissed DrJKL’s stale review October 1, 2026 09:44

things got fixed but i don't actually know where this review is right now

@benceruleanlu
benceruleanlu added this pull request to the merge queue Oct 1, 2026
Merged via the queue into main with commit 49be92f Oct 1, 2026
167 of 233 checks passed
@benceruleanlu
benceruleanlu deleted the bl/download-button-installer-name branch October 1, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants