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(icons): preserve calendar icons for ICS attachments (#8155)
gbirmana3060a3aa883
diff --git a/apps/web/src/components/app/split-layout/components/SplitLabel.tsx b/apps/web/src/components/app/split-layout/components/SplitLabel.tsxindex 95411bf8a1..f0ff22acfd 100644--- a/apps/web/src/components/app/split-layout/components/SplitLabel.tsx+++ b/apps/web/src/components/app/split-layout/components/SplitLabel.tsx@@ -9,7 +9,6 @@ import {import {EntityIcon,type EntityIconSelector,- isArchiveType,} from '@core/component/EntityIcon';import { InlineTitleEditor } from '@core/component/InlineTitleEditor';import { isTouchDevice } from '@core/mobile/isTouchDevice';@@ -246,12 +245,8 @@ export function BlockItemSplitLabel(props: {const isOwner = useIsDocumentOwner();const targetType = () => {- // archive files have a special iconif (blockName === 'unknown') {- const fileType = blockMetadataSignal()?.fileType;- if (fileType && isArchiveType(fileType)) {- return 'archive';- }+ return blockMetadataSignal()?.fileType ?? blockName;}return blockName;};diff --git a/apps/web/src/features/drive-view/components/FileDetailBreadcrumbItem.tsx b/apps/web/src/features/drive-view/components/FileDetailBreadcrumbItem.tsxindex 19884b49a6..26fe8b06a9 100644--- a/apps/web/src/features/drive-view/components/FileDetailBreadcrumbItem.tsx+++ b/apps/web/src/features/drive-view/components/FileDetailBreadcrumbItem.tsx@@ -74,7 +74,11 @@ export function FileDetailBreadcrumbItem(props: {onClick={item.onSelect}><EntityIcon- targetType={props.blockType}+ targetType={+ props.blockType === 'unknown'+ ? (props.documentMetadata.fileType ?? props.blockType)+ : props.blockType+ }size="xs"class="shrink-0"/>diff --git a/apps/web/src/features/email-message/components/attachment-pill.tsx b/apps/web/src/features/email-message/components/attachment-pill.tsxindex 409d3d297a..343da53a74 100644--- a/apps/web/src/features/email-message/components/attachment-pill.tsx+++ b/apps/web/src/features/email-message/components/attachment-pill.tsx@@ -1,7 +1,6 @@import { EntityIcon } from '@core/component/EntityIcon';import X from '@phosphor/x.svg';import { FileTypeMap } from '@service-storage/fileTypeMap';-import type { FileType } from '@service-storage/generated/schemas/fileType';import { Show } from 'solid-js';import { Dynamic } from 'solid-js/web';@@ -19,10 +18,19 @@ type EmailAttachmentPillProps = {export function EmailAttachmentPill(props: EmailAttachmentPillProps) {let parentDiv!: HTMLDivElement;- const fileType = () =>- props.attachment.mimeType- ? (mimeToFileExtTypeMap.get(props.attachment.mimeType) as FileType)- : undefined;+ const fileType = () => {+ const mimeType = props.attachment.mimeType+ ?.split(';')[0]+ .trim()+ .toLowerCase();+ if (+ props.attachment.fileName.toLowerCase().endsWith('.ics') ||+ mimeType === 'application/ics'+ ) {+ return 'ics';+ }+ return mimeType ? mimeToFileExtTypeMap.get(mimeType) : undefined;+ };return (<div@@ -42,10 +50,7 @@ export function EmailAttachmentPill(props: EmailAttachmentPillProps) {}}><Show when={fileType() !== undefined || props.attachment.mimeType}>- <EntityIcon- targetType={fileType() ?? (props.attachment.mimeType as FileType)}- size="xs"- />+ <EntityIcon targetType={fileType()} size="xs" /></Show><span class="ph-no-capture truncate ml-1">{props.attachment.fileName}diff --git a/apps/web/src/lib/core/component/EntityIcon.tsx b/apps/web/src/lib/core/component/EntityIcon.tsxindex 23c701d8a2..77f7c23f8b 100644--- a/apps/web/src/lib/core/component/EntityIcon.tsx+++ b/apps/web/src/lib/core/component/EntityIcon.tsx@@ -552,7 +552,7 @@ export type EntityIconProps = {* like 'directMessage; If an unrecognized type or no type at all is passed,* a default gray file icon will be used.*/- targetType?: FileType | EntityWithValidIcon;+ targetType?: FileType | EntityWithValidIcon | (string & {});/*** The size of the Icon.* sm = "w-4 h-4"diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.mdindex 59cbcab950..c45f4f5633 100644--- a/docs/agent-guide/calendar.md+++ b/docs/agent-guide/calendar.md@@ -470,6 +470,11 @@ In `/app/component/mail`, open an invitation message; the same card appears in`/app/email/:threadId`. Saved details appear below the sender without waiting for calendarsync. Expand guests and descriptions with their explicit controls. `View original email`is an accessible disclosure that starts closed; attachments remain below it.+ICS attachments show a calendar icon in the attachment pill and file headers on+desktop and mobile, including when the email uses `application/ics` or a+parameterized `text/calendar` MIME type. Opening the attachment still shows the+generic file viewer with download and share actions; the invitation card above+is the event preview.Related recurring components are grouped behind their own disclosure. Only mail syncedafter the feature shipped gets a card; older invitations render as plain email.A newly arrived scheduling update shows RSVP and Join only once its calendar state has