Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(marketing): add macOS download page (#7497)

Eric Hayesf744c86c1955
diff --git a/apps/marketing/README.md b/apps/marketing/README.md
index 1053823cc0..22d3ff7d5a 100644
--- a/apps/marketing/README.md
+++ b/apps/marketing/README.md
@@ -100,8 +100,16 @@ bun run build
Install workspace dependencies from the repository root first. The public dev
server runs independently of the authenticated app. It serves the homepage,
-public feature and blog routes, and `/start`; `/onboarding-preview.html` remains
-a development review entry. It does not host the authenticated `/app/*` routes.
+public feature and blog routes, `/download`, and `/start`;
+`/onboarding-preview.html` remains a development review entry. It does not host
+the authenticated `/app/*` routes.
+
+`/download` has a single “Download for macOS” button for Apple silicon Macs.
+It resolves the current DMG from the latest GitHub release in the browser,
+with the latest release page as a fallback, and shows the current release tag.
+The page hides the header's Open app action, has no web-app download option,
+and has no header/footer navigation entry.
+Check the installer link, keyboard navigation, and desktop/mobile layouts.
Before the first prerender build, install Chromium with
`bunx playwright install chromium --only-shell` (add `--with-deps` on Linux CI).
diff --git a/apps/marketing/scripts/prerender.ts b/apps/marketing/scripts/prerender.ts
index 548b4f99e0..cb58113f1c 100644
--- a/apps/marketing/scripts/prerender.ts
+++ b/apps/marketing/scripts/prerender.ts
@@ -69,6 +69,7 @@ const STATIC_ROUTES = [
'/agents',
'/github',
'/pricing',
+ '/download',
'/tour',
'/partners',
'/partners/terms',
@@ -95,6 +96,7 @@ const ROUTE_MODULES: Array<[RegExp, string]> = [
[/^\/agents$/, 'src/app/routes/RouteAgents.tsx'],
[/^\/github$/, 'src/app/routes/RouteGithub.tsx'],
[/^\/pricing$/, 'src/app/routes/RoutePricing.tsx'],
+ [/^\/download$/, 'src/app/routes/RouteDownload.tsx'],
[/^\/tour$/, 'src/features/marketing/views/SalesPage.tsx'],
[/^\/partners$/, 'src/app/routes/RoutePartners.tsx'],
[/^\/partners\/terms$/, 'src/app/routes/RoutePartnerTerms.tsx'],
@@ -148,6 +150,7 @@ const ROUTE_LABELS: Record<string, string> = {
'/agents': 'Agents',
'/github': 'GitHub',
'/pricing': 'Pricing',
+ '/download': 'Download',
'/tour': 'Macro tour',
'/partners': 'Partner Program',
'/partners/terms': 'Partner Program Terms',
diff --git a/apps/marketing/src/app/components/base/BaseHeader.tsx b/apps/marketing/src/app/components/base/BaseHeader.tsx
index 593175ebae..6b9a9a9d6a 100644
--- a/apps/marketing/src/app/components/base/BaseHeader.tsx
+++ b/apps/marketing/src/app/components/base/BaseHeader.tsx
@@ -2,6 +2,9 @@ import { SiteHeader } from '../../../features/marketing/components/SiteHeader';
export const GRID_COLS =
'minmax(0, 1fr) clamp(300px, 32vw, 420px) minmax(0, 1fr)';
export const GRID_GAP = '14px';
-export function BaseHeader(_props: { ctaActive?: boolean }) {
- return <SiteHeader />;
+export function BaseHeader(props: {
+ ctaActive?: boolean;
+ hideOpenApp?: boolean;
+}) {
+ return <SiteHeader hideOpenApp={props.hideOpenApp} />;
}
diff --git a/apps/marketing/src/app/main/App.tsx b/apps/marketing/src/app/main/App.tsx
index 816dabbc8d..85a92c33d3 100644
--- a/apps/marketing/src/app/main/App.tsx
+++ b/apps/marketing/src/app/main/App.tsx
@@ -114,6 +114,10 @@ const RoutePricing = lazy(() =>
default: module.RoutePricing,
}))
);
+const RouteDownload = lazy(async () => {
+ const module = await import('../routes/RouteDownload');
+ return { default: module.RouteDownload };
+});
const RouteTour = lazy(() =>
import('../../features/marketing/views/SalesPage').then((module) => ({
default: module.RouteTour,
@@ -227,7 +231,12 @@ const RootLayout: ParentComponent = (props) => {
width: 'calc(100vw / var(--site-scale, 1))',
}}
>
- <BaseHeader ctaActive={headerCtaActive()} />
+ <BaseHeader
+ ctaActive={headerCtaActive()}
+ hideOpenApp={
+ location.pathname.replace(/\/$/, '') === '/download'
+ }
+ />
<UtilWrap>{props.children}</UtilWrap>
</div>
<PageVignette />
@@ -272,6 +281,7 @@ export const App: Component<{
<Route path="/agents" component={RouteAgents} />
<Route path="/github" component={RouteGithub} />
<Route path="/pricing" component={RoutePricing} />
+ <Route path="/download" component={RouteDownload} />
{/* Paid-social landing page: noindex and kept out of the nav. */}
<Route path="/tour" component={RouteTour} />
{/* Partner program: the landing page and its full program terms. */}
diff --git a/apps/marketing/src/app/routes/RouteDownload.css b/apps/marketing/src/app/routes/RouteDownload.css
new file mode 100644
index 0000000000..70342a9a60
--- /dev/null
+++ b/apps/marketing/src/app/routes/RouteDownload.css
@@ -0,0 +1,100 @@
+.downloads-page {
+ width: min(580px, 100%);
+ margin: 0 auto;
+ padding: 132px 24px 100px;
+}
+
+.downloads-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-bottom: 32px;
+ text-align: center;
+}
+
+.downloads-app-icon {
+ display: grid;
+ place-items: center;
+ width: 88px;
+ height: 88px;
+ margin-bottom: 32px;
+ border: 1px solid #ffffff1c;
+ border-radius: 22px;
+ background: linear-gradient(145deg, #292929, #111);
+ box-shadow: inset 0 1px 1px #ffffff12;
+}
+
+.downloads-app-icon svg {
+ width: 43px;
+ height: 43px;
+ color: #eee;
+}
+
+.downloads-header h1 {
+ margin: 0 0 14px;
+ font:
+ 500 clamp(30px, 4vw, 40px) / 1.2 "Inter Variable",
+ Inter,
+ sans-serif;
+ letter-spacing: -0.045em;
+}
+
+.downloads-header p {
+ color: #999;
+ font-size: 15px;
+ line-height: 1.6;
+}
+
+.downloads-action {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 12px;
+}
+
+.downloads-action p {
+ color: #777;
+ font-size: 12px;
+ line-height: 1.5;
+}
+
+/* Preserve the shared primary button's ink over the legacy anchor reset. */
+.downloads-action .site-nav-start {
+ color: #000;
+}
+
+.downloads-release {
+ margin-top: 25px !important;
+ text-align: center;
+}
+.downloads-release a {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ color: #777;
+ font-size: 12px;
+ text-decoration: none;
+}
+.downloads-release a:hover {
+ color: #ccc;
+}
+.downloads-release svg {
+ width: 13px;
+ height: 13px;
+}
+
+@media (max-width: 600px) {
+ .downloads-page {
+ padding: 112px 12px 76px;
+ }
+ .downloads-app-icon {
+ width: 76px;
+ height: 76px;
+ margin-bottom: 28px;
+ border-radius: 19px;
+ }
+ .downloads-app-icon svg {
+ width: 38px;
+ height: 38px;
+ }
+}
diff --git a/apps/marketing/src/app/routes/RouteDownload.tsx b/apps/marketing/src/app/routes/RouteDownload.tsx
new file mode 100644
index 0000000000..15987aa67e
--- /dev/null
+++ b/apps/marketing/src/app/routes/RouteDownload.tsx
@@ -0,0 +1,78 @@
+import MacroLogo from '@icon/macro-logo.svg';
+import ArrowUpRight from '@phosphor/arrow-up-right.svg';
+import { createSignal, onCleanup, onMount } from 'solid-js';
+import { FeaturePage } from '../../features/marketing/components/FeaturePage';
+import {
+ DESKTOP_RELEASE_API_URL,
+ DESKTOP_RELEASE_URL,
+ type DesktopDownloadUrls,
+ FALLBACK_DOWNLOAD_URLS,
+ releaseDownloadUrls,
+} from '../../features/marketing/core/desktopDownloads';
+import { SectionMoreFeatures } from '../components/sections/SectionMoreFeatures';
+import { setPageSeo } from '../utils/utilSeo';
+import './RouteDownload.css';
+
+export function RouteDownload() {
+ setPageSeo({
+ title: 'Download Macro for macOS',
+ description:
+ 'Download the latest release of Macro for macOS. Available for Apple silicon Macs.',
+ path: '/download',
+ });
+
+ const [downloads, setDownloads] = createSignal<DesktopDownloadUrls>(
+ FALLBACK_DOWNLOAD_URLS
+ );
+ const [releaseTag, setReleaseTag] = createSignal<string>();
+
+ onMount(() => {
+ const controller = new AbortController();
+ const loadLatestRelease = async () => {
+ try {
+ const response = await fetch(DESKTOP_RELEASE_API_URL, {
+ headers: { Accept: 'application/vnd.github+json' },
+ signal: controller.signal,
+ });
+ if (!response.ok) throw new Error('Unable to load desktop release');
+ const release = await response.json();
+ setDownloads(releaseDownloadUrls(release));
+ if (typeof release.tag_name === 'string')
+ setReleaseTag(release.tag_name);
+ } catch {
+ // The release page remains a usable fallback if the API is unavailable.
+ }
+ };
+ void loadLatestRelease();
+ onCleanup(() => controller.abort());
+ });
+
+ return (
+ <FeaturePage>
+ <div class="downloads-page">
+ <header class="downloads-header">
+ <div class="downloads-app-icon" aria-hidden="true">
+ <MacroLogo />
+ </div>
+ <h1>Download Macro</h1>
+ <p>Available for macOS.</p>
+ </header>
+
+ <div class="downloads-action">
+ <a class="site-nav-start" href={downloads().macos}>
+ Download for macOS
+ </a>
+ <p>Apple silicon · DMG</p>
+ </div>
+
+ <p class="downloads-release">
+ <a href={DESKTOP_RELEASE_URL} target="_blank" rel="noreferrer">
+ {releaseTag() ? `Release ${releaseTag()}` : 'Latest release'}
+ <ArrowUpRight aria-hidden="true" />
+ </a>
+ </p>
+ </div>
+ <SectionMoreFeatures currentPath="/download" footerOnly />
+ </FeaturePage>
+ );
+}
diff --git a/apps/marketing/src/features/marketing/components/SiteHeader.tsx b/apps/marketing/src/features/marketing/components/SiteHeader.tsx
index 5252ff1343..d29eb98676 100644
--- a/apps/marketing/src/features/marketing/components/SiteHeader.tsx
+++ b/apps/marketing/src/features/marketing/components/SiteHeader.tsx
@@ -1,4 +1,11 @@
-import { createSignal, For, type JSX, onCleanup, onMount } from 'solid-js';
+import {
+ createSignal,
+ For,
+ type JSX,
+ onCleanup,
+ onMount,
+ Show,
+} from 'solid-js';
import { FEATURE_PAGES, RESOURCE_PAGES } from '../core/navigation';
import './site-navigation.css';
@@ -34,7 +41,7 @@ function NavigationGroup(props: {
}
/** Shared public navigation and app entry. */
-export function SiteHeader() {
+export function SiteHeader(props: { hideOpenApp?: boolean }) {
let menu!: HTMLDivElement;
let trigger!: HTMLButtonElement;
const [open, setOpen] = createSignal(false);
@@ -169,33 +176,35 @@ export function SiteHeader() {
>
Talk to us
</a>
- <a
- class="site-nav-start"
- target="_self"
- href={import.meta.env.DEV ? '/onboarding-preview.html' : '/app'}
- onPointerEnter={moveGlow}
- onPointerMove={moveGlow}
- onPointerLeave={stopGlow}
- onPointerCancel={stopGlow}
- onFocus={centerGlow}
- >
- <span>Open app</span>
- <svg
- width="28"
- height="28"
- viewBox="0 0 32 32"
- fill="none"
- aria-hidden="true"
+ <Show when={!props.hideOpenApp}>
+ <a
+ class="site-nav-start"
+ target="_self"
+ href={import.meta.env.DEV ? '/onboarding-preview.html' : '/app'}
+ onPointerEnter={moveGlow}
+ onPointerMove={moveGlow}
+ onPointerLeave={stopGlow}
+ onPointerCancel={stopGlow}
+ onFocus={centerGlow}
>
- <path
- d="M5 16h22M17 6l10 10-10 10"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
- />
- </svg>
- </a>
+ <span>Open app</span>
+ <svg
+ width="28"
+ height="28"
+ viewBox="0 0 32 32"
+ fill="none"
+ aria-hidden="true"
+ >
+ <path
+ d="M5 16h22M17 6l10 10-10 10"
+ stroke="currentColor"
+ stroke-width="2"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ />
+ </svg>
+ </a>
+ </Show>
</div>
</header>
);
diff --git a/apps/marketing/src/features/marketing/core/desktopDownloads.ts b/apps/marketing/src/features/marketing/core/desktopDownloads.ts
new file mode 100644
index 0000000000..3762103259
--- /dev/null
+++ b/apps/marketing/src/features/marketing/core/desktopDownloads.ts
@@ -0,0 +1,37 @@
+export const DESKTOP_RELEASE_URL =
+ 'https://github.com/macro-inc/macro/releases/latest';
+export const DESKTOP_RELEASE_API_URL =
+ 'https://api.github.com/repos/macro-inc/macro/releases/latest';
+
+export type DesktopPlatform = 'macos' | 'linux';
+
+export type DesktopDownloadUrls = Record<DesktopPlatform, string>;
+
+export const FALLBACK_DOWNLOAD_URLS: DesktopDownloadUrls = {
+ macos: DESKTOP_RELEASE_URL,
+ linux: DESKTOP_RELEASE_URL,
+};
+
+interface ReleaseAsset {
+ name: string;
+ browser_download_url: string;
+}
+
+interface GithubRelease {
+ assets?: ReleaseAsset[];
+}
+
+export function releaseDownloadUrls(
+ release: GithubRelease
+): DesktopDownloadUrls {
+ const assets = release.assets ?? [];
+ const findAsset = (suffix: string) =>
+ assets.find(
+ (asset) => asset.name.startsWith('Macro-') && asset.name.endsWith(suffix)
+ )?.browser_download_url;
+
+ return {
+ macos: findAsset('-aarch64-darwin.dmg') ?? DESKTOP_RELEASE_URL,
+ linux: findAsset('-x86_64-linux.AppImage') ?? DESKTOP_RELEASE_URL,
+ };
+}