Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(settings): add desktop app section (#7535)
Eric Hayesc58283838710
diff --git a/apps/web/src/features/settings/DesktopApp.tsx b/apps/web/src/features/settings/DesktopApp.tsxnew file mode 100644index 0000000000..0f33cdc5a0--- /dev/null+++ b/apps/web/src/features/settings/DesktopApp.tsx@@ -0,0 +1,29 @@+import { isPlatform } from '@core/util/platform';+import { getVersion } from '@tauri-apps/api/app';+import { createResource } from 'solid-js';+import { DesktopAppDownload, DesktopAppInfo } from './components/desktop-app';++/** Native APIs are only read when mounted inside the desktop app. */+export function DesktopApp() {+ if (!isPlatform('desktop')) return <DesktopAppDownload />;++ const [version] = createResource(async () => {+ try {+ return await getVersion();+ } catch {+ return 'Not available';+ }+ });+ const buildTime = import.meta.env.__APP_BUILD_TIME__;+ const buildDate =+ buildTime && Number.isFinite(buildTime) && buildTime > 0+ ? new Date(buildTime)+ : undefined;++ return (+ <DesktopAppInfo+ version={version.loading ? 'Loading…' : (version() ?? 'Not available')}+ buildDate={buildDate}+ />+ );+}diff --git a/apps/web/src/features/settings/SettingsTabContent.tsx b/apps/web/src/features/settings/SettingsTabContent.tsxindex 5539f972cf..c2114daa1e 100644--- a/apps/web/src/features/settings/SettingsTabContent.tsx+++ b/apps/web/src/features/settings/SettingsTabContent.tsx@@ -14,6 +14,7 @@ import { Appearance } from './Appearance';import { Billing } from './Billing';import { Bots } from './Bots';import { ConnectedAccounts } from './ConnectedAccounts';+import { DesktopApp } from './DesktopApp';import { EmailSettings } from './email-settings';import { McpConnections } from './McpConnections';import { MobileApp } from './MobileApp';@@ -80,6 +81,9 @@ export function SettingsTabContent(props: { tab: SettingsTab }) {<Show when={isCurrentTab('Connections')}><McpConnections /></Show>+ <Show when={isCurrentTab('Desktop App')}>+ <DesktopApp />+ </Show><Show when={isCurrentTab('Mobile App')}><MobileApp /></Show>diff --git a/apps/web/src/features/settings/browser-test/fixture.tsx b/apps/web/src/features/settings/browser-test/fixture.tsxindex 3c7d9be798..73aafda1a6 100644--- a/apps/web/src/features/settings/browser-test/fixture.tsx+++ b/apps/web/src/features/settings/browser-test/fixture.tsx@@ -10,6 +10,7 @@ import { macroDarkTheme } from '../../theme/themes/macro-dark';import { macroLightTheme } from '../../theme/themes/macro-light';import { themeCssVars } from '../../theme/utils/themeColorTokens';import { Appearance } from '../Appearance';+import { DesktopAppInfo } from '../components/desktop-app';import { SettingsSearchTarget } from '../components/settings-search-target';import { SettingsSidebar } from '../components/settings-sidebar';import { SignatureForm } from '../components/signature-form';@@ -17,6 +18,7 @@ import {type SettingsSearchResult,searchSettings,} from '../core/settings-search';+import { DesktopApp } from '../DesktopApp';import { MobileSettingsSheet } from '../MobileSettingsSheet';import {SettingsButton as Button,@@ -31,6 +33,7 @@ function Fixture() {const [tab, setTab] = createSignal<SettingsTab>('Email');const [query, setQuery] = createSignal('');const [selected, setSelected] = createSignal<SettingsSearchResult>();+ const [desktop, setDesktop] = createSignal(false);const [dark, setDark] = createSignal(false);const [narrow, setNarrow] = createSignal(false);const [mobile, setMobile] = createSignal(false);@@ -138,7 +141,19 @@ function Fixture() {const content = (page: SettingsTab) => (<Show when={page !== 'Appearance'} fallback={<Appearance />}><Show when={page !== 'Shortcuts'} fallback={<Shortcuts />}>- {sampleContent(page)}+ <Show+ when={page !== 'Desktop App'}+ fallback={+ <Show when={desktop()} fallback={<DesktopApp />}>+ <DesktopAppInfo+ version="2.5.0"+ buildDate={new Date('2026-10-01T16:30:00Z')}+ />+ </Show>+ }+ >+ {sampleContent(page)}+ </Show></Show></Show>);@@ -155,6 +170,9 @@ function Fixture() {<Button size="sm" onClick={() => applyTheme(!dark())}>Toggle theme</Button>+ <Button size="sm" onClick={() => setDesktop(!desktop())}>+ {desktop() ? 'Preview web app' : 'Preview desktop app'}+ </Button><Button size="sm" onClick={() => setMobile(true)}>Mobile settings</Button>diff --git a/apps/web/src/features/settings/components/desktop-app.tsx b/apps/web/src/features/settings/components/desktop-app.tsxnew file mode 100644index 0000000000..6a5479998f--- /dev/null+++ b/apps/web/src/features/settings/components/desktop-app.tsx@@ -0,0 +1,58 @@+import { buttonClasses } from '@ui';+import { Show } from 'solid-js';+import { SettingsCard, SettingsPage, SettingsRow } from '../primitives';++export function DesktopAppDownload() {+ return (+ <SettingsPage+ title="Desktop App"+ description="Get Macro for your computer."+ >+ <SettingsCard>+ <SettingsRow+ label="Download Macro"+ description="Get the latest release for macOS or Linux."+ stackOnNarrow+ >+ <a+ href="https://github.com/macro-inc/macro/releases/latest"+ target="_blank"+ rel="noopener noreferrer"+ class={buttonClasses({ variant: 'outline', size: 'md' })}+ >+ Download desktop app+ </a>+ </SettingsRow>+ </SettingsCard>+ </SettingsPage>+ );+}++export function DesktopAppInfo(props: { version: string; buildDate?: Date }) {+ return (+ <SettingsPage+ title="Desktop App"+ description="Your installed version of Macro."+ >+ <SettingsCard>+ <SettingsRow label="Version">+ <span class="text-sm text-ink-muted">{props.version}</span>+ </SettingsRow>+ <SettingsRow label="Build date" stackOnNarrow>+ <span class="text-sm text-ink-muted">+ <Show when={props.buildDate} fallback="Not available">+ {(date) => (+ <time datetime={date().toISOString()}>+ {date().toLocaleString(undefined, {+ dateStyle: 'medium',+ timeStyle: 'short',+ })}+ </time>+ )}+ </Show>+ </span>+ </SettingsRow>+ </SettingsCard>+ </SettingsPage>+ );+}diff --git a/apps/web/src/features/settings/core/settings-search.ts b/apps/web/src/features/settings/core/settings-search.tsindex e57b8fba98..2ada10b58c 100644--- a/apps/web/src/features/settings/core/settings-search.ts+++ b/apps/web/src/features/settings/core/settings-search.ts@@ -278,6 +278,11 @@ const SETTINGS: Setting[] = [title: 'Create and revoke API keys',keywords: 'token secret developer authentication',},+ {+ tab: 'Desktop App',+ title: 'Desktop app version and download',+ keywords: 'download mac macos linux version latest release updated',+ },{tab: 'Mobile App',title: 'Get the mobile app',diff --git a/apps/web/src/lib/core/constant/SettingsState.tsx b/apps/web/src/lib/core/constant/SettingsState.tsxindex 0dbd211bfd..3ca8c319f9 100644--- a/apps/web/src/lib/core/constant/SettingsState.tsx+++ b/apps/web/src/lib/core/constant/SettingsState.tsx@@ -27,6 +27,7 @@ export type SettingsTab =| 'Inbox'| 'Shortcuts'| 'Mobile App'+ | 'Desktop App'| 'Agent'| 'Agents'| 'Harness'diff --git a/apps/web/src/lib/core/constant/featureFlags.ts b/apps/web/src/lib/core/constant/featureFlags.tsindex a9236d6a2f..efd9eba538 100644--- a/apps/web/src/lib/core/constant/featureFlags.ts+++ b/apps/web/src/lib/core/constant/featureFlags.ts@@ -378,6 +378,9 @@ export const ENABLE_CLIENT_EMAIL_SIGNAL_FILTER = defineFlag({default: false,}).enabled;+/** Desktop download settings rollout on web; native desktop always shows it. */+export const desktopApp = defineFlag({ key: 'desktop-app' });+export const ENABLE_APP_STORE_QR_CODE = defineFlag({env: 'ENABLE_APP_STORE_QR_CODE',default: true,diff --git a/apps/web/src/lib/core/constant/settingsTabsAvailability.test.ts b/apps/web/src/lib/core/constant/settingsTabsAvailability.test.tsnew file mode 100644index 0000000000..74d8c03594--- /dev/null+++ b/apps/web/src/lib/core/constant/settingsTabsAvailability.test.ts@@ -0,0 +1,55 @@+import { createRoot, createSignal } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';+import { useSettingsTabs } from './settingsTabsConfig';++const platform = vi.hoisted(() => ({ current: 'web' }));+let flagEnabled: () => boolean;++vi.mock('@app/lib/analytics/posthog', () => ({+ useFeatureFlag: (flag: { key: string }) => () => ({+ enabled: flag.key === 'desktop-app' && flagEnabled(),+ }),+}));+vi.mock('../context/user', () => ({ useHasPermission: () => () => false }));+vi.mock('../util/platform', async (importOriginal) => ({+ ...(await importOriginal<typeof import('../util/platform')>()),+ isPlatform: (target: string) => target === platform.current,+ getNativeMobilePlatform: () =>+ ['ios', 'android'].includes(platform.current)+ ? platform.current+ : undefined,+}));++let dispose: () => void;+afterEach(() => dispose?.());++describe('Desktop App settings rollout', () => {+ it.each(['web', 'desktop', 'ios', 'android'])(+ 'gates navigation, search, and direct access on %s',+ (host) => {+ platform.current = host;+ const tabs = createRoot((cleanup) => {+ dispose = cleanup;+ const [enabled, setEnabled] = createSignal(false);+ flagEnabled = enabled;+ return { ...useSettingsTabs(), setEnabled };+ });++ for (const enabled of [false, true, false]) {+ tabs.setEnabled(enabled);+ const expected = host === 'desktop' || (host === 'web' && enabled);+ expect(tabs.isAvailable('Desktop App')).toBe(expected);+ expect(tabs.flatTabs().some((item) => item.tab === 'Desktop App')).toBe(+ expected+ );+ expect(+ tabs+ .searchGroups()+ .some((group) =>+ group.items.some((item) => item.tab === 'Desktop App')+ )+ ).toBe(expected);+ }+ }+ );+});diff --git a/apps/web/src/lib/core/constant/settingsTabsConfig.tsx b/apps/web/src/lib/core/constant/settingsTabsConfig.tsxindex 0e9a646620..6ed92ebe08 100644--- a/apps/web/src/lib/core/constant/settingsTabsConfig.tsx+++ b/apps/web/src/lib/core/constant/settingsTabsConfig.tsx@@ -5,6 +5,7 @@ import BuildingsIcon from '@phosphor/buildings.svg';import CalendarIcon from '@phosphor/calendar-blank.svg';import CpuIcon from '@phosphor/cpu.svg';import CreditCardIcon from '@phosphor/credit-card.svg';+import DesktopIcon from '@phosphor/desktop.svg';import DeviceMobileIcon from '@phosphor/device-mobile-speaker.svg';import EmailIcon from '@phosphor/envelope-simple.svg';import GaugeIcon from '@phosphor/gauge.svg';@@ -25,9 +26,11 @@ import { useHasPermission } from '../context/user';import { isMobile } from '../mobile/isMobile';import { isNativeMobilePlatform } from '../mobile/isNativeMobilePlatform';import { isTouchDevice } from '../mobile/isTouchDevice';+import { isPlatform } from '../util/platform';import {botManagement,DEV_MODE_ENV,+ desktopApp,ENABLE_APP_STORE_QR_CODE,ENABLE_EMAIL,enableCalendarScheduling,@@ -141,6 +144,12 @@ export const SETTINGS_TAB_GROUPS: SettingsTabGroup[] = [icon: CreditCardIcon,keywords: ['payment', 'subscription', 'invoice', 'plan'],},+ {+ tab: 'Desktop App',+ label: 'Desktop App',+ icon: DesktopIcon,+ keywords: ['download', 'mac', 'macos', 'linux', 'version', 'update'],+ },{tab: 'Mobile App',label: 'Mobile App',@@ -233,6 +242,7 @@ const SETTINGS_TAB_SLUGS: Record<SettingsTab, string> = {Inbox: 'inbox',Shortcuts: 'shortcuts','Mobile App': 'mobile-app',+ 'Desktop App': 'desktop-app',Agent: 'mcp-server',Agents: 'agents',Harness: 'runtimes',@@ -280,6 +290,7 @@ export const useSettingsTabAvailable = () => {const botManagementFlag = useFeatureFlag(botManagement);const chatV3AgentsFlag = useFeatureFlag(enableChatV3Agents);const crmFlag = useFeatureFlag(enableCrm);+ const desktopAppFlag = useFeatureFlag(desktopApp);const notificationSettingsFlag = useFeatureFlag(enableNotificationSettings);const hasAdminPanel = useHasPermission(PERMISSION_IDS.WRITE_ADMIN_PANEL);@@ -316,6 +327,11 @@ export const useSettingsTabAvailable = () => {return !isTouchDevice();case 'Mobile App':return ENABLE_APP_STORE_QR_CODE && !isNativeMobilePlatform();+ case 'Desktop App':+ return (+ isPlatform('desktop') ||+ (isPlatform('web') && desktopAppFlag().enabled)+ );case 'Agent':return !isNativeMobilePlatform();// Configurable agents are still rolling out; keep both tabs behind thediff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex 327886deea..f8c40c1ee7 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -2001,10 +2001,17 @@ uses the shared workspace width.Left nav (feature and platform gates still apply):- **Blocks**: Email, Calendar, Agents, CRM.-- **Personal**: Account, Appearance, Notifications, Keyboard shortcuts, Usage, Billing, Mobile App.+- **Personal**: Account, Appearance, Notifications, Keyboard shortcuts, Usage, Billing, Desktop App, Mobile App.- **Workspace**: Team, Tags, Integrations (personal Gmail/GitHub accounts).- **Developer**: Agent connections, Runtimes, MCP server, API Keys, Bots.+**Desktop App** (`/app/settings/desktop-app`) shows a compact version and+build-date card in the desktop app. The date is when the running app bundle was+built, not when it was installed on the computer. In the browser it links to the+latest desktop release on GitHub, and only appears when the `desktop-app` PostHog+flag is enabled. Native desktop always shows this section regardless of the flag;+native mobile never shows it.+Search checks individual setting titles and keywords, tolerates common typos,and shows the parent page below each control result. Selecting a result opensthat page, scrolls to its section or row, and briefly highlights it. Try