Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix [properties-fe] - thread entity pills show email subject instead of id (#559)

Daniel Kweon8b555f58b4e9
diff --git a/js/app/packages/core/component/Properties/hooks/usePropertyEntityDisplay.tsx b/js/app/packages/core/component/Properties/hooks/usePropertyEntityDisplay.tsx
index c3c7d6a8f7..635737fbc3 100644
--- a/js/app/packages/core/component/Properties/hooks/usePropertyEntityDisplay.tsx
+++ b/js/app/packages/core/component/Properties/hooks/usePropertyEntityDisplay.tsx
@@ -21,6 +21,7 @@ const PREVIEWABLE_ENTITY_TYPES: EntityType[] = [
'PROJECT',
'CHAT',
'CHANNEL',
+ 'THREAD',
];
type PropertyEntityDisplayResult = {
@@ -54,10 +55,11 @@ export function usePropertyEntityDisplay(
const needsPreview = () =>
PREVIEWABLE_ENTITY_TYPES.includes(entityType().toUpperCase() as EntityType);
- // Map entity type to preview type (TASK uses 'document' for preview lookup)
+ // Map entity type to preview type
const getPreviewType = () => {
const type = entityType().toUpperCase();
if (type === 'TASK') return 'document';
+ if (type === 'THREAD') return 'email';
return type.toLowerCase() as 'document' | 'project' | 'chat' | 'channel';
};
@@ -89,7 +91,8 @@ export function usePropertyEntityDisplay(
case 'DOCUMENT':
case 'TASK':
case 'PROJECT':
- case 'CHAT': {
+ case 'CHAT':
+ case 'THREAD': {
const previewItem = preview();
if (!previewItem || previewItem.loading) return 'Loading...';
if (!isAccessiblePreviewItem(previewItem)) return 'Unavailable';
@@ -97,8 +100,6 @@ export function usePropertyEntityDisplay(
}
case 'COMPANY':
return entityId() ?? 'Company';
- case 'THREAD':
- return entityId() ?? 'Thread';
default:
return entityId();
}