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.

fix(style): Update email disconnected and AI empty state (#3744)

Aidan Holloway-Bidwell470a56a84446
diff --git a/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx b/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx
index 59df39e01e..bfb864581b 100644
--- a/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/empty-states.tsx
@@ -4,7 +4,7 @@ import type { BlockAlias, BlockName } from '@core/block';
import { McpSetupCards } from '@core/component/AI/component/McpSetupCards';
import { toast } from '@core/component/Toast/Toast';
import { useEmailLinks, useEmailLinksStatus } from '@core/email-link';
-import Arcanum01 from '@design/arcanum-01.svg';
+import EmptyStateAiIcon from '@design/empty-state-ai.svg';
import EmptyStateDocIcon from '@design/empty-state-doc.svg';
import EmptyStateEmailIcon from '@design/empty-state-email.svg';
import EmptyStateFolderIcon from '@design/empty-state-folder.svg';
@@ -12,7 +12,8 @@ import EmptyStateInboxZeroIcon from '@design/empty-state-inbox-zero.svg';
import EmptyStateNoFilterMatchIcon from '@design/empty-state-no-filter-match.svg';
import EmptyStateNoSearchMatchIcon from '@design/empty-state-no-search-match.svg';
import EmptyStateTasksIcon from '@design/empty-state-tasks.svg';
-import { EmptyStatePanel, FilteredHiddenBanner } from '@ui';
+import PlusCircleIcon from '@phosphor/plus-circle.svg';
+import { Button, EmptyStatePanel, FilteredHiddenBanner } from '@ui';
import { type Component, Match, Switch } from 'solid-js';
import { FolderDropZone } from './FolderDropZone';
import { useSoupView } from './soup-view-context';
@@ -197,20 +198,30 @@ export function EmptyState(props: {
function AgentsEmptyState() {
return (
<div class="size-full relative overflow-hidden" data-soup-empty-state>
- <div class="absolute inset-0 flex flex-col items-center pointer-events-none p-4">
- <div class="h-72 m-8 mt-32 @max-sm:mt-20 opacity-5 text-ink-muted">
- <Arcanum01 class="size-full" />
- </div>
- </div>
<div class="relative size-full flex flex-col items-center overflow-y-auto p-4">
- <div class="w-full max-w-2xl mt-32 @max-sm:mt-20 px-4 pb-8 flex flex-col gap-4">
- <div>
- <p class="mt-1 text-sm text-ink-extra-muted">
- Create an agent above, or use Macro with your favorite AI chat
- client or code editor via MCP.
- </p>
+ <div class="w-full max-w-2xl mt-32 @max-sm:mt-20 px-4 pb-8 flex flex-col gap-6">
+ <div class="flex flex-col items-center gap-2">
+ <div class="h-48 w-48 -mb-8 text-ink-muted">
+ <EmptyStateAiIcon class="size-full" />
+ </div>
+ <Button
+ variant="cta"
+ size="lg"
+ onClick={() => runCreateAction('chat')}
+ >
+ <PlusCircleIcon />
+ <span>New Agent</span>
+ </Button>
+ </div>
+ <div class="flex flex-col gap-4">
+ <div>
+ <p class="mt-1 text-sm text-ink-extra-muted">
+ Create an agent above, or use Macro with your favorite AI chat
+ client or code editor via MCP.
+ </p>
+ </div>
+ <McpSetupCards />
</div>
- <McpSetupCards />
</div>
</div>
</div>
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
index 1d23576f35..93b1e3cc5f 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
@@ -64,7 +64,6 @@ import { useSplitPanelOrThrow } from '@app/component/split-layout/layoutUtils';
import { isListViewID, type ListView } from '@app/constants/list-views';
import { usePreference } from '@app/preferences/use-preference';
import { CustomScrollbar } from '@core/component/CustomScrollbar';
-import { EmailPermissionsBanner } from '@core/component/EmailPermissionsBanner';
import { StaticMarkdownContext } from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';
import { LoadingBlock } from '@core/component/LoadingBlock';
import { Resize } from '@core/component/Resize';
@@ -98,7 +97,6 @@ import { PropertyValueIcon } from '@property/component/propertyValue/PropertyVal
import { SYSTEM_PROPERTY_IDS } from '@property/constants';
import { useQueryClient } from '@queries/client';
import { emailKeys } from '@queries/email/keys';
-import { useEmailLinksQuery } from '@queries/email/link';
import { invalidateEntityNotifications } from '@queries/notification/user-notifications';
import {
invalidateSoupEntity,
@@ -394,21 +392,6 @@ export const SoupView = (props: SoupViewProps) => {
},
});
- const isMailView = createMemo(() => {
- const content = panel.handle.content();
- return content.type === 'component' && content.id === 'mail';
- });
-
- const emailLinksQuery = useEmailLinksQuery();
- const hasLinkError = createMemo(() => {
- if (!isMailView()) return false;
- if (emailLinksQuery.isPending) return false;
- return (
- emailLinksQuery.isError ||
- (emailLinksQuery.data && emailLinksQuery.data.links.length === 0)
- );
- });
-
return (
<SplitPanelContext.Provider
value={{
@@ -527,15 +510,7 @@ export const SoupView = (props: SoupViewProps) => {
</Show>
<SoupFiltersBar />
</div>
- <Show when={hasLinkError()}>
- <EmailPermissionsBanner />
- </Show>
- <div
- class="relative grow min-h-1 flex max-sm:flex-col flex-row size-full"
- classList={{
- 'pointer-events-none opacity-10': hasLinkError(),
- }}
- >
+ <div class="relative grow min-h-1 flex max-sm:flex-col flex-row size-full">
<Suspense>
<SoupViewFileDropzone>
<SoupViewList
diff --git a/js/app/packages/core/component/AI/component/McpSetupCards.tsx b/js/app/packages/core/component/AI/component/McpSetupCards.tsx
index 9047aac747..52fb117e49 100644
--- a/js/app/packages/core/component/AI/component/McpSetupCards.tsx
+++ b/js/app/packages/core/component/AI/component/McpSetupCards.tsx
@@ -19,7 +19,7 @@ function CollapsibleCard(props: {
copiedKey: () => string | null;
onCopy: (key: string, text: string) => void;
}) {
- const [expanded, setExpanded] = createSignal(true);
+ const [expanded, setExpanded] = createSignal(false);
const isCopied = () => props.copiedKey() === props.copyKey;
return (
diff --git a/js/app/packages/design/empty-state-ai.svg b/js/app/packages/design/empty-state-ai.svg
new file mode 100644
index 0000000000..92e56cd4f6
--- /dev/null
+++ b/js/app/packages/design/empty-state-ai.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="100%" height="100%" fill="none" stroke="currentColor" stroke-width="0.5"><g transform="translate(5.865 13.85)"><g fill="currentColor" stroke="none"><path d="M30.7.9c-10.48,6.05-12.91,5.88-18.76,2.5-.4-.23-1.05-.23-1.45,0s-.4.6,0,.84c5.85,3.37,6.15,4.78-4.33,10.83-.4.23-.4.6,0,.84s1.05.23,1.45,0c10.48-6.05,12.91-5.88,18.76-2.5.4.23,1.05.23,1.45,0s.4-.6,0-.84c-5.85-3.38-6.15-4.78,4.33-10.83.4-.23.4-.6,0-.84s-1.05-.23-1.45,0ZM21.69,9.86c-2.05.21-3.01.21-5.06,0-.36-1.18-.36-1.74,0-2.92,2.05-.21,3.01-.21,5.06,0,.36,1.18.36,1.74,0,2.92Z"/><path d="M19.88,7.98c.4.23.4.6,0,.84s-1.05.23-1.45,0-.4-.6,0-.84,1.05-.23,1.45,0Z"/></g><g opacity="0.5"><path d="M36.89,10.4l-19.05,11c-1.67.97-4.6.85-6.53-.27L1.85,15.67c-1.93-1.12-2.14-2.81-.47-3.77L20.43.9c1.67-.97,4.6-.85,6.53.27l9.45,5.46c1.93,1.12,2.14,2.81.47,3.77Z" stroke-dasharray="2.48 2.48" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>