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): Always archive when marking as done (#1802)
Evan Hutnikc5fc5a98ff3a
diff --git a/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts b/js/app/packages/app/component/next-soup/actions/make-mark-done-action.tsindex 5ef3ad0773..2c19837344 100644--- a/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts+++ b/js/app/packages/app/component/next-soup/actions/make-mark-done-action.ts@@ -74,7 +74,7 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {for (const entity of entities) {if (entity.type === 'email') {archiveEmail(entity.id, {- isDone: entity.done,+ archive: true,optimisticallyExclude: true,});}diff --git a/js/app/packages/app/component/next-soup/utils.ts b/js/app/packages/app/component/next-soup/utils.tsindex e71d0c7499..ede13e4373 100644--- a/js/app/packages/app/component/next-soup/utils.ts+++ b/js/app/packages/app/component/next-soup/utils.ts@@ -372,7 +372,7 @@ async function navigateToLocation(export async function archiveEmail(id: string,- options: { isDone: boolean; optimisticallyExclude?: boolean }+ options: { archive: boolean; optimisticallyExclude?: boolean }) {await queryClient.cancelQueries({ queryKey: queryKeys.all.email });@@ -415,7 +415,7 @@ export async function archiveEmail(}try {- await emailClient.flagArchived({ value: !options.isDone, id });+ await emailClient.flagArchived({ value: options.archive, id });} catch (_err) {soupTxn.rollback();for (const [key, data] of previousEmail) {