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): github app connection link (#4618)
dev-rb271e7d884cf4
diff --git a/js/app/packages/app/component/settings/GitHub.tsx b/js/app/packages/app/component/settings/GitHub.tsxindex 454269fd3d..c5ced19688 100644--- a/js/app/packages/app/component/settings/GitHub.tsx+++ b/js/app/packages/app/component/settings/GitHub.tsx@@ -1,5 +1,7 @@import { toast } from '@core/component/Toast/Toast';+import { SERVER_HOSTS } from '@core/constant/servers';import GithubIcon from '@icon/mcp-github.svg';+import ArrowUpRightIcon from '@phosphor/arrow-up-right.svg';import {useDeleteGithubLinkMutation,useGithubLinkStatusQuery,@@ -12,7 +14,7 @@ import {type ConnectionState,StatusDot,} from './integration-ui';-import { IntegrationRow, SettingsCard } from './primitives';+import { IntegrationRow, SettingsCard, SettingsRow } from './primitives';/** GitHub integration as a Connected-accounts card. */export function GitHubCard() {@@ -24,7 +26,7 @@ export function GitHubCard() {const status = () => githubLink.data?.status;const username = () => githubLink.data?.username;- // Drives the connection dot shown beside the "GitHub" title.+ // Drives the account connection dot.const connectionState = (): ConnectionState | undefined =>status() === 'linked'? 'connected'@@ -67,12 +69,21 @@ export function GitHubCard() {<IntegrationRowicon={<GithubIcon />}title="GitHub"- description="Surface pull requests and issues alongside your work."- status={- <Show when={connectionState()}>- {(state) => <StatusDot state={state()} label={connectionLabel()} />}- </Show>+ description="Connect Macro to your GitHub account and repositories."+ />++ <SettingsRow+ label={+ <span class="flex items-center gap-2">+ <span>Account</span>+ <Show when={connectionState()}>+ {(state) => (+ <StatusDot state={state()} label={connectionLabel()} />+ )}+ </Show>+ </span>}+ description="Identify your GitHub activity in Macro."><Showwhen={!githubLink.isLoading}@@ -111,7 +122,22 @@ export function GitHubCard() {</Match></Switch></Show>- </IntegrationRow>+ </SettingsRow>++ <SettingsRow+ label="GitHub App"+ description="Choose repositories for Macro to sync."+ >+ <a+ href={`${SERVER_HOSTS['document-storage-service']}/github/install-sync`}+ target="_blank"+ rel="noopener noreferrer"+ class="inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-ink-muted outline-none transition-colors hover:bg-ink/4 hover:text-ink focus-visible:bg-ink/6"+ >+ Install app+ <ArrowUpRightIcon class="size-3.5 opacity-70" />+ </a>+ </SettingsRow></SettingsCard>);}diff --git a/js/app/packages/app/component/settings/Team.tsx b/js/app/packages/app/component/settings/Team.tsxindex e29b7b642b..4391857aa7 100644--- a/js/app/packages/app/component/settings/Team.tsx+++ b/js/app/packages/app/component/settings/Team.tsx@@ -2,14 +2,17 @@ import { useFeatureFlag } from '@app/lib/analytics/posthog';import { useHasPaidAccess } from '@core/auth/license';import { UserIcon } from '@core/component/UserIcon';import { PaywallKey, usePaywallState } from '@core/constant/PaywallState';+import { SERVER_HOSTS } from '@core/constant/servers';import { useUserId } from '@core/context/user';import { macroIdToEmail, tryMacroId, useDisplayName } from '@core/user';import { debouncedDependent } from '@core/util/debounce';import { fuzzyFilter } from '@core/util/fuzzy';import { getWebOrigin } from '@core/util/webOrigin';import { formatRelativeTimestamp } from '@entity';+import GithubIcon from '@icon/mcp-github.svg';import type { CollectionNode } from '@kobalte/core';import { Select } from '@kobalte/core/select';+import ArrowUpRightIcon from '@phosphor/arrow-up-right.svg';import CaretDownIcon from '@phosphor/caret-down.svg';import CheckIcon from '@phosphor/check.svg';import EnvelopeIcon from '@phosphor/envelope.svg';@@ -56,6 +59,7 @@ import {} from 'solid-js';import { z } from 'zod';import {+ IntegrationRow,SettingsCard,SettingsPage,SettingsRow,@@ -1226,6 +1230,26 @@ function TeamManagement(props: {</SettingsCard></SettingsSection>+ <SettingsSection title="Connections">+ <SettingsCard>+ <IntegrationRow+ icon={<GithubIcon />}+ title="GitHub App"+ description="Connect your team's repositories for pull request sync."+ >+ <a+ href={`${SERVER_HOSTS['document-storage-service']}/github/install-sync`}+ target="_blank"+ rel="noopener noreferrer"+ class="inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-ink-muted outline-none transition-colors hover:bg-ink/4 hover:text-ink focus-visible:bg-ink/6"+ >+ Install app+ <ArrowUpRightIcon class="size-3.5 opacity-70" />+ </a>+ </IntegrationRow>+ </SettingsCard>+ </SettingsSection>+<SettingsSectiontitle="Members"actions={