Skip to content

Commit ef12dc8

Browse files
committed
fix(web): history entries now show display names instead of raw IDs
Remove hardcoded fallback titles from history entries. Let HistoryCard component fetch display names from the API using useEntityDisplayName hook for a better user experience.
1 parent 770cb60 commit ef12dc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/web/src/hooks/use-user-interactions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ export const useUserInteractions = (options: UseUserInteractionsOptions = {}): U
247247
entityType: entityType as EntityType,
248248
entityId: entityId,
249249
url: currentUrl,
250-
title: `${entityType}: ${entityId}`,
250+
// Don't provide fallback title - let HistoryCard fetch display name from API
251+
title: undefined,
251252
});
252253
} catch (error) {
253254
logger.error(
@@ -312,7 +313,8 @@ export const useUserInteractions = (options: UseUserInteractionsOptions = {}): U
312313
entityType: metadata.entityType as EntityType,
313314
entityId: metadata.entityId,
314315
url,
315-
title: metadata.searchQuery ? `Search: ${metadata.searchQuery}` : `${metadata.entityType}: ${metadata.entityId}`,
316+
// Only provide title for search queries - let HistoryCard fetch display name for entities
317+
title: metadata.searchQuery ? `Search: ${metadata.searchQuery}` : undefined,
316318
});
317319

318320
// Refresh data to update UI

0 commit comments

Comments
 (0)