Skip to content

feat(pages): add MacOS, Linux, and Windows install channels - #904

Merged
lizhengfeng101 merged 1 commit into
mainfrom
feat/pages-os-install-channels
Aug 14, 2026
Merged

feat(pages): add MacOS, Linux, and Windows install channels#904
lizhengfeng101 merged 1 commit into
mainfrom
feat/pages-os-install-channels

Conversation

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Summary

  • Add platform-specific install options to the homepage hero "More" dropdown:
    • MacOS: curl -fsSL https://open-codereview.ai/install.sh | sh (Apple icon)
    • Linux: curl -fsSL https://open-codereview.ai/install.sh | sh (Tux icon)
    • Windows: irm https://open-codereview.ai/install.ps1 | iex (Windows icon)
  • Reorder MacPorts to the bottom of the dropdown list
  • Add OS icon SVGs (apple.svg, linux.svg, windows.svg)
  • Add i18n keys across all four locales (en, zh, ja, ru)
  • Fix dropdown being clipped by the hero section's overflow: hidden
  • Fix dropdown alignment to open from the left edge of the trigger button

Test plan

  • npm run typecheck passes
  • npm run build succeeds
  • Visually verify the "More" dropdown shows MacOS, Linux, Windows, MacPorts in order
  • Verify clicking each channel copies the correct install command
  • Verify dropdown is not clipped by the hero section on desktop and mobile viewports

…ection

Add platform-specific install options (curl|sh for MacOS/Linux,
irm|iex for Windows) to the 'More' dropdown in the homepage hero.

- Add apple.svg, linux.svg, windows.svg icons
- Add three new secondary install channels with OS-specific commands
- Reorder MacPorts to the bottom of the dropdown
- Add i18n keys for all four locales
- Fix dropdown clipping by removing overflow:hidden on hero section
- Fix dropdown alignment (left:0 instead of right:0)
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 3 issue(s) in this PR.

  • ✅ Successfully posted inline: 3 comment(s)

Comment on lines +141 to +143
{ key: 'macos', labelKey: 'hero.installMacOS', cmd: 'curl -fsSL https://open-codereview.ai/install.sh | sh', icons: [appleIcon], primary: false },
{ key: 'linux', labelKey: 'hero.installLinux', cmd: 'curl -fsSL https://open-codereview.ai/install.sh | sh', icons: [linuxIcon], primary: false },
{ key: 'windows', labelKey: 'hero.installWindows', cmd: 'irm https://open-codereview.ai/install.ps1 | iex', icons: [windowsIcon], primary: false },

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.

maintainability · medium
Hardcoded URLs: The installation URLs (https://open-codereview.ai/install.sh and https://open-codereview.ai/install.ps1) are hardcoded business-related strings that should be extracted to a constants or configuration file. This violates the coding standard that prohibits hardcoded URL paths.

Additionally, these URLs appear in multiple places throughout the codebase (documentation files, README files), creating maintenance burden. If the domain or path changes, you would need to update many files.

Recommendation: Create a constants file (e.g., src/constants/install.ts) to centralize these URLs:

export const INSTALL_URLS = {
  SHELL_SCRIPT: 'https://open-codereview.ai/install.sh',
  POWERSHELL_SCRIPT: 'https://open-codereview.ai/install.ps1',
};

Then reference them in the install channels:

{ key: 'macos', ..., cmd: `curl -fsSL ${INSTALL_URLS.SHELL_SCRIPT} | sh`, ... }
{ key: 'windows', ..., cmd: `irm ${INSTALL_URLS.POWERSHELL_SCRIPT} | iex`, ... }

Comment thread pages/src/i18n/en.ts
'hero.installNpm': 'npm',
'hero.installBrew': 'Homebrew',
'hero.installMacPorts': 'MacPorts',
'hero.installMacOS': 'MacOS',

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.

style · low
Minor branding nit: Apple's official styling is "macOS" (lowercase 'm', uppercase 'OS'). Consider using "macOS" for consistency with Apple's branding convention.

Suggestion:

Suggested change
'hero.installMacOS': 'MacOS',
'hero.installMacOS': 'macOS',

Comment thread pages/src/i18n/zh.ts
'hero.installNpm': 'npm',
'hero.installBrew': 'Homebrew',
'hero.installMacPorts': 'MacPorts',
'hero.installMacOS': 'MacOS',

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.

style · low
Apple's official branding for the operating system is "macOS" (lowercase 'm', uppercase 'OS'). Using "MacOS" is inconsistent with Apple's standard naming convention. This applies across all four language files (en, ja, ru, zh).

Suggestion:

Suggested change
'hero.installMacOS': 'MacOS',
'hero.installMacOS': 'macOS',

@lizhengfeng101
lizhengfeng101 merged commit 1600461 into main Aug 14, 2026
12 checks passed
@lizhengfeng101
lizhengfeng101 deleted the feat/pages-os-install-channels branch August 14, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants