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(settings): add Connections tab beside Integrations (#7297)

teod4aa167c8ce9
diff --git a/apps/web/src/features/settings/SettingsTabContent.tsx b/apps/web/src/features/settings/SettingsTabContent.tsx
index d05e1b97f1..f14604fe2b 100644
--- a/apps/web/src/features/settings/SettingsTabContent.tsx
+++ b/apps/web/src/features/settings/SettingsTabContent.tsx
@@ -11,6 +11,7 @@ import { Appearance } from './Appearance';
import { Billing } from './Billing';
import { Bots } from './Bots';
import { ConnectedAccounts } from './ConnectedAccounts';
+import { McpConnections } from './McpConnections';
import { MobileApp } from './MobileApp';
import { Notifications } from './Notifications';
import { Shortcuts } from './Shortcuts';
@@ -60,6 +61,9 @@ export function SettingsTabContent(props: { tab: SettingsTab }) {
<Show when={isCurrentTab('Connected')}>
<ConnectedAccounts />
</Show>
+ <Show when={isCurrentTab('Connections')}>
+ <McpConnections />
+ </Show>
<Show when={isCurrentTab('Mobile App')}>
<MobileApp />
</Show>
diff --git a/apps/web/src/features/settings/connections/primitives.tsx b/apps/web/src/features/settings/connections/primitives.tsx
index eb96d9a5ff..39529b6cc1 100644
--- a/apps/web/src/features/settings/connections/primitives.tsx
+++ b/apps/web/src/features/settings/connections/primitives.tsx
@@ -1,11 +1,12 @@
import CaretLeftIcon from '@phosphor/caret-left.svg';
import { cn, Layer } from '@ui';
-import { type JSX, Show } from 'solid-js';
+import { type JSX, Show, useContext } from 'solid-js';
+import { SettingsSheetContext } from '../primitives';
/*
- * Connections presentation adapted from #6151. Kept local to the Agents page
- * so its card spacing and provider headers do not alter Harness or the mobile
- * settings sheet.
+ * Connections presentation adapted from #6151. Kept local to the Connections
+ * page so its card spacing and provider headers do not alter Harness or the
+ * other settings pages.
*
* <SettingsPage title="Account" description="…">
* <SettingsSection title="Profile">
@@ -35,12 +36,23 @@ export function SettingsPage(props: {
backLabel?: string;
children: JSX.Element;
}) {
+ const inSheet = useContext(SettingsSheetContext);
return (
- <div class="h-full min-h-0 overflow-y-auto [overflow-anchor:none]">
+ <div
+ data-drawer-scroll-body={inSheet ? true : undefined}
+ class="h-full min-h-0 overflow-y-auto [overflow-anchor:none]"
+ >
{/* On mobile/tablet the page is full-frame: the chrome insets live inside the
scroll content (plus the usual breathing room) so pages scroll under
the floating header and bottom rows like every other block. */}
- <div class="mx-auto w-full max-w-[710px] px-10 pt-14 pb-24 touch:px-5 touch:pt-[calc(var(--mobile-content-inset-top,0px)+2rem)] touch:pb-[calc(var(--mobile-content-inset-bottom,0px)+3rem)]">
+ <div
+ class={cn(
+ 'mx-auto w-full max-w-[710px]',
+ inSheet
+ ? 'px-3 pt-2 pb-[max(24px,var(--mobile-sheet-safe-padding))]'
+ : 'px-10 pt-14 pb-24 touch:px-5 touch:pt-[calc(var(--mobile-content-inset-top,0px)+2rem)] touch:pb-[calc(var(--mobile-content-inset-bottom,0px)+3rem)]'
+ )}
+ >
<Show when={props.onBack}>
<button
type="button"
@@ -52,21 +64,23 @@ export function SettingsPage(props: {
</button>
</Show>
<header class="flex flex-col gap-1.5">
- <div class="flex items-start justify-between gap-4">
- <div class="flex min-w-0 items-center gap-3.5">
- <Show when={props.icon}>
- <div class="flex size-9 shrink-0 items-center justify-center [&_svg]:size-8 [&_img]:size-8">
- {props.icon}
- </div>
+ <Show when={!inSheet || props.onBack || props.icon}>
+ <div class="flex items-start justify-between gap-4">
+ <div class="flex min-w-0 items-center gap-3.5">
+ <Show when={props.icon}>
+ <div class="flex size-9 shrink-0 items-center justify-center [&_svg]:size-8 [&_img]:size-8">
+ {props.icon}
+ </div>
+ </Show>
+ <h1 class="min-w-0 text-2xl/tight font-semibold text-ink">
+ {props.title}
+ </h1>
+ </div>
+ <Show when={props.actions}>
+ <div class="shrink-0 pt-1">{props.actions}</div>
</Show>
- <h1 class="min-w-0 text-2xl/tight font-semibold text-ink">
- {props.title}
- </h1>
</div>
- <Show when={props.actions}>
- <div class="shrink-0 pt-1">{props.actions}</div>
- </Show>
- </div>
+ </Show>
<Show when={props.description}>
<p class="text-sm text-ink-muted text-balance">
{props.description}
@@ -74,7 +88,11 @@ export function SettingsPage(props: {
</Show>
<Show when={props.signpost}>{props.signpost}</Show>
</header>
- <div class="mt-9 flex flex-col gap-10">{props.children}</div>
+ <div
+ class={cn('flex flex-col', inSheet ? 'mt-3 gap-6' : 'mt-9 gap-10')}
+ >
+ {props.children}
+ </div>
</div>
</div>
);
diff --git a/apps/web/src/lib/core/constant/SettingsState.tsx b/apps/web/src/lib/core/constant/SettingsState.tsx
index 8f04fe94fa..0b0bef9477 100644
--- a/apps/web/src/lib/core/constant/SettingsState.tsx
+++ b/apps/web/src/lib/core/constant/SettingsState.tsx
@@ -36,6 +36,7 @@ export type SettingsTab =
| 'Tags'
| 'CRM'
| 'Connected'
+ | 'Connections'
| 'Email'
| 'GitHub'
| 'Admin';
diff --git a/apps/web/src/lib/core/constant/settingsTabsConfig.test.ts b/apps/web/src/lib/core/constant/settingsTabsConfig.test.ts
new file mode 100644
index 0000000000..33fb766b46
--- /dev/null
+++ b/apps/web/src/lib/core/constant/settingsTabsConfig.test.ts
@@ -0,0 +1,32 @@
+import { describe, expect, it } from 'vitest';
+import {
+ SETTINGS_TAB_GROUPS,
+ settingsSlugToTab,
+ settingsTabToSlug,
+} from './settingsTabsConfig';
+
+describe('settings Connections tab', () => {
+ it('routes agent-connections to the Connections tab', () => {
+ expect(settingsSlugToTab('agent-connections')).toBe('Connections');
+ expect(settingsTabToSlug('Connections')).toBe('agent-connections');
+ });
+
+ it('keeps the connections slug on Integrations', () => {
+ expect(settingsSlugToTab('connections')).toBe('Connected');
+ });
+
+ it('places Connections right after Integrations in Workspace', () => {
+ const workspace = SETTINGS_TAB_GROUPS.find(
+ (group) => group.label === 'Workspace'
+ );
+ expect(workspace?.items.map((item) => item.tab)).toEqual([
+ 'Team',
+ 'Tags',
+ 'CRM',
+ 'Connected',
+ 'Connections',
+ 'Agent',
+ 'Bots',
+ ]);
+ });
+});
diff --git a/apps/web/src/lib/core/constant/settingsTabsConfig.tsx b/apps/web/src/lib/core/constant/settingsTabsConfig.tsx
index 0d6adcb728..fd758e651e 100644
--- a/apps/web/src/lib/core/constant/settingsTabsConfig.tsx
+++ b/apps/web/src/lib/core/constant/settingsTabsConfig.tsx
@@ -9,6 +9,7 @@ import HardDrivesIcon from '@phosphor/hard-drives.svg';
import KeyIcon from '@phosphor/key.svg';
import KeyboardIcon from '@phosphor/keyboard.svg';
import PlugIcon from '@phosphor/plug.svg';
+import PlugsConnectedIcon from '@phosphor/plugs-connected.svg';
import BotIcon from '@phosphor/robot.svg';
import AgentIcon from '@phosphor/sparkle.svg';
import SwatchesIcon from '@phosphor/swatches.svg';
@@ -147,6 +148,12 @@ export const SETTINGS_TAB_GROUPS: SettingsTabGroup[] = [
icon: CpuIcon,
keywords: ['integrations', 'apps', 'connections'],
},
+ {
+ tab: 'Connections',
+ label: 'Connections',
+ icon: PlugsConnectedIcon,
+ keywords: ['agent', 'tools', 'apps', 'mcp'],
+ },
{
tab: 'Agent',
label: 'MCP server',
@@ -194,6 +201,8 @@ const SETTINGS_TAB_SLUGS: Record<SettingsTab, string> = {
Tags: 'tags',
CRM: 'crm',
Connected: 'connections',
+ // `connections` predates this tab and stays on Integrations for old links.
+ Connections: 'agent-connections',
Email: 'email',
GitHub: 'github',
Admin: 'admin',
@@ -252,6 +261,7 @@ export const useSettingsTabAvailable = () => {
case 'CRM':
return crmFlag().enabled;
case 'Connected':
+ case 'Connections':
return true;
case 'Shortcuts':
return !isTouchDevice();
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 172f8b87f2..7f99c364d5 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -1698,7 +1698,8 @@ menu; Premium seats have no Max option; moves are prorated at once), `Tags`, `CR
with `Customize stages`, inline rename, reorder by drag handle or arrow keys (up/down
buttons on touch), delete, `Add stage`, `Reset to defaults`, and `Closed stages`
checkboxes, editable by the role set as `edit_stages_role`),
-`Integrations` (personal Gmail/GitHub accounts), `MCP server`
+`Integrations` (personal Gmail/GitHub accounts), `Connections` (agent tool
+connections; the same page as Agents → Connections, URL slug `agent-connections`), `MCP server`
(setup snippets for Claude Code / Codex CLI / Claude.ai / ChatGPT / IDE), `Bots`;
`Log out`.
`Agents` unifies agent definitions and runtime configuration in one page, also used by the Agents workspace. Its `Agents` section lists team and private agents. `New agent` / `Edit <name>` open full-page forms grouped
@@ -1710,16 +1711,16 @@ with a connected / not-connected dot for the *current viewer* plus an inline `Co
that opens the Pipedream Connect flow inside the page. Unconnected picks never block
saving; each teammate connects their own account. An agent session that calls a picked
but unconnected app gets a tool result saying so, and the agent's reply renders a
-`Connect <app>` chip that opens Agents → Connections for that app. MCP integrations
-are managed on that page, rather than in Settings.
+`Connect <app>` chip that opens Agents → Connections for that app. The same page
+is also available as Settings → Connections.
-With `pipedream-mcp` enabled, Agents → Connections has `Connected` and `Discover`
+With `pipedream-mcp` enabled, Connections (in Agents or Settings) has `Connected` and `Discover`
tabs. Connected groups GitHub, Linear, Notion, and Slack tool grants by provider,
lists other catalog connections alongside them, and puts custom MCP servers in
a separate section. Discover offers featured providers, a searchable catalog,
and `Add custom MCP`. Slack discovery retains its development-only gate.
Provider Back returns to the tab that opened it; navigation is local to each
-Agents workspace and starts at Connected on a fresh visit.
+Connections page and starts at Connected on a fresh visit.
Provider and custom-server More menus contain Disable, Reconnect, and Disconnect;
custom servers also offer Rename. Disabled grants show Enable. Unauthenticated
custom servers show Connect and Remove. Disconnect/Remove require confirmation.