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
fix(email): mount add-inbox dialog at app root (#4589)
gbirman81d6b0c12186
diff --git a/js/app/packages/app/component/AddInboxDialog.tsx b/js/app/packages/app/component/AddInboxDialog.tsxindex 5dc2e77a35..cbec1c40dd 100644--- a/js/app/packages/app/component/AddInboxDialog.tsx+++ b/js/app/packages/app/component/AddInboxDialog.tsx@@ -5,9 +5,9 @@ import { createSignal, onCleanup } from 'solid-js';const [isOpen, setIsOpen] = createSignal(false);/**- * Requests the add-inbox confirmation dialog. The dialog itself is rendered- * by the settings Account panel, so callers elsewhere (e.g. the mail inbox- * selector) open settings first and the dialog appears once it mounts.+ * Requests the add-inbox confirmation dialog. Rendered at the app root+ * (Layout), gated on this signal, so it opens immediately and independent of+ * the settings surface.** Entitlement is enforced by the backend: `POST /link/gmail` answers 402 when* the user isn't allowed another inbox, and `useAddInboxFlow` maps that to the@@ -16,6 +16,8 @@ const [isOpen, setIsOpen] = createSignal(false);*/export const openAddInboxDialog = () => setIsOpen(true);+export const isAddInboxDialogOpen = isOpen;+/*** Confirmation step before the add-inbox OAuth redirect. Confirming kicks off* `useAddInboxFlow`, which navigates the page to Google's consent screen.diff --git a/js/app/packages/app/component/Layout.tsx b/js/app/packages/app/component/Layout.tsxindex 5207041cc3..2253d44330 100644--- a/js/app/packages/app/component/Layout.tsx+++ b/js/app/packages/app/component/Layout.tsx@@ -28,6 +28,7 @@ import {Show,Suspense,} from 'solid-js';+import { AddInboxDialog, isAddInboxDialogOpen } from './AddInboxDialog';import { BundleUpdateProgressBar } from './BundleUpdateProgressBar';import Banner from './banner/Banner';import { GlobalBulkEditEntityModal } from './bulk-edit-entity/BulkEditEntityModal';@@ -153,6 +154,9 @@ function LayoutInner(props: RouteSectionProps) {<GlobalShareModal /><IosShareSheet /><MacroMcpSetupModal />+ <Show when={isAddInboxDialogOpen()}>+ <AddInboxDialog />+ </Show></Show><Showwhen={diff --git a/js/app/packages/app/component/settings/Email.tsx b/js/app/packages/app/component/settings/Email.tsxindex 51644c7833..4ec95b80b1 100644--- a/js/app/packages/app/component/settings/Email.tsx+++ b/js/app/packages/app/component/settings/Email.tsx@@ -33,7 +33,7 @@ import {import { Button, Dialog, Panel, Tooltip } from '@ui';import { createMemo, createSignal, For, Match, Show, Switch } from 'solid-js';import { match } from 'ts-pattern';-import { AddInboxDialog, openAddInboxDialog } from '../AddInboxDialog';+import { openAddInboxDialog } from '../AddInboxDialog';import { ConnectAction, StatusDot } from './integration-ui';import { IntegrationRow, SettingsCard, SettingsRow } from './primitives';import {@@ -234,8 +234,6 @@ export function EmailCard() {</Show></SettingsCard>- <AddInboxDialog />-<Dialogopen={removeTarget() !== null}onOpenChange={(open) => {