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): open search thread results at latest message expanded (#5044)
Evan Hutnikccd50ca677a9
diff --git a/apps/web/src/features/block-email/component/Email.tsx b/apps/web/src/features/block-email/component/Email.tsxindex b211874414..b76c12581b 100644--- a/apps/web/src/features/block-email/component/Email.tsx+++ b/apps/web/src/features/block-email/component/Email.tsx@@ -332,6 +332,8 @@ function EmailContent(props: EmailViewProps) {async function handleTargetMessage(messageId: string) {const messages = untrack(context.messages.list);if (!messages) return;+ // Expand the target so the navigated-to hit isn't a collapsed row+ context.messages.setExpandedBodyId(messageId, true);const targetIndex = messages.findIndex((m) => m.db_id === messageId);// Case 1: Message not in current loaded batch - need to load morediff --git a/apps/web/src/features/next-soup/utils.ts b/apps/web/src/features/next-soup/utils.tsindex e0b38f3b1f..a9e1260233 100644--- a/apps/web/src/features/next-soup/utils.ts+++ b/apps/web/src/features/next-soup/utils.ts@@ -29,6 +29,7 @@ import {type ChannelClickTarget,type EntityData,getSnippetHit,+ isEmailEntity,isGithubPrEntity,isHitSnippetEntity,isSearchEntity,@@ -465,7 +466,10 @@ export const openEntityInSplitFromUnifiedList = async (const { allowDuplicate, openInNewSplit, splitHandle, mergeHistory } = options;let { location } = options;- if (!location && isHitSnippetEntity(entity)) {+ // Email rows open like plain soup rows — at the latest message, expanded —+ // so only non-email snippet entities (calls) fall back to their row hit.+ // Clicking a specific content hit still passes an explicit location.+ if (!location && isHitSnippetEntity(entity) && !isEmailEntity(entity)) {location = getSnippetHit(entity)?.location;}