diff --git a/apps/desktop/src/services/event-listeners.tsx b/apps/desktop/src/services/event-listeners.tsx index 069fa18c17..7934cb24ac 100644 --- a/apps/desktop/src/services/event-listeners.tsx +++ b/apps/desktop/src/services/event-listeners.tsx @@ -10,7 +10,7 @@ import { getCurrentWebviewWindowLabel } from "@hypr/plugin-windows"; import * as main from "~/store/tinybase/store/main"; import { - createSession, + createAdHocSession, getOrCreateSessionForEventId, } from "~/store/tinybase/store/sessions"; import { useTabs } from "~/store/zustand/tabs"; @@ -61,7 +61,7 @@ function useNotificationEvents() { pendingAutoStart.current = null; const sessionId = eventId ? getOrCreateSessionForEventId(store, eventId) - : createSession(store); + : createAdHocSession(store); openNew({ type: "sessions", id: sessionId, @@ -95,7 +95,7 @@ function useNotificationEvents() { } const sessionId = eventId ? getOrCreateSessionForEventId(currentStore, eventId) - : createSession(currentStore); + : createAdHocSession(currentStore); openNewRef.current({ type: "sessions", id: sessionId, @@ -117,7 +117,7 @@ function useNotificationEvents() { currentStore, eventIds[selectedIndex], ) - : createSession(currentStore); + : createAdHocSession(currentStore); openNewRef.current({ type: "sessions", diff --git a/apps/desktop/src/session/components/outer-header/metadata/participants/chip.tsx b/apps/desktop/src/session/components/outer-header/metadata/participants/chip.tsx index 7d14f56e4c..5072de3421 100644 --- a/apps/desktop/src/session/components/outer-header/metadata/participants/chip.tsx +++ b/apps/desktop/src/session/components/outer-header/metadata/participants/chip.tsx @@ -10,10 +10,12 @@ import { parseTranscriptHints, updateTranscriptHints } from "~/stt/utils"; export function ParticipantChip({ mappingId }: { mappingId: string }) { const details = useParticipantDetails(mappingId); + const currentUserId = main.UI.useValue("user_id", main.STORE_ID); const assignedHumanId = details?.humanId; const sessionId = details?.sessionId; const source = details?.source; + const isCurrentUser = assignedHumanId === currentUserId; const handleRemove = useRemoveParticipant({ mappingId, @@ -35,7 +37,13 @@ export function ParticipantChip({ mappingId }: { mappingId: string }) { return null; } - const { humanName } = details; + const { humanEmail, humanName } = details; + const baseLabel = + humanName || humanEmail || (isCurrentUser ? "You" : "Unknown"); + const label = + isCurrentUser && baseLabel !== "You" && !baseLabel.endsWith(" (You)") + ? `${baseLabel} (You)` + : baseLabel; return ( - {humanName || "Unknown"} + {label}