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(home): exclude noise emails from recent activity (#7263)
Peter Chinman499ac147bcc5
diff --git a/apps/web/src/features/entity/types/entity.ts b/apps/web/src/features/entity/types/entity.tsindex 45afdde06f..59c27c902c 100644--- a/apps/web/src/features/entity/types/entity.ts+++ b/apps/web/src/features/entity/types/entity.ts@@ -277,6 +277,8 @@ export type EmailEntity = EntityBase & {isDraft: boolean;snippet?: string;isImportant: boolean;+ /** Server-computed Signal membership; unavailable on some search results. */+ isSignal?: boolean;done: boolean;projectId?: string;participants?: EmailThreadParticipants;diff --git a/apps/web/src/features/home/queries/home-results.test.ts b/apps/web/src/features/home/queries/home-results.test.tsindex 5ee70f4f46..d29afeb26c 100644--- a/apps/web/src/features/home/queries/home-results.test.ts+++ b/apps/web/src/features/home/queries/home-results.test.ts@@ -39,6 +39,7 @@ const staleTaskFreshComment = {const freshEmail = {id: 'email',type: 'email',+ isSignal: true,name: 'Welcome',ownerId: 'macro|[email protected]',updatedAt: '2026-09-02T16:00:00Z',diff --git a/apps/web/src/features/home/queries/home-results.ts b/apps/web/src/features/home/queries/home-results.tsindex 98b8956731..ab9a9e333b 100644--- a/apps/web/src/features/home/queries/home-results.ts+++ b/apps/web/src/features/home/queries/home-results.ts@@ -85,6 +85,9 @@ export function mergeHomeEntities(// Cache inserts from other users are not the viewer's own activity....recents.filter((entity) => homeTimestamp(entity.touchedAt) !== undefined)+ // Activity is unfiltered. Only server-classified Signal emails may+ // enter Home through this source, including cached/local search rows.+ .filter((entity) => entity.type !== 'email' || entity.isSignal === true).map((entity) => ({...entity,sortTs: entity.touchedAt,diff --git a/apps/web/src/features/home/queries/use-home-query.test.ts b/apps/web/src/features/home/queries/use-home-query.test.tsindex 9bec91f1fe..bf279db11a 100644--- a/apps/web/src/features/home/queries/use-home-query.test.ts+++ b/apps/web/src/features/home/queries/use-home-query.test.ts@@ -55,6 +55,7 @@ function email(id: string, day: number): EmailEntity {isRead: false,isDraft: false,isImportant: true,+ isSignal: true,done: false,updatedAt: timestamp,notifiedAt: timestamp,@@ -148,6 +149,41 @@ describe('Home data source', () => {vi.useRealTimers();});+ it('excludes Noise and unclassified emails from recent activity, even when important or drafted', () => {+ const activity = makeQuery(+ [+ { ...email('noise', 10), isSignal: false },+ { ...email('noise-draft', 10), isSignal: false, isDraft: true },+ { ...email('unclassified', 10), isSignal: undefined },+ { ...email('signal', 10), isImportant: false },+ ],+ false+ );+ const { source, setState } = mount(+ makeQuery([email('received', 9)], false),+ activity+ );+ expect(ids(source)).toEqual(['signal', 'received']);+ setState('facets', { read: ['unread'], type: ['email'] });+ expect(ids(source)).toEqual(['signal', 'received']);++ activity.setEntities([{ ...email('signal', 10), isSignal: false }]);+ expect(ids(source)).toEqual(['received']);+ });++ it('continues pagination through a page containing only Noise activity', async () => {+ const notifications = makeQuery([email('received', 1)], false);+ const activity = makeQuery([{ ...email('noise', 10), isSignal: false }]);+ const { source } = mount(notifications, activity);+ expect(ids(source)).toEqual([]);+ expect(source.hasMore()).toBe(true);+ await source.loadMore();+ expect(activity.fetchNextPage).toHaveBeenCalledOnce();+ activity.setEntities((previous) => [...previous, email('signal', 9)]);+ activity.setMore(false);+ expect(ids(source)).toEqual(['signal', 'received']);+ });+it('does not treat older cache-only rows as fetched page coverage', async () => {const notifications = makeQuery([email('n9', 9), email('n1', 1)]);const activity = makeQuery([diff --git a/apps/web/src/lib/queries/soup/transform-utils.test.ts b/apps/web/src/lib/queries/soup/transform-utils.test.tsindex 2980187e3c..f390de0e12 100644--- a/apps/web/src/lib/queries/soup/transform-utils.test.ts+++ b/apps/web/src/lib/queries/soup/transform-utils.test.ts@@ -12,6 +12,40 @@ vi.mock('@core/constant/allBlocks', () => ({vi.mock('@core/context/channels', () => ({ useChannelsContext: vi.fn() }));vi.mock('@core/user', () => ({ emailToId: vi.fn() }));+describe('email soup entities', () => {+ it.each([true, false])(+ 'preserves server Signal membership (%s) for Home activity',+ (isSignal) => {+ const item = {+ tag: 'emailThread',+ frecency_score: 0,+ is_favorited: false,+ data: {+ id: 'email',+ ownerId: 'owner',+ properties: [],+ attachments: [],+ labels: [],+ participants: [],+ createdAt: '2026-09-01T00:00:00Z',+ updatedAt: '2026-09-01T00:00:00Z',+ sortTs: '2026-09-01T00:00:00Z',+ inboxVisible: true,+ isDraft: false,+ isRead: false,+ isImportant: !isSignal,+ isSignal,+ },+ } satisfies SoupApiItem;+ expect(mapApiSoupItemToEntity(item)).toMatchObject({+ type: 'email',+ isSignal,+ isImportant: !isSignal,+ });+ }+ );+});+describe('initiative soup entities', () => {it('keeps projects separate from folders and backing description documents', () => {const item = {diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.mdindex 954ced7af9..4693e06d94 100644--- a/docs/AGENT_GUIDE/surfaces.md+++ b/docs/AGENT_GUIDE/surfaces.md@@ -190,8 +190,13 @@ incomplete predicate-index facts into authoritative membership evidence.On desktop with the new app views enabled, Home defaults to a Signal feed mergingnotifications with Activity's `touched_by_me` recents, including sent emails and-AI chats. Each entity appears once, ordered by its latest notification or own-action. On desktop, the funnel button to the right of **Home** opens **Filter Home**.+AI chats. Recent emails must be classified as Signal by the server; touching a+Noise email must not bring it into Home, including through local search. Verify+that a recently viewed Noise email stays absent while a Signal email and recent+chat remain visible, and that loading older rows still works through pages of+Noise-only email activity. Each entity appears once, ordered by its latest+notification or own action. On desktop, the funnel button to the right of **Home**+opens **Filter Home**.The menu shares the legacy compact submenus: **Status** offers **Unread**, **Read**,and **All** as single-select radio items with a checkmark on the right of the selectedoption, and **Type** contains the entity checkboxes. Status closes the menu