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
Revert "feat(email): refetch soup threads on refresh_email backfill events" (#4027)
gbirmanc1bbd77e4bd7
diff --git a/js/app/packages/queries/email/sync.ts b/js/app/packages/queries/email/sync.tsdeleted file mode 100644index c84a6a8c2a..0000000000--- a/js/app/packages/queries/email/sync.ts+++ /dev/null@@ -1,23 +0,0 @@-import { invalidateAllSoup } from '@queries/soup/normalized-cache';-import { leadingAndTrailing, throttle } from '@solid-primitives/scheduled';--const BACKFILL_SOUP_REFRESH_INTERVAL = 5_000;--const throttledBackfillSoupRefresh = leadingAndTrailing(- throttle,- invalidateAllSoup,- BACKFILL_SOUP_REFRESH_INTERVAL-);--/**- * Handles `refresh_email` websocket events. Only `backfill` events refetch- * here: steady-state mutations (`upsert_message`, `update_labels`,- * `delete_message`) already invalidate soup through the notification-driven- * path, and reacting to them again would double-refetch. Backfill produces no- * notifications, so this is its only refresh signal — throttled because the- * backend emits one event per batch of backfilled threads.- */-export function handleRefreshEmail(eventType: unknown): void {- if (eventType !== 'backfill') return;- throttledBackfillSoupRefresh();-}diff --git a/js/app/packages/queries/sync/SyncProvider.tsx b/js/app/packages/queries/sync/SyncProvider.tsxindex a0a01333f8..0bac61d30a 100644--- a/js/app/packages/queries/sync/SyncProvider.tsx+++ b/js/app/packages/queries/sync/SyncProvider.tsx@@ -5,7 +5,6 @@ import {} from '@queries/channel/sync';import { handleCommsTyping } from '@queries/channel/typing';import { invalidateContacts } from '@queries/contacts/contacts';-import { handleRefreshEmail } from '@queries/email/sync';import {applyNotificationStatusUpdate,notificationStatusUpdatePayloadSchema,@@ -87,9 +86,6 @@ export function QuerySyncProvider(props: SyncProviderProps) {}applyNotificationStatusUpdate(result.data);})- .with({ type: 'refresh_email' }, () => {- handleRefreshEmail(data.data);- }).with({ type: 'task_duplicate_matches_updated' }, () => {withParsedWebsocketPayload(data.type,