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.

chore(web): unship the Getting Started page (#7550)

Jacob Beckerman2833bd8e1a15
diff --git a/apps/web/src/components/app/app-sidebar/sidebar.tsx b/apps/web/src/components/app/app-sidebar/sidebar.tsx
index fa7650cc2c..1646fdf572 100644
--- a/apps/web/src/components/app/app-sidebar/sidebar.tsx
+++ b/apps/web/src/components/app/app-sidebar/sidebar.tsx
@@ -4,7 +4,6 @@ import { useActivityFeedFlag } from '@app/features/activity/use-activity-feed-fl
import { useCalendarUiFlag } from '@app/features/calendar/hooks/use-calendar-ui-flag';
import { calendarPath } from '@app/features/calendar-view/calendar-url';
import { CALENDAR_VIEW_ID } from '@app/features/calendar-view/types';
-import { useGettingStartedEnabled } from '@app/features/getting-started/account-gate';
import { requestSearchFocus } from '@app/features/next-soup/soup-view/search-controllers';
import { useRecentViewFlag } from '@app/features/next-soup/use-recent-view-flag';
import {
@@ -39,7 +38,6 @@ import { activateClosestDOMScope } from '@core/hotkey/utils';
import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { ContextMenu } from '@kobalte/core/context-menu';
import BellIcon from '@phosphor/bell.svg';
-import CompassIcon from '@phosphor/compass.svg';
import HomeIcon from '@phosphor/house.svg';
import SearchIcon from '@phosphor/magnifying-glass.svg';
import ActivityIcon from '@phosphor/pulse.svg';
@@ -225,7 +223,6 @@ export const GoToHotkeys = () => {
},
});
- const gettingStartedEnabled = useGettingStartedEnabled();
const calendarUiEnabled = useCalendarUiFlag();
const activityFeedEnabled = useActivityFeedFlag();
const recentViewEnabled = useRecentViewFlag();
@@ -233,7 +230,6 @@ export const GoToHotkeys = () => {
const reviews = useFeatureFlag(enableTasksReviews);
const links = createMemo((): SidebarItem[] =>
buildSidebarLinks(
- gettingStartedEnabled(),
calendarUiEnabled(),
activityFeedEnabled(),
recentViewEnabled(),
@@ -382,15 +378,6 @@ const COMPANIES_LINK: SidebarItem = {
hotkeyToken: TOKENS.sidebar.goTo.companies,
};
-const GETTING_STARTED_LINK: SidebarItem = {
- id: 'getting-started',
- label: 'Getting Started',
- href: '/getting-started',
- icon: CompassIcon,
- hotkey: 's',
- hotkeyToken: TOKENS.sidebar.goTo.gettingStarted,
-};
-
const ACTIVITY_LINK: SidebarItem = {
id: 'activity',
label: 'Activity',
@@ -421,16 +408,12 @@ const REVIEWS_LINK: SidebarItem = {
};
/**
- * Assemble the ordered sidebar link list: the static links plus Getting
- * started and the flag-gated Recent, Activity, Calendar, Reminders, Calls, Reviews, and CRM
+ * Assemble the ordered sidebar link list: the static links plus the
+ * flag-gated Recent, Activity, Calendar, Reminders, Calls, Reviews, and CRM
* entries in their correct positions.
* Call from a reactive context — it reads `ENABLE_CALLS` / `isFeatureEnabled(enableCrm)`.
- * `showGettingStarted` is the account-age gate (`useGettingStartedEnabled`),
- * passed in because this runs outside a component; when false the link is
- * fully absent — `g s` hotkey and command menu entry.
*/
const buildSidebarLinks = (
- showGettingStarted: boolean,
showCalendar: boolean,
showActivity: boolean,
showRecent: boolean,
@@ -448,12 +431,8 @@ const buildSidebarLinks = (
links = [...links.slice(0, idx + 1), link, ...links.slice(idx + 1)];
};
- // Home leads; Getting started, Recent, and Activity follow it in that order.
+ // Home leads; Recent and Activity follow it in that order.
let anchorId = 'home';
- if (showGettingStarted) {
- insertAfter(anchorId, GETTING_STARTED_LINK);
- anchorId = 'getting-started';
- }
if (showRecent) {
insertAfter(anchorId, RECENT_LINK);
anchorId = 'recent';
diff --git a/apps/web/src/components/app/split-layout/componentRegistry.tsx b/apps/web/src/components/app/split-layout/componentRegistry.tsx
index 7e3ea25936..5b8542f43d 100644
--- a/apps/web/src/components/app/split-layout/componentRegistry.tsx
+++ b/apps/web/src/components/app/split-layout/componentRegistry.tsx
@@ -66,10 +66,6 @@ const MailRouteView = lazyNamed(
() => import('@app/features/email-view/route-views'),
'MailRouteView'
);
-const GettingStartedRouteView = lazyNamed(
- () => import('@app/features/getting-started/route-views'),
- 'GettingStartedRouteView'
-);
const CallsRouteView = lazyNamed(
() => import('@app/features/next-soup/route-views'),
'CallsRouteView'
@@ -235,6 +231,12 @@ registerComponent('unified-list', () => (
<RedirectSplit to={{ type: 'component', id: 'home' }} />
));
+// Retired Getting Started checklist: restored layouts and old
+// `/component/getting-started` links land on Home.
+registerComponent('getting-started', () => (
+ <RedirectSplit to={{ type: 'component', id: 'home' }} />
+));
+
function DisabledProjectsRoute() {
const panel = useSplitPanelOrThrow();
onMount(() => {
@@ -308,7 +310,6 @@ registerComponent(
() => <HomeRouteView />,
() => composableLayout(true)
);
-registerComponent('getting-started', () => <GettingStartedRouteView />);
registerComponent(NOT_FOUND_ROUTE_ID, () => <NotFound />);
registerComponent('recent', () => <RecentRouteView />);
registerComponent('activity', () => <ActivityRouteView />);
diff --git a/apps/web/src/components/app/split-layout/split-router/legacy-route.test.ts b/apps/web/src/components/app/split-layout/split-router/legacy-route.test.ts
new file mode 100644
index 0000000000..782fb18daa
--- /dev/null
+++ b/apps/web/src/components/app/split-layout/split-router/legacy-route.test.ts
@@ -0,0 +1,39 @@
+import { createRoutesManifest, type SplitRoutes } from '@app/lib/split-router';
+import {
+ appRoute,
+ homeSplitRoute,
+ legacyContentRoute,
+ notFoundRoute,
+} from '@app/routes/routes';
+import { describe, expect, it, vi } from 'vitest';
+import { upgradeLegacyPath } from './legacy-route';
+
+vi.mock('@components/app/split-layout/componentRegistry', () => ({
+ resolveComponent: vi.fn(() => ({ type: 'mock-component' })),
+}));
+vi.mock('@service-storage/websocket', () => ({
+ storageWS: { reconnectIfDisconnected: vi.fn() },
+ createWebSocketJob: vi.fn(),
+}));
+vi.mock('@service-connection/websocket', () => ({
+ ws: { addEventListener: vi.fn(), send: vi.fn() },
+ state: () => 'closed',
+ createConnectionBlockWebsocketEffect: vi.fn(),
+ createConnectionWebsocketEffect: vi.fn(),
+}));
+
+const routes = createRoutesManifest({
+ definitions: [
+ {
+ ...appRoute,
+ children: [homeSplitRoute, legacyContentRoute, notFoundRoute],
+ },
+ ],
+ defaultRoute: () => ({ matches: [{ id: 'view-home', params: {} }] }),
+} satisfies SplitRoutes);
+
+describe('upgradeLegacyPath', () => {
+ it('sends the retired Getting Started path to Home', () => {
+ expect(upgradeLegacyPath(routes, '/getting-started')).toBe('/home');
+ });
+});
diff --git a/apps/web/src/components/app/split-layout/split-router/legacy-route.ts b/apps/web/src/components/app/split-layout/split-router/legacy-route.ts
index 82f40983b7..7fd3f3d966 100644
--- a/apps/web/src/components/app/split-layout/split-router/legacy-route.ts
+++ b/apps/web/src/components/app/split-layout/split-router/legacy-route.ts
@@ -142,6 +142,11 @@ export function handleLegacySplitPath(
return [{ route: paneRoute({ id: 'drive', params: {} }) }];
}
+ // The retired Getting Started checklist's own path.
+ if (segments.length === 1 && segments[0] === 'getting-started') {
+ return [{ route: paneRoute({ id: 'view-home', params: {} }) }];
+ }
+
if (
context.matchedRouteId &&
context.matchedRouteId !== 'settings' &&
diff --git a/apps/web/src/components/app/split-layout/tests/activity-registration.test.tsx b/apps/web/src/components/app/split-layout/tests/activity-registration.test.tsx
index aac0cd08d4..c60f54f41e 100644
--- a/apps/web/src/components/app/split-layout/tests/activity-registration.test.tsx
+++ b/apps/web/src/components/app/split-layout/tests/activity-registration.test.tsx
@@ -105,7 +105,6 @@ vi.mock('@app/features/email-view/email-view', () => ({}));
vi.mock('@app/features/email-view/components/EmailDetailView', () => ({
EmailDetailRouteView: () => null,
}));
-vi.mock('@app/features/getting-started', () => ({}));
vi.mock('@app/features/home/home-view', () => ({
HomeDetailRouteView: () => null,
HomeCalendarRouteView: () => null,
diff --git a/apps/web/src/features/getting-started/account-gate.ts b/apps/web/src/features/getting-started/account-gate.ts
deleted file mode 100644
index 0e91e35be8..0000000000
--- a/apps/web/src/features/getting-started/account-gate.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { useUserInfo } from '@core/context/user';
-import type { Accessor } from 'solid-js';
-
-/**
- * Accounts created on or after this date get the Getting Started experience.
- * Older accounts never see it — the checklist assumes the fresh-signup
- * starter content (support channel, how-to guide, starter tasks). Accounts
- * that predate creation-time tracking have no `createdAt` at all and are
- * treated as old.
- */
-export const GETTING_STARTED_MIN_ACCOUNT_CREATED = new Date(
- '2026-07-28T00:00:00Z'
-);
-
-/**
- * Whether the current account is new enough for the Getting Started
- * experience. `false` while user info is still loading.
- */
-export function useGettingStartedEnabled(): Accessor<boolean> {
- const userInfo = useUserInfo();
- return () => {
- const createdAt = userInfo()?.createdAt;
- if (!createdAt) return false;
- return new Date(createdAt) >= GETTING_STARTED_MIN_ACCOUNT_CREATED;
- };
-}
diff --git a/apps/web/src/features/getting-started/agent-examples.ts b/apps/web/src/features/getting-started/agent-examples.ts
deleted file mode 100644
index 49d81fb207..0000000000
--- a/apps/web/src/features/getting-started/agent-examples.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import FileIcon from '@phosphor/file.svg';
-import TaskIcon from '@phosphor/list-checks.svg';
-import TagIcon from '@phosphor/tag.svg';
-import type { Component } from 'solid-js';
-
-/**
- * One "put the agent to work" example: the row's copy plus the prompt it
- * sends. Kept as plain data — these are edited for wording far more often
- * than the behavior around them, which is identical for every example (start
- * a chat with the prompt; see `getting-started.tsx`).
- */
-export type AgentExample = {
- id: string;
- icon: Component<{ class?: string }>;
- title: string;
- description: string;
- prompt: string;
-};
-
-/** App links the example prompts ask the agent to include in its reply. */
-const MANAGE_TAGS_LINK = 'macro.com/app/settings/tags';
-const TASKS_LIST_LINK = 'macro.com/app/component/tasks';
-
-export const AGENT_EXAMPLES: AgentExample[] = [
- {
- id: 'example-organize-inbox',
- icon: TagIcon,
- title: 'Auto-organize my inbox',
- description: 'Categorize and tag your recent email',
- prompt: `Categorize and tag recent emails in my inbox. Link me to ${MANAGE_TAGS_LINK} where I can manage all of my tags.`,
- },
- {
- id: 'example-pull-tasks',
- icon: TaskIcon,
- title: 'Pull tasks from inbox',
- description: 'Turn important emails into tasks',
- prompt: `Find my most important recent emails and create tasks from them. Link me to ${TASKS_LIST_LINK} where I can see all of my tasks.`,
- },
- {
- id: 'example-weekly-brief',
- icon: FileIcon,
- title: 'Build weekly brief',
- description: 'Summarize your week with links to sources',
- prompt:
- 'Review my recent emails, documents, and tasks from the past week. Identify key decisions, open questions, blockers, and next steps, then create a concise weekly briefing document with links to the original sources.',
- },
- {
- id: 'example-auto-tag-tasks',
- icon: TagIcon,
- title: 'Auto-tag my tasks',
- description: 'Keep your task list organized automatically',
- prompt: `Review my open tasks and apply helpful tags to organize them. Link me to ${MANAGE_TAGS_LINK} where I can manage all of my tags.`,
- },
-];
diff --git a/apps/web/src/features/getting-started/getting-started-chat.test.ts b/apps/web/src/features/getting-started/getting-started-chat.test.ts
deleted file mode 100644
index edaa3fb6a6..0000000000
--- a/apps/web/src/features/getting-started/getting-started-chat.test.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-import { beforeEach, describe, expect, it, vi } from 'vitest';
-import { createGettingStartedChatOpener } from './getting-started-chat';
-import { createGettingStartedState } from './getting-started-state';
-
-describe('getting started chats', () => {
- beforeEach(() => localStorage.clear());
-
- const setup = (userId = 'user-1') => {
- const state = createGettingStartedState(userId);
- const startChat = vi
- .fn<(prompt: string) => Promise<string | undefined>>()
- .mockResolvedValue('chat-1');
- const openChat = vi.fn();
- const activate = createGettingStartedChatOpener({
- state,
- startChat,
- openChat,
- });
- return { state, startChat, openChat, activate };
- };
-
- it('reopens the saved chat after remounting without resending the prompt', async () => {
- const first = setup();
- await first.activate('example-weekly-brief', 'Build my weekly brief');
- first.state.markCompleted('example-weekly-brief');
- first.state.toggleSection('basics');
-
- const reopened = setup();
- expect(
- await reopened.activate('example-weekly-brief', 'Updated prompt')
- ).toBe(true);
- expect(reopened.startChat).not.toHaveBeenCalled();
- expect(reopened.openChat).toHaveBeenCalledWith('chat-1');
- expect(first.startChat).toHaveBeenCalledExactlyOnceWith(
- 'Build my weekly brief'
- );
- });
-
- it('keeps chats separate for each button and account', async () => {
- const first = setup();
- first.startChat
- .mockResolvedValueOnce('chat-1')
- .mockResolvedValueOnce('chat-2');
- await first.activate('example-weekly-brief', 'Brief');
- await first.activate('example-pull-tasks', 'Tasks');
- await first.activate('example-weekly-brief', 'Brief');
- await first.activate('example-pull-tasks', 'Tasks');
- expect(first.startChat).toHaveBeenCalledTimes(2);
- expect(first.openChat.mock.calls).toEqual([
- ['chat-1'],
- ['chat-2'],
- ['chat-1'],
- ['chat-2'],
- ]);
-
- const other = setup('user-2');
- await other.activate('example-weekly-brief', 'Brief');
- expect(other.startChat).toHaveBeenCalledOnce();
- });
-
- it('ignores repeated clicks while creating the chat', async () => {
- const { startChat, openChat, activate } = setup();
- let finish!: (chatId: string) => void;
- startChat.mockReturnValueOnce(
- new Promise((resolve) => {
- finish = resolve;
- })
- );
- const first = activate('example-weekly-brief', 'Brief');
- expect(await activate('example-weekly-brief', 'Brief')).toBe(false);
- finish('chat-1');
- expect(await first).toBe(true);
- expect(await activate('example-weekly-brief', 'Brief')).toBe(true);
- expect(startChat).toHaveBeenCalledOnce();
- expect(openChat.mock.calls).toEqual([['chat-1'], ['chat-1']]);
- });
-
- it('allows retrying failed creation', async () => {
- const { state, startChat, activate } = setup();
- startChat.mockResolvedValueOnce(undefined);
- expect(await activate('example-weekly-brief', 'Brief')).toBe(false);
- expect(state.chatIdForAction('example-weekly-brief')).toBeUndefined();
- expect(await activate('example-weekly-brief', 'Brief')).toBe(true);
- expect(startChat).toHaveBeenCalledTimes(2);
- });
-
- it('clears the pending guard if creation throws', async () => {
- const { startChat, activate } = setup();
- startChat.mockRejectedValueOnce(new Error('Network failure'));
- expect(await activate('example-weekly-brief', 'Brief')).toBe(false);
- expect(await activate('example-weekly-brief', 'Brief')).toBe(true);
- });
-});
diff --git a/apps/web/src/features/getting-started/getting-started-chat.ts b/apps/web/src/features/getting-started/getting-started-chat.ts
deleted file mode 100644
index 73f6c14434..0000000000
--- a/apps/web/src/features/getting-started/getting-started-chat.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import type { GettingStartedState } from './getting-started-state';
-
-/** Reopen each example's chat without sending its starter prompt again. */
-export function createGettingStartedChatOpener(options: {
- state: Pick<GettingStartedState, 'chatIdForAction' | 'rememberChat'>;
- startChat: (prompt: string) => Promise<string | undefined>;
- openChat: (chatId: string) => void;
-}) {
- const pending = new Set<string>();
-
- return async (actionId: string, prompt: string): Promise<boolean> => {
- if (pending.has(actionId)) return false;
-
- const existingChatId = options.state.chatIdForAction(actionId);
- if (existingChatId) {
- options.openChat(existingChatId);
- return true;
- }
-
- pending.add(actionId);
- try {
- let chatId: string | undefined;
- try {
- chatId = await options.startChat(prompt);
- } catch {
- return false;
- }
- if (!chatId) return false;
- options.state.rememberChat(actionId, chatId);
- options.openChat(chatId);
- return true;
- } finally {
- pending.delete(actionId);
- }
- };
-}
diff --git a/apps/web/src/features/getting-started/getting-started-rows.tsx b/apps/web/src/features/getting-started/getting-started-rows.tsx
deleted file mode 100644
index 2973c50001..0000000000
--- a/apps/web/src/features/getting-started/getting-started-rows.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import ChevronDownIcon from '@phosphor/caret-down.svg';
-import CheckCircleIcon from '@phosphor/check-circle.svg';
-import { cn, InlineCheckbox } from '@ui';
-import { Show } from 'solid-js';
-import type {
- GettingStartedAction,
- GettingStartedSection,
-} from './getting-started-types';
-
-/**
- * One activating action in the shared home-row style (icon + title, full
- * width), with a trailing checkbox that fills once the action completes. Rows
- * stay clickable when complete.
- *
- * `action.description` is deliberately not rendered for now — we're trying
- * title-only rows. The copy is kept on the action data so it can come back.
- */
-export function ActionRow(props: {
- action: GettingStartedAction;
- complete: boolean;
- onActivate: () => void;
-}) {
- return (
- <button
- type="button"
- class="group flex w-full items-center gap-3.5 rounded-xl border border-edge-muted bg-active px-4 py-3 text-left transition-colors hover:bg-hover"
- onClick={props.onActivate}
- >
- <span class="flex size-7 shrink-0 items-center justify-center rounded-lg bg-surface text-ink-muted">
- <props.action.icon class="size-4" />
- </span>
- <div class="min-w-0 flex-1">
- <div class="text-sm font-medium text-ink">{props.action.title}</div>
- </div>
- <InlineCheckbox checked={props.complete} />
- </button>
- );
-}
-
-/**
- * Section header: title, an `x/n completed` counter that becomes a check mark
- * once every action is done, and a chevron collapse toggle (the whole header
- * toggles).
- */
-export function SectionHeader(props: {
- section: GettingStartedSection;
- collapsed: boolean;
- completed: number;
- total: number;
- onToggle: () => void;
-}) {
- const allComplete = () => props.total > 0 && props.completed >= props.total;
- return (
- <button
- type="button"
- class="group flex w-full items-center justify-between gap-3 px-1 text-left"
- aria-expanded={!props.collapsed}
- onClick={props.onToggle}
- >
- <div class="min-w-0 truncate text-sm font-medium text-ink">
- {props.section.title}
- </div>
- <span class="flex shrink-0 items-center gap-2">
- <Show
- when={allComplete()}
- fallback={
- <span class="text-xs tabular-nums text-ink-extra-muted">
- {props.completed}/{props.total}
- </span>
- }
- >
- <CheckCircleIcon class="size-4 text-accent" />
- </Show>
- <ChevronDownIcon
- class={cn(
- 'size-4 shrink-0 text-ink-extra-muted transition-transform',
- props.collapsed && '-rotate-90'
- )}
- />
- </span>
- </button>
- );
-}
diff --git a/apps/web/src/features/getting-started/getting-started-state.test.ts b/apps/web/src/features/getting-started/getting-started-state.test.ts
deleted file mode 100644
index da3ecf35e2..0000000000
--- a/apps/web/src/features/getting-started/getting-started-state.test.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { describe, expect, it, vi } from 'vitest';
-import { createGettingStartedState } from './getting-started-state';
-import type { GettingStartedStore } from './getting-started-store';
-
-describe('createGettingStartedState', () => {
- it('loads progress eagerly and persists updates for its user', () => {
- const store: GettingStartedStore = {
- load: vi.fn().mockReturnValue({
- completedActionIds: ['set-name'],
- collapsedSectionIds: ['basics'],
- chatIdsByAction: {},
- }),
- save: vi.fn(),
- };
- const state = createGettingStartedState('user-1', store);
-
- expect(state.isPersistedComplete('set-name')).toBe(true);
- expect(state.isCollapsed('basics')).toBe(true);
-
- state.markCompleted('connect-email');
- expect(store.save).toHaveBeenLastCalledWith('user-1', {
- completedActionIds: ['set-name', 'connect-email'],
- collapsedSectionIds: ['basics'],
- chatIdsByAction: {},
- });
-
- state.toggleSection('basics');
- expect(store.save).toHaveBeenLastCalledWith('user-1', {
- completedActionIds: ['set-name', 'connect-email'],
- collapsedSectionIds: [],
- chatIdsByAction: {},
- });
- });
-});
diff --git a/apps/web/src/features/getting-started/getting-started-state.ts b/apps/web/src/features/getting-started/getting-started-state.ts
deleted file mode 100644
index e19d4d3f23..0000000000
--- a/apps/web/src/features/getting-started/getting-started-state.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import { createAssertedContextProvider } from '@core/context/createContext';
-import type { ContextProviderProps } from '@solid-primitives/context';
-import { createSignal } from 'solid-js';
-import {
- type GettingStartedStore,
- localStorageGettingStartedStore,
-} from './getting-started-store';
-
-export type GettingStartedState = ReturnType<typeof createGettingStartedState>;
-
-/**
- * User-scoped, reactive Getting Started progress: which actions the user has
- * completed (by click or observed event) and which sections they collapsed.
- * Derived completions (connection state, name set) layer on top in the
- * runtime and are never persisted here.
- */
-export function createGettingStartedState(
- userId: string,
- store: GettingStartedStore = localStorageGettingStartedStore
-) {
- const snapshot = store.load(userId);
- const [completed, setCompleted] = createSignal<ReadonlySet<string>>(
- new Set(snapshot?.completedActionIds)
- );
- const [collapsed, setCollapsed] = createSignal<ReadonlySet<string>>(
- new Set(snapshot?.collapsedSectionIds)
- );
- const [chatIds, setChatIds] = createSignal<ReadonlyMap<string, string>>(
- new Map(Object.entries(snapshot?.chatIdsByAction ?? {}))
- );
-
- const persist = () => {
- store.save(userId, {
- completedActionIds: [...completed()],
- collapsedSectionIds: [...collapsed()],
- chatIdsByAction: Object.fromEntries(chatIds()),
- });
- };
-
- const markCompleted = (actionId: string) => {
- if (completed().has(actionId)) return;
- setCompleted((previous) => new Set(previous).add(actionId));
- persist();
- };
-
- const toggleSection = (sectionId: string) => {
- setCollapsed((previous) => {
- const next = new Set(previous);
- if (next.has(sectionId)) next.delete(sectionId);
- else next.add(sectionId);
- return next;
- });
- persist();
- };
-
- return {
- chatIdForAction: (actionId: string) => chatIds().get(actionId),
- rememberChat: (actionId: string, chatId: string) => {
- setChatIds((previous) => new Map(previous).set(actionId, chatId));
- persist();
- },
- isPersistedComplete: (actionId: string) => completed().has(actionId),
- markCompleted,
- isCollapsed: (sectionId: string) => collapsed().has(sectionId),
- toggleSection,
- };
-}
-
-type GettingStartedProviderProps = ContextProviderProps & {
- userId: string;
- store?: GettingStartedStore;
-};
-
-export const [GettingStartedProvider, useGettingStartedState] =
- createAssertedContextProvider<
- GettingStartedState,
- GettingStartedProviderProps
- >('GettingStartedState', (props) =>
- createGettingStartedState(props.userId, props.store)
- );
diff --git a/apps/web/src/features/getting-started/getting-started-store.test.ts b/apps/web/src/features/getting-started/getting-started-store.test.ts
deleted file mode 100644
index 7154b69c9c..0000000000
--- a/apps/web/src/features/getting-started/getting-started-store.test.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import { describe, expect, it } from 'vitest';
-import { parseGettingStartedSnapshot } from './getting-started-store';
-
-describe('parseGettingStartedSnapshot', () => {
- it('parses a well-formed snapshot', () => {
- expect(
- parseGettingStartedSnapshot(
- '{"completedActionIds":["set-name"],"collapsedSectionIds":["basics"]}'
- )
- ).toEqual({
- completedActionIds: ['set-name'],
- collapsedSectionIds: ['basics'],
- chatIdsByAction: {},
- });
- });
-
- it('defaults missing fields to empty arrays', () => {
- expect(parseGettingStartedSnapshot('{}')).toEqual({
- completedActionIds: [],
- collapsedSectionIds: [],
- chatIdsByAction: {},
- });
- });
-
- it('drops non-string entries', () => {
- expect(
- parseGettingStartedSnapshot(
- '{"completedActionIds":["set-name",12,null],"collapsedSectionIds":[{}]}'
- )
- ).toEqual({
- completedActionIds: ['set-name'],
- collapsedSectionIds: [],
- chatIdsByAction: {},
- });
- });
-
- it('keeps ids the current config does not know', () => {
- expect(
- parseGettingStartedSnapshot('{"completedActionIds":["renamed-action"]}')
- ).toEqual({
- completedActionIds: ['renamed-action'],
- collapsedSectionIds: [],
- chatIdsByAction: {},
- });
- });
-
- it('returns null for non-object shapes', () => {
- expect(parseGettingStartedSnapshot('["set-name"]')).toBeNull();
- expect(parseGettingStartedSnapshot('"set-name"')).toBeNull();
- expect(parseGettingStartedSnapshot(null)).toBeNull();
- });
-
- it('returns null for malformed JSON', () => {
- expect(parseGettingStartedSnapshot('{')).toBeNull();
- });
-
- it('keeps valid chat mappings and drops invalid chat ids', () => {
- expect(
- parseGettingStartedSnapshot(
- JSON.stringify({
- chatIdsByAction: {
- brief: 'chat-1',
- tasks: 12,
- inbox: null,
- empty: '',
- },
- })
- )?.chatIdsByAction
- ).toEqual({ brief: 'chat-1' });
- });
-
- it.each([null, [], 'chat-1', 12])(
- 'ignores malformed chat mappings: %j',
- (value) => {
- expect(
- parseGettingStartedSnapshot(JSON.stringify({ chatIdsByAction: value }))
- ?.chatIdsByAction
- ).toEqual({});
- }
- );
-});
diff --git a/apps/web/src/features/getting-started/getting-started-store.ts b/apps/web/src/features/getting-started/getting-started-store.ts
deleted file mode 100644
index f2bbe65ee2..0000000000
--- a/apps/web/src/features/getting-started/getting-started-store.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import { createUserScopedStorage } from '@core/util/userScopedStorage';
-
-/** Persisted Getting Started progress. */
-export type GettingStartedSnapshot = {
- /** Actions completed by clicking or by an observed event (not derived state). */
- completedActionIds: string[];
- collapsedSectionIds: string[];
- chatIdsByAction: Record<string, string>;
-};
-
-/** Persistence seam for user-scoped Getting Started progress. */
-export interface GettingStartedStore {
- load(userId: string): GettingStartedSnapshot | null;
- save(userId: string, snapshot: GettingStartedSnapshot): void;
-}
-
-const storage = createUserScopedStorage('macro:getting-started');
-
-function stringArray(value: unknown): string[] {
- if (!Array.isArray(value)) return [];
- return value.filter((item): item is string => typeof item === 'string');
-}
-
-function chatIdsByAction(value: unknown): Record<string, string> {
- if (typeof value !== 'object' || value === null || Array.isArray(value))
- return {};
- return Object.fromEntries(
- Object.entries(value).filter(
- ([, chatId]) => typeof chatId === 'string' && chatId.length > 0
- )
- );
-}
-
-/**
- * Unknown ids are kept: they're inert at render time, and dropping them would
- * erase progress across config renames or a client running older config.
- */
-export function parseGettingStartedSnapshot(
- raw: string | null
-): GettingStartedSnapshot | null {
- if (raw === null) return null;
- try {
- const parsed: unknown = JSON.parse(raw);
- if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))
- return null;
- const record = parsed as Record<string, unknown>;
- return {
- completedActionIds: stringArray(record.completedActionIds),
- collapsedSectionIds: stringArray(record.collapsedSectionIds),
- chatIdsByAction: chatIdsByAction(record.chatIdsByAction),
- };
- } catch {
- return null;
- }
-}
-
-export const localStorageGettingStartedStore: GettingStartedStore = {
- load(userId) {
- return parseGettingStartedSnapshot(storage.read(userId));
- },
- save(userId, snapshot) {
- storage.write(userId, JSON.stringify(snapshot));
- },
-};
diff --git a/apps/web/src/features/getting-started/getting-started-types.ts b/apps/web/src/features/getting-started/getting-started-types.ts
deleted file mode 100644
index f1534c1f0c..0000000000
--- a/apps/web/src/features/getting-started/getting-started-types.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import type { Component } from 'solid-js';
-
-/**
- * One checklist row.
- */
-export type GettingStartedAction = {
- id: string;
- icon: Component<{ class?: string }>;
- title: string;
- description: string;
- /**
- * Run the action's open flow. Return false (or resolve false) when it did
- * not meaningfully activate (failed flow, already-toasted error).
- */
- onActivate: () => void | boolean | Promise<void | boolean>;
- /**
- * Live completion, read reactively from render (read queries/signals
- * synchronously inside). ORed with the persisted set; never persisted
- * itself, so it stays honest when e.g. a tool is disconnected.
- */
- isComplete?: () => boolean;
- /**
- * Register completion observers (createEffect/on, listeners + onCleanup).
- * Runs once at page setup under the page's reactive owner — never create
- * effects inside onActivate.
- */
- observe?: (markComplete: () => void) => void;
- /*
- * Default completion: with neither `isComplete` nor `observe`, a successful
- * onActivate persists completion — "declare no completion condition and
- * clicking it completes it".
- */
-};
-
-export type GettingStartedSection = {
- id: string;
- title: string;
- actions: GettingStartedAction[];
-};
diff --git a/apps/web/src/features/getting-started/getting-started.tsx b/apps/web/src/features/getting-started/getting-started.tsx
deleted file mode 100644
index fdc6f493b6..0000000000
--- a/apps/web/src/features/getting-started/getting-started.tsx
+++ /dev/null
@@ -1,354 +0,0 @@
-import { DOCS_BASE } from '@app/constants/docs-links';
-import { HomeBackfillProgress } from '@app/features/home/home-backfill-progress';
-import { InteractiveOnboardingModal } from '@app/features/tutorial/InteractiveOnboardingModal';
-import { useSplitLayout } from '@components/app/split-layout/layout';
-import type { SplitContent } from '@components/app/split-layout/layoutManager';
-import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';
-import { useHasPaidAccess } from '@core/auth/license';
-import { defaultModelForPlan } from '@core/component/AI/constant';
-import { setPendingSendData } from '@core/component/AI/signal/pendingSend';
-import { deriveChatName } from '@core/component/AI/util/deriveName';
-import { toast } from '@core/component/Toast/Toast';
-import {
- enableChatV3Agents,
- isFeatureEnabled,
-} from '@core/constant/featureFlags';
-import {
- type SettingsTab,
- useSettingsState,
-} from '@core/constant/SettingsState';
-import { useUserId, useUserInfo } from '@core/context/user';
-import { isMobile } from '@core/mobile/isMobile';
-import { setActiveTabId } from '@core/signal/settingsTab';
-import { createChat } from '@core/util/create';
-import BookOpenIcon from '@phosphor/book-open.svg';
-import PaletteIcon from '@phosphor/palette.svg';
-import PlayCircleIcon from '@phosphor/play-circle.svg';
-import PlugsIcon from '@phosphor/plugs.svg';
-import ProfileIcon from '@phosphor/user-circle.svg';
-import { useGithubLinkStatusQuery } from '@queries/auth/github-link';
-import { isRealNamePart, useOwnUserName } from '@queries/auth/user-name-self';
-import { useEmailLinksQuery } from '@queries/email/link';
-import { useMcpServersQuery } from '@queries/mcp-servers';
-import { usePipedreamConnectionsQuery } from '@queries/pipedream-connectors';
-import { useStarterDocsQuery } from '@queries/starter-docs';
-import {
- currentThemeId,
- darkModeTheme,
- lightModeTheme,
- themeMode,
-} from '@theme/signals/themeSignals';
-import { createEffect, createSignal, For, on, onMount, Show } from 'solid-js';
-import { startPendingSession } from '../block-agent/context/pending-session';
-import { AGENT_EXAMPLES } from './agent-examples';
-import { createGettingStartedChatOpener } from './getting-started-chat';
-import { ActionRow, SectionHeader } from './getting-started-rows';
-import {
- GettingStartedProvider,
- useGettingStartedState,
-} from './getting-started-state';
-import type {
- GettingStartedAction,
- GettingStartedSection as GettingStartedSectionConfig,
-} from './getting-started-types';
-
-/** Actions that help new users get started. */
-export function GettingStarted() {
- const userId = useUserId();
-
- return (
- <Show when={userId()} keyed>
- {(id) => (
- <GettingStartedProvider userId={id}>
- <GettingStartedContent />
- </GettingStartedProvider>
- )}
- </Show>
- );
-}
-
-function GettingStartedContent() {
- const panel = useSplitPanelOrThrow();
- const state = useGettingStartedState();
- const { openWithSplit } = useSplitLayout();
- const { openSettingsInSplit } = useSettingsState();
-
- // Poll: MCP OAuth completes in a popup opened from the Connections panel,
- // and if this window never blurs no focus refetch would ever flip the row
- // (see ConnectorsSection).
- const mcpServers = useMcpServersQuery({
- refetchInterval: 4_000,
- neverSuspend: true,
- });
- const pipedreamConnections = usePipedreamConnectionsQuery({
- refetchInterval: 4_000,
- neverSuspend: true,
- });
- const emailLinks = useEmailLinksQuery();
- const githubLink = useGithubLinkStatusQuery();
- const userInfo = useUserInfo();
- const ownUserName = useOwnUserName();
- const starterDocs = useStarterDocsQuery();
- const hasPaidAccess = useHasPaidAccess();
-
- // The interactive tutorial, replayed on demand. Root auto-opens its own copy
- // for first-time users; this one is always a replay, so it never passes
- // isFirstTimeOnboarding.
- const [tutorialOpen, setTutorialOpen] = createSignal(false);
-
- const openContent = (content: SplitContent) => {
- openWithSplit(content, { handle: panel.handle, preferNewSplit: true });
- };
-
- const openSettingsTab = (tab: SettingsTab) => {
- if (isMobile()) {
- // The mobile entry point opens this section in the settings sheet.
- openSettingsInSplit(tab);
- return;
- }
- setActiveTabId(tab);
- // Keep getting started open beside settings when space allows.
- openContent({ type: 'component', id: 'settings' });
- };
-
- const startChat = async (prompt: string): Promise<string | undefined> => {
- if (isFeatureEnabled(enableChatV3Agents))
- return startPendingSession({ prompt });
- const result = await createChat(
- { name: deriveChatName(prompt) },
- { source: 'getting-started' }
- );
- if ('error' in result || !result.chatId) {
- toast.failure('Unable to start chat');
- return undefined;
- }
- // The chat block consumes this on mount and sends immediately. The model
- // must be one this plan may use: a pending send bypasses ChatInput, whose
- // effect would otherwise correct an unavailable model, and the backend
- // rejects premium models for free users with a 403 (surfaced as a
- // paywall, with the send silently dropped).
- setPendingSendData({
- content: prompt,
- attachments: [],
- model: defaultModelForPlan(hasPaidAccess()),
- });
- return result.chatId;
- };
-
- const openChatPrompt = createGettingStartedChatOpener({
- state: {
- chatIdForAction: (actionId) =>
- state.chatIdForAction(
- isFeatureEnabled(enableChatV3Agents) ? `agent:${actionId}` : actionId
- ),
- rememberChat: (actionId, id) =>
- state.rememberChat(
- isFeatureEnabled(enableChatV3Agents) ? `agent:${actionId}` : actionId,
- id
- ),
- },
- startChat,
- openChat: (id) =>
- openContent({
- type: isFeatureEnabled(enableChatV3Agents) ? 'agent' : 'chat',
- id,
- }),
- });
-
- /**
- * The deterministic id of the how-to guide seeded at signup. Undefined
- * while the query is in flight; gated on isSuccess so a render-time read
- * can't suspend the page.
- */
- const howToGuideId = () =>
- starterDocs.isSuccess ? starterDocs.data.howToGuideId : undefined;
-
- const sections: GettingStartedSectionConfig[] = [
- {
- id: 'connect-tools',
- title: 'Connect your tools',
- actions: [
- {
- id: 'connect-tools',
- icon: PlugsIcon,
- title: 'Connect your tools',
- description: 'Link your inbox, GitHub, Linear, Notion & more',
- onActivate: () => openSettingsTab('Connected'),
- // Any real connection counts: a second inbox (onboarding links the
- // first), the GitHub account link, or any authenticated MCP server.
- isComplete: () =>
- (emailLinks.data?.links.length ?? 0) > 1 ||
- githubLink.data?.status === 'linked' ||
- (pipedreamConnections.data ?? []).length > 0 ||
- (mcpServers.data ?? []).some((server) => server.authenticated),
- },
- ],
- },
- {
- id: 'basics',
- title: 'Set up your account',
- actions: [
- {
- id: 'play-tutorial',
- icon: PlayCircleIcon,
- title: 'Play the Macro tutorial',
- description: "Take a quick tour of Macro's core features",
- onActivate: () => setTutorialOpen(true),
- },
- {
- id: 'how-to-guide',
- icon: BookOpenIcon,
- title: 'Macro how to guide',
- description: 'Learn about how Macro works',
- // Falls back to the public docs site when the id can't be resolved.
- onActivate: () => {
- const documentId = howToGuideId();
- if (!documentId) {
- window.open(DOCS_BASE, '_blank', 'noopener,noreferrer');
- return;
- }
- openContent({ type: 'md', id: documentId });
- },
- },
- {
- id: 'set-name',
- icon: ProfileIcon,
- title: 'Set your name & profile picture',
- description: 'Introduce yourself in Account settings',
- onActivate: () => openSettingsTab('Account'),
- // The editable first/last name (what Account settings writes); the
- // legacy identity-provider display name also counts.
- isComplete: () =>
- isRealNamePart(ownUserName()?.first_name) ||
- isRealNamePart(ownUserName()?.last_name) ||
- Boolean(userInfo()?.name?.trim()),
- },
- {
- id: 'choose-theme',
- icon: PaletteIcon,
- title: 'Choose your theme',
- description: 'Light, dark, or completely custom',
- onActivate: () => openSettingsTab('Appearance'),
- // Any theme-picker interaction while the page is mounted; defer
- // skips the mount value.
- observe: (markComplete) =>
- createEffect(
- on(
- [currentThemeId, themeMode, lightModeTheme, darkModeTheme],
- markComplete,
- { defer: true }
- )
- ),
- },
- ],
- },
- {
- id: 'agent-examples',
- title: "Put Macro's agent to work",
- actions: AGENT_EXAMPLES.map((example) => ({
- id: example.id,
- icon: example.icon,
- title: example.title,
- description: example.description,
- onActivate: () => openChatPrompt(example.id, example.prompt),
- })),
- },
- ];
-
- // Register per-action completion observers, once, under this component's
- // reactive owner. No persisted-completion guard: the store loads async and
- // markCompleted dedupes.
- for (const action of sections.flatMap((section) => section.actions)) {
- action.observe?.(() => state.markCompleted(action.id));
- }
-
- const activate = async (action: GettingStartedAction) => {
- const result = await action.onActivate();
- // Default rule: an action declaring no live/observed completion source
- // completes on successful activation.
- if (result !== false && !action.isComplete && !action.observe) {
- state.markCompleted(action.id);
- }
- };
-
- const isComplete = (action: GettingStartedAction): boolean =>
- (action.isComplete?.() ?? false) || state.isPersistedComplete(action.id);
-
- const sectionProgress = (section: GettingStartedSectionConfig) => ({
- completed: section.actions.filter(isComplete).length,
- total: section.actions.length,
- });
-
- onMount(() => {
- panel.handle.setDisplayName('Getting started');
- });
-
- return (
- <main class="relative flex h-full flex-col bg-surface">
- <div class="min-h-0 flex-1 overflow-y-auto">
- <div class="mx-auto flex w-full max-w-3xl flex-col gap-6 px-4 pb-6 pt-6">
- <header class="px-1">
- <h1 class="text-xl font-semibold text-ink">Getting Started</h1>
- <p class="text-sm text-ink-muted">
- A few actions to get the most out of Macro.
- </p>
- </header>
- {/* Renders nothing once no inbox is importing. */}
- <HomeBackfillProgress />
- <For each={sections}>
- {(section) => (
- <GettingStartedSection
- section={section}
- activate={activate}
- isComplete={isComplete}
- sectionProgress={sectionProgress}
- />
- )}
- </For>
- </div>
- </div>
- <InteractiveOnboardingModal
- open={tutorialOpen()}
- onOpenChange={setTutorialOpen}
- />
- </main>
- );
-}
-
-function GettingStartedSection(props: {
- section: GettingStartedSectionConfig;
- activate: (action: GettingStartedAction) => Promise<void>;
- isComplete: (action: GettingStartedAction) => boolean;
- sectionProgress: (section: GettingStartedSectionConfig) => {
- completed: number;
- total: number;
- };
-}) {
- const state = useGettingStartedState();
- const progress = () => props.sectionProgress(props.section);
-
- return (
- <section>
- <SectionHeader
- section={props.section}
- collapsed={state.isCollapsed(props.section.id)}
- completed={progress().completed}
- total={progress().total}
- onToggle={() => state.toggleSection(props.section.id)}
- />
- <Show when={!state.isCollapsed(props.section.id)}>
- <div class="mt-2 flex flex-col gap-2">
- <For each={props.section.actions}>
- {(action) => (
- <ActionRow
- action={action}
- complete={props.isComplete(action)}
- onActivate={() => void props.activate(action)}
- />
- )}
- </For>
- </div>
- </Show>
- </section>
- );
-}
diff --git a/apps/web/src/features/getting-started/index.ts b/apps/web/src/features/getting-started/index.ts
deleted file mode 100644
index 784cf3feae..0000000000
--- a/apps/web/src/features/getting-started/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { GettingStarted } from './getting-started';
diff --git a/apps/web/src/features/getting-started/route-views.tsx b/apps/web/src/features/getting-started/route-views.tsx
deleted file mode 100644
index 1eccc8d3ff..0000000000
--- a/apps/web/src/features/getting-started/route-views.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import {
- usePageViewTracking,
- withAuth,
-} from '@components/app/split-layout/split-router/app-route-shell';
-import { lazy } from 'solid-js';
-
-const GettingStarted = lazy(async () => ({
- default: (await import('.')).GettingStarted,
-}));
-
-export const GettingStartedRouteView = withAuth(() => {
- usePageViewTracking('getting-started');
- return <GettingStarted />;
-});
diff --git a/apps/web/src/features/home/components/HomeChatStart.test.tsx b/apps/web/src/features/home/components/HomeChatStart.test.tsx
index acea03a41c..77da2b719a 100644
--- a/apps/web/src/features/home/components/HomeChatStart.test.tsx
+++ b/apps/web/src/features/home/components/HomeChatStart.test.tsx
@@ -1,7 +1,6 @@
import { cleanup, render, screen } from '@solidjs/testing-library';
import type { JSX } from 'solid-js';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-import { HomePreferencesProvider } from '../home-prefs';
import { HomeChatStart } from './HomeChatStart';
type ChildrenProps = { children?: JSX.Element };
@@ -45,9 +44,6 @@ vi.mock('@core/component/AI/context', () => ({
vi.mock('../home-chat-input', () => ({
HomeChatInput: () => <div data-testid="home-chat-input" />,
}));
-vi.mock('../home-getting-started-link', () => ({
- HomeGettingStartedLink: () => <div data-testid="getting-started-link" />,
-}));
vi.mock('./home-recommended-actions', () => ({
HomeRecommendedActions: () => <div data-testid="home-suggestions" />,
}));
@@ -60,11 +56,7 @@ beforeEach(() => {
afterEach(cleanup);
function renderHome() {
- return render(() => (
- <HomePreferencesProvider userId={() => 'user-1'}>
- <HomeChatStart />
- </HomePreferencesProvider>
- ));
+ return render(() => <HomeChatStart />);
}
describe('Home agent composer alignment', () => {
diff --git a/apps/web/src/features/home/components/HomeChatStart.tsx b/apps/web/src/features/home/components/HomeChatStart.tsx
index 322592c6a0..caad996ff7 100644
--- a/apps/web/src/features/home/components/HomeChatStart.tsx
+++ b/apps/web/src/features/home/components/HomeChatStart.tsx
@@ -10,15 +10,12 @@ import { ChatInputProvider } from '@core/component/AI/context';
import { enableChatV3Agents } from '@core/constant/featureFlags';
import { createEffect, Show } from 'solid-js';
import { HomeChatInput } from '../home-chat-input';
-import { HomeGettingStartedLink } from '../home-getting-started-link';
-import { useHomePreferences } from '../home-prefs';
import { HomeRecommendedActions } from './home-recommended-actions';
/** Desktop Home's idle pane uses the single-line chat composer and send flow. */
export function HomeChatStart() {
const shell = useViewShell();
const agents = useFeatureFlag(enableChatV3Agents);
- const preferences = useHomePreferences();
const showHomeTopBar = () =>
shell.aside.isCollapsed() || shell.aside.isOverlay();
// The next load's boot shell draws this greeting and composer layout.
@@ -74,7 +71,6 @@ export function HomeChatStart() {
autoFocusOnMount={false}
/>
<div class="min-h-0 min-w-0 pb-8">
- <HomeGettingStartedLink preferences={preferences} />
<HomeRecommendedActions />
</div>
</div>
diff --git a/apps/web/src/features/home/home-backfill-progress.tsx b/apps/web/src/features/home/home-backfill-progress.tsx
deleted file mode 100644
index 64343629f1..0000000000
--- a/apps/web/src/features/home/home-backfill-progress.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import ArrowsClockwiseIcon from '@phosphor-icons/core/regular/arrows-clockwise.svg?component-solid';
-import {
- type BackfillProgress,
- getBackfillProgress,
-} from '@queries/email/backfill';
-import { useEmailLinksQuery } from '@queries/email/link';
-import { SyncStatus } from '@service-email/generated/schemas';
-import { createMemo, Match, Show, Switch } from 'solid-js';
-
-/**
- * Dev override: flip to `true` to keep the card on screen (with the
- * indeterminate bar) when no inbox is actually importing, for working on its
- * UI. Real progress data still takes over when present. Leave `false`.
- */
-const FORCE_SHOW_BACKFILL_PROGRESS = false;
-
-/**
- * Slim inbox-import line for the home header. Shows a spinner, label, a thin
- * progress bar, and the count while one or more connected inboxes are
- * backfilling. Renders nothing when nothing is importing.
- */
-export function HomeBackfillProgress() {
- const linksQuery = useEmailLinksQuery();
-
- const active = createMemo<BackfillProgress[]>(() =>
- (linksQuery.data?.links ?? [])
- .map((link) => getBackfillProgress(link.id))
- .filter((p): p is BackfillProgress => p !== undefined && p.total > 0)
- );
-
- const isImporting = () =>
- FORCE_SHOW_BACKFILL_PROGRESS ||
- (linksQuery.data?.links ?? []).some(
- (link) => link.sync_status === SyncStatus.SYNCING
- );
-
- const totals = createMemo(() => {
- const entries = active();
- return {
- completed: entries.reduce((sum, p) => sum + p.completed, 0),
- total: entries.reduce((sum, p) => sum + p.total, 0),
- };
- });
-
- const percent = () => {
- const { completed, total } = totals();
- if (total <= 0) return 0;
- if (completed >= total) return 100;
- return Math.floor((completed / total) * 100);
- };
-
- return (
- <Show when={active().length > 0 || isImporting()}>
- <div class="rounded-xl border border-edge-muted bg-active p-4">
- <div class="flex items-center justify-between gap-3">
- <div class="flex min-w-0 items-center gap-2">
- <ArrowsClockwiseIcon class="size-3.5 shrink-0 animate-spin text-ink-muted" />
- <span class="text-sm text-ink">Importing your inbox</span>
- </div>
- <Show when={active().length > 0}>
- <span class="shrink-0 text-xs tabular-nums text-ink-muted">
- {totals().completed.toLocaleString()} of{' '}
- {totals().total.toLocaleString()} threads
- </span>
- </Show>
- </div>
- <div class="mt-3 h-1 w-full overflow-hidden rounded-full bg-edge-muted">
- <Switch>
- <Match when={active().length > 0}>
- <div
- class="h-full rounded-full bg-ink transition-[width] duration-500 ease-out"
- style={{ width: `${percent()}%` }}
- />
- </Match>
- <Match when={isImporting()}>
- <div class="h-full w-1/3 animate-pulse rounded-full bg-ink-muted" />
- </Match>
- </Switch>
- </div>
- </div>
- </Show>
- );
-}
diff --git a/apps/web/src/features/home/home-getting-started-link.tsx b/apps/web/src/features/home/home-getting-started-link.tsx
deleted file mode 100644
index eab5fe50db..0000000000
--- a/apps/web/src/features/home/home-getting-started-link.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import XIcon from '@phosphor/x.svg';
-import { A } from '@solidjs/router';
-import { Tooltip } from '@ui';
-import { Show } from 'solid-js';
-import { useGettingStartedEnabled } from '../getting-started/account-gate';
-import type { HomePreferences } from './home-prefs';
-
-export function HomeGettingStartedLink(props: {
- preferences: HomePreferences;
-}) {
- const enabled = useGettingStartedEnabled();
-
- return (
- <Show
- when={
- (import.meta.env.DEV || enabled()) &&
- !props.preferences.isDismissed('getting-started-link')
- }
- >
- <div class="mt-2 flex items-center justify-between gap-3 pl-[53.75px] pr-[7.5px] text-xs text-ink-extra-muted">
- <span>
- New to Macro? See the{' '}
- <A
- href="/component/getting-started"
- class="rounded-sm text-ink-muted underline-offset-4 transition-colors hover:text-ink hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
- >
- Getting Started
- </A>
- {' page.'}
- </span>
- <Tooltip label="Dismiss" class="shrink-0">
- <button
- type="button"
- class="flex size-[33.75px] shrink-0 items-center justify-center rounded-full transition-colors hover:bg-hover hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
- aria-label="Dismiss Getting Started link"
- onClick={() => props.preferences.dismiss('getting-started-link')}
- >
- <XIcon class="size-3.5" aria-hidden="true" />
- </button>
- </Tooltip>
- </div>
- </Show>
- );
-}
diff --git a/apps/web/src/features/home/home-prefs-context.test.tsx b/apps/web/src/features/home/home-prefs-context.test.tsx
deleted file mode 100644
index 64a651a2db..0000000000
--- a/apps/web/src/features/home/home-prefs-context.test.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import { cleanup, render, screen } from '@solidjs/testing-library';
-import { batch, createSignal } from 'solid-js';
-import { afterEach, describe, expect, it } from 'vitest';
-import {
- type HomePreferences,
- HomePreferencesProvider,
- useHomePreferences,
-} from './home-prefs';
-
-function mountPreferences(initialUserId = 'user-1') {
- const [userId, setUserId] = createSignal<string | undefined>(initialUserId);
- const consumers: HomePreferences[] = [];
- function Consumer() {
- const preferences = useHomePreferences();
- consumers.push(preferences);
- return (
- <span>
- {preferences.isDismissed('getting-started-link') ? 'hidden' : 'visible'}
- </span>
- );
- }
- const view = render(() => (
- <HomePreferencesProvider userId={userId}>
- <Consumer />
- <Consumer />
- </HomePreferencesProvider>
- ));
- return { ...view, consumers, setUserId };
-}
-
-afterEach(() => {
- cleanup();
- localStorage.clear();
-});
-
-describe('shared Home preferences', () => {
- it('updates all mounted consumers immediately', () => {
- const { consumers } = mountPreferences();
- const [first, second] = consumers;
- expect(first).toBe(second);
- expect(screen.getAllByText('visible')).toHaveLength(2);
-
- second.dismiss('getting-started-link');
- expect(screen.getAllByText('hidden')).toHaveLength(2);
- expect(
- JSON.parse(localStorage.getItem('macro:home:dismissed:user-1') ?? '[]')
- ).toEqual(['getting-started-link']);
-
- first.restore('getting-started-link');
- expect(screen.getAllByText('visible')).toHaveLength(2);
- expect(localStorage.getItem('macro:home:dismissed:user-1')).toBe('[]');
- });
-
- it('keeps dismissals isolated when users change, including same-turn writes', () => {
- localStorage.setItem('macro:home:dismissed:user-2', '[]');
- const { consumers, setUserId } = mountPreferences();
- const [preferences] = consumers;
- preferences.dismiss('getting-started-link');
- expect(screen.getAllByText('hidden')).toHaveLength(2);
-
- batch(() => {
- setUserId('user-2');
- preferences.dismiss('getting-started-link');
- });
- expect(screen.getAllByText('hidden')).toHaveLength(2);
- expect(
- JSON.parse(localStorage.getItem('macro:home:dismissed:user-2') ?? '[]')
- ).toEqual(['getting-started-link']);
-
- setUserId(undefined);
- expect(preferences.isDismissed('getting-started-link')).toBe(false);
- preferences.dismiss('getting-started-link');
- setUserId('user-1');
- expect(screen.getAllByText('hidden')).toHaveLength(2);
- expect(localStorage.getItem('macro:home:dismissed:user-1')).toBe(
- '["getting-started-link"]'
- );
- });
-
- it('restores persisted dismissals when the provider remounts', () => {
- const first = mountPreferences();
- first.consumers[0].dismiss('getting-started-link');
- first.unmount();
-
- mountPreferences();
- expect(screen.getAllByText('hidden')).toHaveLength(2);
- });
-});
diff --git a/apps/web/src/features/home/home-prefs.test.ts b/apps/web/src/features/home/home-prefs.test.ts
deleted file mode 100644
index 2030d699b2..0000000000
--- a/apps/web/src/features/home/home-prefs.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { describe, expect, it } from 'vitest';
-import { parseDismissedCards } from './home-prefs';
-
-describe('parseDismissedCards', () => {
- it('accepts known home cards', () => {
- expect(parseDismissedCards('["getting-started-link"]')).toEqual([
- 'getting-started-link',
- ]);
- });
-
- it('drops unknown and non-string entries', () => {
- expect(
- parseDismissedCards('["getting-started-link","examples","setup",12]')
- ).toEqual(['getting-started-link']);
- });
-
- it('returns empty for a non-array shape', () => {
- expect(parseDismissedCards('{}')).toEqual([]);
- });
-
- it('returns empty for malformed JSON', () => {
- expect(parseDismissedCards('{')).toEqual([]);
- });
-});
diff --git a/apps/web/src/features/home/home-prefs.ts b/apps/web/src/features/home/home-prefs.ts
deleted file mode 100644
index 44de047243..0000000000
--- a/apps/web/src/features/home/home-prefs.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { createAssertedContextProvider } from '@core/context/createContext';
-import { createUserScopedStorage } from '@core/util/userScopedStorage';
-import type { ContextProviderProps } from '@solid-primitives/context';
-import { type Accessor, createMemo, createSignal } from 'solid-js';
-
-/** Dismissible home surfaces. Dismissals persist in localStorage. */
-export type HomeCard = 'getting-started-link';
-
-const storage = createUserScopedStorage('macro:home:dismissed');
-const HOME_CARDS: readonly HomeCard[] = ['getting-started-link'];
-
-export function parseDismissedCards(raw: string | null): HomeCard[] {
- if (raw === null) return [];
- try {
- const parsed: unknown = JSON.parse(raw);
- if (!Array.isArray(parsed)) return [];
- return parsed.filter(
- (card): card is HomeCard =>
- typeof card === 'string' && HOME_CARDS.includes(card as HomeCard)
- );
- } catch {
- return [];
- }
-}
-
-function load(userId: string | undefined): HomeCard[] {
- if (!userId) return [];
- return parseDismissedCards(storage.read(userId));
-}
-
-function persist(userId: string | undefined, cards: Set<HomeCard>): void {
- if (!userId) return;
- storage.write(userId, JSON.stringify([...cards]));
-}
-
-export type HomePreferences = ReturnType<typeof createHomePreferences>;
-
-/** User-scoped, reactive dismissal preferences for the home surface. */
-export function createHomePreferences(userId: Accessor<string | undefined>) {
- const state = createMemo(() => {
- const id = userId();
- const [dismissed, setDismissed] = createSignal(new Set(load(id)));
-
- const update = (card: HomeCard, shouldDismiss: boolean) => {
- setDismissed((previous) => {
- if (previous.has(card) === shouldDismiss) return previous;
- const next = new Set(previous);
- if (shouldDismiss) next.add(card);
- else next.delete(card);
- persist(id, next);
- return next;
- });
- };
-
- return { dismissed, update };
- });
-
- return {
- isDismissed: (card: HomeCard) => state().dismissed().has(card),
- dismiss: (card: HomeCard) => state().update(card, true),
- restore: (card: HomeCard) => state().update(card, false),
- };
-}
-
-/** One preference instance shared by every Home surface in the app. */
-export const [HomePreferencesProvider, useHomePreferences] =
- createAssertedContextProvider<
- HomePreferences,
- ContextProviderProps & { userId: Accessor<string | undefined> }
- >('HomePreferences', (props) => createHomePreferences(props.userId));
diff --git a/apps/web/src/features/settings/Account.tsx b/apps/web/src/features/settings/Account.tsx
index 0a59f2f07c..acee8d72bf 100644
--- a/apps/web/src/features/settings/Account.tsx
+++ b/apps/web/src/features/settings/Account.tsx
@@ -330,8 +330,7 @@ export function Account() {
const [isDeleting, setIsDeleting] = createSignal(false);
// The shared own-name cache entry (the one saveUserName invalidates), so
- // this panel and other readers (e.g. the Getting Started checklist) can't
- // drift.
+ // this panel and other readers can't drift.
const userName = useOwnUserName();
const [updatedFirstName, setUpdatedFirstName] = createSignal<
string | undefined
diff --git a/apps/web/src/lib/core/hotkey/tokens.ts b/apps/web/src/lib/core/hotkey/tokens.ts
index 31110ef053..664fa6f61e 100644
--- a/apps/web/src/lib/core/hotkey/tokens.ts
+++ b/apps/web/src/lib/core/hotkey/tokens.ts
@@ -118,7 +118,6 @@ export const TOKENS = {
goToLeader: 'sidebar.goToLeader',
goTo: {
home: 'sidebar.goTo.home',
- gettingStarted: 'sidebar.goTo.gettingStarted',
recent: 'sidebar.goTo.recent',
activity: 'sidebar.goTo.activity',
calendar: 'sidebar.goTo.calendar',
diff --git a/apps/web/src/lib/queries/auth/user-name-self.ts b/apps/web/src/lib/queries/auth/user-name-self.ts
index 9b3bafc039..42b4a5a7fe 100644
--- a/apps/web/src/lib/queries/auth/user-name-self.ts
+++ b/apps/web/src/lib/queries/auth/user-name-self.ts
@@ -42,8 +42,8 @@ export function useOwnUserName(): Accessor<UserName | undefined> {
/**
* Call after writing the name (putUserName). The write and every reader live
* in the same tab, so invalidating here is what flips dependent surfaces —
- * e.g. the Getting Started checklist beside a settings Viewer, which would
- * otherwise have to poll.
+ * e.g. the sidebar name beside a settings Viewer, which would otherwise have
+ * to poll.
*/
export function invalidateOwnUserName() {
return queryClient.invalidateQueries({
diff --git a/apps/web/src/lib/queries/starter-docs.ts b/apps/web/src/lib/queries/starter-docs.ts
deleted file mode 100644
index dc2221fc31..0000000000
--- a/apps/web/src/lib/queries/starter-docs.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { throwOnErr } from '@core/util/result';
-import { storageServiceClient } from '@service-storage/client';
-import { useQuery } from '@tanstack/solid-query';
-
-const KEYS = {
- all: ['starterDocs'] as const,
-};
-
-/** Starter docs are seeded once at signup and rarely change. */
-const STARTER_DOCS_STALE_TIME = 5 * 60 * 1000;
-
-/**
- * Ids of the documents seeded for the user at signup. Resolved server-side —
- * clients should never identify a starter doc by name.
- */
-export function useStarterDocsQuery() {
- return useQuery(() => ({
- queryKey: KEYS.all,
- queryFn: async () =>
- throwOnErr(async () => await storageServiceClient.getStarterDocs()),
- staleTime: STARTER_DOCS_STALE_TIME,
- }));
-}
diff --git a/apps/web/src/lib/service-clients/service-storage/client.ts b/apps/web/src/lib/service-clients/service-storage/client.ts
index 1111e07a3e..227753528b 100644
--- a/apps/web/src/lib/service-clients/service-storage/client.ts
+++ b/apps/web/src/lib/service-clients/service-storage/client.ts
@@ -1205,17 +1205,6 @@ export const storageServiceClient = {
}));
},
- /** Ids of the starter documents seeded at signup. */
- async getStarterDocs() {
- return (
- await dssFetch<{
- how_to_guide_id: string;
- }>('/documents/starter_docs')
- ).map((result) => ({
- howToGuideId: result.how_to_guide_id,
- }));
- },
-
async initializeUserDocuments() {
return (
await dssFetch<{ success: boolean }>(
diff --git a/apps/web/src/routes/Root.tsx b/apps/web/src/routes/Root.tsx
index e4f378f1e8..f059378e23 100644
--- a/apps/web/src/routes/Root.tsx
+++ b/apps/web/src/routes/Root.tsx
@@ -1,6 +1,5 @@
import { ROUTER_BASE, ROUTER_BASE_CONCAT } from '@app/constants/routerBase';
import { usePendingInviteRedemption } from '@app/features/gtm-invite/usePendingInviteRedemption';
-import { HomePreferencesProvider } from '@app/features/home/home-prefs';
import { GlobalShareInboxConflictDialog } from '@app/features/inbox/ShareInboxConflictDialog';
import { IncomingMeetingInvitationsProvider } from '@app/features/meetings/incoming-meeting-invitations';
import { MeetingSessionProvider } from '@app/features/meetings/meeting-session-provider';
@@ -177,7 +176,6 @@ const ROUTES: RouteDefinition[] = [
];
function ConfiguredGlobalAppStateProvider(props: ParentProps) {
- const userId = useUserId();
// Initialize global notification helpers
const notifInterface = usePlatformNotificationState();
useChatRenameWebsocketSync();
@@ -213,9 +211,7 @@ function ConfiguredGlobalAppStateProvider(props: ParentProps) {
notificationSource={notificationSource}
blockOrchestrator={blockOrchestrator}
>
- <HomePreferencesProvider userId={userId}>
- {props.children}
- </HomePreferencesProvider>
+ {props.children}
</GlobalAppStateProvider>
);
}
diff --git a/apps/web/src/routes/app-router-view.tsx b/apps/web/src/routes/app-router-view.tsx
index dadcf8498d..684c23ba58 100644
--- a/apps/web/src/routes/app-router-view.tsx
+++ b/apps/web/src/routes/app-router-view.tsx
@@ -53,7 +53,6 @@ import {
emailSplitRoute,
emailThreadRoute,
foldersRoute,
- gettingStartedRoute,
homeCalendarRoute,
homeChannelRoute,
homeDocumentRoute,
@@ -160,10 +159,6 @@ const MailRouteView = lazyNamed(
() => import('@app/features/email-view/route-views'),
'MailRouteView'
);
-const GettingStartedRouteView = lazyNamed(
- () => import('@app/features/getting-started/route-views'),
- 'GettingStartedRouteView'
-);
const InviteLinksPortal = lazyNamed(
() => import('@app/features/gtm-invite/InviteLinksPortal'),
'InviteLinksPortal'
@@ -436,10 +431,6 @@ export function AppRouterView() {
component={HomeDetailRouteView}
/>
</Route>
- <Route
- definition={gettingStartedRoute}
- component={GettingStartedRouteView}
- />
<Route definition={recentRoute} component={RecentRouteView} />
<Route definition={activityRoute} component={ActivityRouteView} />
<Route
diff --git a/apps/web/src/routes/routes.ts b/apps/web/src/routes/routes.ts
index da3b09a53c..b2e5c8277e 100644
--- a/apps/web/src/routes/routes.ts
+++ b/apps/web/src/routes/routes.ts
@@ -427,13 +427,6 @@ export const homeSplitRoute = defineRoute({
search: '*' as const,
});
-export const gettingStartedRoute = defineRoute({
- id: 'view-getting-started',
- path: 'getting-started',
- search: '*' as const,
- claim: () => ({ namespace: 'component', id: 'getting-started' }),
-});
-
export const recentRoute = defineRoute({
id: 'view-recent',
path: 'recent',
diff --git a/docs/AGENT_GUIDE/navigation.md b/docs/AGENT_GUIDE/navigation.md
index a5962454a5..c70150afbd 100644
--- a/docs/AGENT_GUIDE/navigation.md
+++ b/docs/AGENT_GUIDE/navigation.md
@@ -443,7 +443,7 @@ Settings opens its own glass sheet with a grouped main page. Select a settings
section, use **Back to settings** to return, or **Close settings** in the top
right to dismiss without changing the underlying app view.
Opening Settings again starts at the grouped main page. In-app actions that
-request a specific section, including Getting Started actions, open that section
+request a specific section open that section
directly in the sheet without replacing the current view or changing its URL.
If a requested section is unavailable, the sheet shows an unavailable message
and a **Back to settings** button that returns to the grouped main page.
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 9f1ae9bd52..88fa2d9735 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -284,13 +284,7 @@ are restored, including before a chat-limit paywall opens. With agents disabled,
the input stays 32px above the vertical center as suggestions load. With agents
enabled, the composer uses the same topbar offset and 24/64 padding as the
Agents new-conversation page so the two inputs share a baseline; suggestions
-still load below it without moving the input. Eligible newer accounts (all
-accounts in development) see “New to Macro? See the **Getting Started** page.” directly
-below the composer, above suggestions. The link opens
-`/app/component/getting-started`; **Dismiss Getting Started link** hides it and
-remembers the dismissal per user in this browser across reloads. Dismissals update
-all open Home panes immediately and stay isolated when switching accounts. This
-dismissal is independent of the Getting Started sidebar link. Up to three cached AI
+still load below it without moving the input. Up to three cached AI
suggestions appear below the
composer, using the existing fast/smart recommendation projections. Compact rows
use one line: reason — Phosphor icon and item name, followed by Open, all at the same font size. Clicking a
@@ -1826,22 +1820,12 @@ the mention opens the database. Databases also appear in the Ctrl+K command menu
**All** and **Files**, ordered by creation time. Home's merged feed and the Recent view read Soup, which
does not list databases.
-## Getting Started — `/app/component/getting-started`
-
-The buttons under **Put Macro's agent to work** create a chat and send their
-example prompt on first use. Later clicks reopen that button's saved chat without
-sending the prompt again, including after leaving the page or refreshing. Each
-button has its own chat, saved per account in this browser's local storage.
-Repeated clicks while the same button is creating its chat are ignored; a failed
-creation can be retried.
-
## Home — `/app/component/home`
-Greeting, getting-started checklist, example prompt buttons (`Draft a document`,
-`Draft an email`, `Search & research`), and the ubiquitous `Ask AI` composer.
-Eligible newer accounts (all accounts in development) also see the same
-dismissible **Getting Started** link below
-the composer, with its dismissal shared with the desktop Home starting pane.
+Greeting, example prompt buttons (`Draft a document`, `Draft an email`,
+`Search & research`), and the ubiquitous `Ask AI` composer. Finishing onboarding
+without a deep link lands here. The retired Getting Started page's old
+`/app/getting-started` and `/app/component/getting-started` links also open Home.
On phones, shared confirmations (including Remove Member and Cancel Invitation)
use a glass sheet with a title, description, Close confirmation button, and