Skip to content

The open alternative to Salesforce, designed for AI.

Show call participants on call recording pages in the call recorder app (#28222)

nitin9c330cf5df3c
diff --git a/packages/twenty-apps/public/call-recorder/README.md b/packages/twenty-apps/public/call-recorder/README.md
index a02e7b91162..2437bfc8a2f 100644
--- a/packages/twenty-apps/public/call-recorder/README.md
+++ b/packages/twenty-apps/public/call-recorder/README.md
@@ -9,6 +9,7 @@
- **A per-meeting on/off switch**
- **Customizable in-meeting recording notices**
- **AI meeting summaries**
+- **Call participants on call recording pages**
- **Built for AI & automation**
## πŸ’³ Billing
@@ -36,6 +37,15 @@ happens once the meeting is within the seven-day scheduling window. Set it to
Off to skip a meeting. Past meetings the recorder never joined simply stay
blank.
+## πŸ‘₯ Call participants
+
+A **Call participants** widget is added to the Home tab of call recording
+pages. It reads the meeting the recording belongs to, so nothing is copied onto
+the recording, and shows the meeting's attendees. People in your CRM open their
+record when clicked; workspace members are shown by name. Attendees that match
+no one are hidden unless the `CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES` app
+variable is `true`.
+
## πŸ—“οΈ Pausing the recorder
The **Record my calendar meetings** toggle in the app settings is on
diff --git a/packages/twenty-apps/public/call-recorder/package.json b/packages/twenty-apps/public/call-recorder/package.json
index c857d89ad6b..589d42104a2 100644
--- a/packages/twenty-apps/public/call-recorder/package.json
+++ b/packages/twenty-apps/public/call-recorder/package.json
@@ -1,12 +1,12 @@
{
"name": "@twentyhq/call-recorder",
- "version": "1.16.1",
+ "version": "1.17.0",
"license": "MIT",
"engines": {
"node": "^24.5.0",
"npm": "please-use-yarn",
"yarn": ">=4.0.2",
- "twenty": ">=2.42.0"
+ "twenty": ">=2.43.0"
},
"keywords": [
"twenty-app"
@@ -35,8 +35,8 @@
"oxlint": "^0.16.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "twenty-client-sdk": "2.42.0",
- "twenty-sdk": "2.42.0",
+ "twenty-client-sdk": "2.43.0",
+ "twenty-sdk": "2.43.0",
"twenty-ui": "^1.0.0-alpha.1",
"typescript": "^5.9.3",
"use-debounce": "^10.0.0",
diff --git a/packages/twenty-apps/public/call-recorder/src/__tests__/record-page-widgets.test.ts b/packages/twenty-apps/public/call-recorder/src/__tests__/record-page-widgets.test.ts
new file mode 100644
index 00000000000..94db0587ffe
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/__tests__/record-page-widgets.test.ts
@@ -0,0 +1,32 @@
+import { describe, expect, it } from 'vitest';
+
+import { STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
+
+import { CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';
+import callParticipantsFrontComponent from 'src/front-components/call-participants.front-component';
+import callParticipantsOnCallRecordingPageLayoutWidget from 'src/page-layout-widgets/call-participants-on-call-recording.page-layout-widget';
+
+describe('record page widgets', () => {
+ it('passes the SDK manifest validation', () => {
+ expect(callParticipantsFrontComponent.errors).toEqual([]);
+ });
+
+ it('can be placed as a widget', () => {
+ expect(callParticipantsFrontComponent.config.isHeadless).not.toBe(true);
+ });
+
+ it('adds call participants to the call recording Home tab', () => {
+ expect(callParticipantsOnCallRecordingPageLayoutWidget.errors).toEqual([]);
+ expect(
+ callParticipantsOnCallRecordingPageLayoutWidget.config,
+ ).toMatchObject({
+ pageLayoutTabUniversalIdentifier:
+ STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.callRecordingRecordPage.tabs
+ .home.universalIdentifier,
+ configuration: {
+ frontComponentUniversalIdentifier:
+ CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,
+ },
+ });
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/application-config.ts b/packages/twenty-apps/public/call-recorder/src/application-config.ts
index 60d4d842a74..04ab1d9d9ac 100644
--- a/packages/twenty-apps/public/call-recorder/src/application-config.ts
+++ b/packages/twenty-apps/public/call-recorder/src/application-config.ts
@@ -15,6 +15,7 @@ import {
CALL_RECORDER_NOONE_JOINED_TIMEOUT_SECONDS_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
CALL_RECORDER_RECORDING_NOTICE_ENABLED_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
CALL_RECORDER_RECORDING_NOTICE_MESSAGE_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
+ CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
CALL_RECORDER_SUMMARY_ENABLED_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
CALL_RECORDER_TRANSCRIPT_PROVIDER_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
CALL_RECORDER_USE_WORKSPACE_LOGO_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
@@ -33,6 +34,7 @@ import { CALL_RECORDER_RECORDING_NOTICE_MAX_LENGTH } from 'src/logic-functions/c
import { CALL_RECORDER_RECORDING_NOTICE_MESSAGE_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-recording-notice-message-env-var-name';
import { CALL_RECORDER_RECORDING_RETENTION_HOURS_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-recording-retention-hours-env-var-name';
import { CALL_RECORDER_ADDITIONAL_SUMMARY_PROMPT_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-additional-summary-prompt-env-var-name';
+import { CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name';
import { CALL_RECORDER_SUMMARY_ENABLED_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-summary-enabled-env-var-name';
import { CALL_RECORDER_TRANSCRIPT_PROVIDER_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-transcript-provider-env-var-name';
import { CALL_RECORDER_USE_WORKSPACE_LOGO_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-use-workspace-logo-env-var-name';
@@ -45,6 +47,7 @@ import { DEFAULT_CALL_RECORDER_NAME } from 'src/logic-functions/constants/defaul
import { DEFAULT_CALL_RECORDER_RECORDING_NOTICE_ENABLED } from 'src/logic-functions/constants/default-call-recorder-recording-notice-enabled';
import { DEFAULT_CALL_RECORDER_RECORDING_NOTICE_MESSAGE } from 'src/logic-functions/constants/default-call-recorder-recording-notice-message';
import { DEFAULT_CALL_RECORDER_RECORDING_RETENTION_HOURS } from 'src/logic-functions/constants/default-call-recorder-recording-retention-hours';
+import { DEFAULT_CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES } from 'src/logic-functions/constants/default-call-recorder-show-unmatched-attendees';
import { DEFAULT_CALL_RECORDER_SUMMARY_ENABLED } from 'src/logic-functions/constants/default-call-recorder-summary-enabled';
import { DEFAULT_CALL_RECORDER_TRANSCRIPT_PROVIDER } from 'src/logic-functions/constants/default-call-recorder-transcript-provider';
import { DEFAULT_CALL_RECORDER_USE_WORKSPACE_LOGO } from 'src/logic-functions/constants/default-call-recorder-use-workspace-logo';
@@ -199,6 +202,16 @@ export default defineApplication({
type: FieldType.TEXT,
value: DEFAULT_CALL_RECORDER_BOT_IMAGE_BACKGROUND,
},
+ [CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME]: {
+ universalIdentifier:
+ CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_APP_VARIABLE_UNIVERSAL_IDENTIFIER,
+ label: 'Show unmatched attendees',
+ description:
+ 'Whether the call participants widget also lists meeting attendees that do not match a person or workspace member, by name or email.',
+ isSecret: false,
+ type: FieldType.BOOLEAN,
+ value: DEFAULT_CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES,
+ },
},
serverVariables: {
[RECALL_API_KEY_ENV_VAR_NAME]: {
diff --git a/packages/twenty-apps/public/call-recorder/src/constants/call-recorder-home-tab-widget-index.ts b/packages/twenty-apps/public/call-recorder/src/constants/call-recorder-home-tab-widget-index.ts
new file mode 100644
index 00000000000..0deb8735777
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/constants/call-recorder-home-tab-widget-index.ts
@@ -0,0 +1,2 @@
+// Standard Home tab widgets use indexes 0-4.
+export const CALL_RECORDER_HOME_TAB_WIDGET_INDEX = 1000;
diff --git a/packages/twenty-apps/public/call-recorder/src/constants/universal-identifiers.ts b/packages/twenty-apps/public/call-recorder/src/constants/universal-identifiers.ts
index 4537fa7ebbf..b310b124f83 100644
--- a/packages/twenty-apps/public/call-recorder/src/constants/universal-identifiers.ts
+++ b/packages/twenty-apps/public/call-recorder/src/constants/universal-identifiers.ts
@@ -10,6 +10,12 @@ export const BOT_SCHEDULE_IDEMPOTENCY_KEY_FIELD_UNIVERSAL_IDENTIFIER =
export const CALENDAR_EVENT_RECONCILIATION_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER =
'1f28c477-6423-4911-85bf-2296ef112be9';
+export const CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER =
+ '78da461a-e537-4069-8475-c446d5c9fb54';
+
+export const CALL_PARTICIPANTS_ON_CALL_RECORDING_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =
+ '57733916-b452-4625-92dd-2f9c14f8dd29';
+
export const CALL_RECORDER_ADDITIONAL_SUMMARY_PROMPT_APP_VARIABLE_UNIVERSAL_IDENTIFIER =
'587ead10-c514-468c-944f-17050c88dcc1';
@@ -43,6 +49,9 @@ export const CALL_RECORDER_RECORDING_NOTICE_ENABLED_APP_VARIABLE_UNIVERSAL_IDENT
export const CALL_RECORDER_RECORDING_NOTICE_MESSAGE_APP_VARIABLE_UNIVERSAL_IDENTIFIER =
'7103451a-2c46-4c16-bc2c-a9f28b329ee5';
+export const CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_APP_VARIABLE_UNIVERSAL_IDENTIFIER =
+ 'bb665492-3074-4a11-b647-b8ac140e513f';
+
export const CALL_RECORDER_SUMMARY_ENABLED_APP_VARIABLE_UNIVERSAL_IDENTIFIER =
'1d7bf052-4338-44da-b373-23f6d291a50c';
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/call-participants.front-component.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/call-participants.front-component.tsx
new file mode 100644
index 00000000000..9cd9d4b0347
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/call-participants.front-component.tsx
@@ -0,0 +1,12 @@
+import { defineFrontComponent } from 'twenty-sdk/define';
+
+import { CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';
+import { CallParticipantsWidget } from 'src/front-components/components/CallParticipantsWidget';
+
+export default defineFrontComponent({
+ universalIdentifier: CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,
+ name: 'Call participants',
+ description:
+ 'Shows the participants of the meeting a call recording belongs to.',
+ component: CallParticipantsWidget,
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantChip.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantChip.tsx
new file mode 100644
index 00000000000..7bc5bc077d7
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantChip.tsx
@@ -0,0 +1,68 @@
+import { Avatar, Chip, ChipVariant } from 'twenty-ui/data-display';
+
+import { StyledChipButton } from 'src/front-components/components/StyledChipButton';
+import { type CallParticipantDisplayItem } from 'src/front-components/types/call-participant-display-item.type';
+import { openRecord } from 'src/front-components/utils/open-record.util';
+
+type CallParticipantChipProps = {
+ participant: CallParticipantDisplayItem;
+};
+
+export const CallParticipantChip = ({
+ participant,
+}: CallParticipantChipProps) => {
+ switch (participant.kind) {
+ case 'person': {
+ const handleClick = () => {
+ void openRecord({
+ objectNameSingular: 'person',
+ recordId: participant.personId,
+ });
+ };
+
+ return (
+ <StyledChipButton type="button" onClick={handleClick}>
+ <Chip
+ label={participant.label}
+ clickable
+ variant={ChipVariant.Highlighted}
+ leftComponent={
+ <Avatar
+ avatarUrl={participant.avatarUrl}
+ placeholder={participant.label}
+ placeholderColorSeed={participant.personId}
+ type="rounded"
+ size="sm"
+ />
+ }
+ />
+ </StyledChipButton>
+ );
+ }
+ case 'workspaceMember':
+ return (
+ <Chip
+ label={participant.label}
+ clickable={false}
+ variant={ChipVariant.Transparent}
+ leftComponent={
+ <Avatar
+ avatarUrl={participant.avatarUrl}
+ placeholder={participant.label}
+ placeholderColorSeed={participant.workspaceMemberId}
+ type="rounded"
+ size="sm"
+ />
+ }
+ />
+ );
+ case 'unmatched':
+ return (
+ <Chip
+ label={participant.label}
+ clickable={false}
+ variant={ChipVariant.Transparent}
+ />
+ );
+ }
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantsWidget.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantsWidget.tsx
new file mode 100644
index 00000000000..7cdf913ecf5
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallParticipantsWidget.tsx
@@ -0,0 +1,105 @@
+import 'twenty-ui/style.css';
+
+import styled from '@emotion/styled';
+import { isUndefined } from '@sniptt/guards';
+import {
+ useSelectedObjectMetadata,
+ useSelectedRecordIds,
+} from 'twenty-sdk/front-component';
+import { themeCssVariables } from 'twenty-ui/theme-constants';
+
+import { CallParticipantChip } from 'src/front-components/components/CallParticipantChip';
+import { FrontComponentThemeProvider } from 'src/front-components/components/FrontComponentThemeProvider';
+import { StyledWidgetContainer } from 'src/front-components/components/StyledWidgetContainer';
+import { WidgetEmptyState } from 'src/front-components/components/WidgetEmptyState';
+import { useCallParticipants } from 'src/front-components/hooks/use-call-participants';
+import { buildCallParticipantDisplayItems } from 'src/front-components/utils/build-call-participant-display-items.util';
+import { isShowUnmatchedAttendeesEnabled } from 'src/front-components/utils/is-show-unmatched-attendees-enabled.util';
+
+const StyledChipList = styled.div`
+ display: flex;
+ flex-wrap: wrap;
+ gap: ${() => themeCssVariables.spacing[1]};
+`;
+
+type CallParticipantListProps = {
+ callRecordingId: string;
+};
+
+const CallParticipantList = ({ callRecordingId }: CallParticipantListProps) => {
+ const callParticipantsState = useCallParticipants(callRecordingId);
+
+ switch (callParticipantsState.status) {
+ case 'loading':
+ return null;
+ case 'error':
+ return (
+ <WidgetEmptyState
+ title="Could Not Load Participants"
+ description="Something went wrong while loading this call's participants."
+ />
+ );
+ case 'notLinkedToMeeting':
+ return (
+ <WidgetEmptyState
+ title="No Meeting"
+ description="This recording is not linked to a calendar event."
+ />
+ );
+ case 'loaded': {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: callParticipantsState.participants,
+ areRelationsLoaded: callParticipantsState.areRelationsLoaded,
+ showUnmatchedAttendees: isShowUnmatchedAttendeesEnabled(),
+ });
+
+ if (items.length === 0) {
+ return (
+ <WidgetEmptyState
+ title="No Participants"
+ description="No attendees of this call match a person or member of your workspace."
+ />
+ );
+ }
+
+ return (
+ <StyledChipList>
+ {items.map((item) => (
+ <CallParticipantChip key={item.key} participant={item} />
+ ))}
+ </StyledChipList>
+ );
+ }
+ }
+};
+
+export const CallParticipantsWidget = () => {
+ const selectedRecordIds = useSelectedRecordIds();
+ const selectedObjectMetadata = useSelectedObjectMetadata();
+
+ const callRecordingId =
+ selectedRecordIds.length === 1 ? selectedRecordIds[0] : undefined;
+
+ const renderContent = () => {
+ if (selectedObjectMetadata?.nameSingular !== 'callRecording') {
+ return (
+ <WidgetEmptyState
+ title="Not Available Here"
+ description="Add this widget to a call recording page."
+ />
+ );
+ }
+
+ if (isUndefined(callRecordingId)) {
+ return <WidgetEmptyState title="No Call Recording Selected" />;
+ }
+
+ return <CallParticipantList callRecordingId={callRecordingId} />;
+ };
+
+ return (
+ <FrontComponentThemeProvider>
+ <StyledWidgetContainer>{renderContent()}</StyledWidgetContainer>
+ </FrontComponentThemeProvider>
+ );
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/CallRecorderSettings.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallRecorderSettings.tsx
index d8769b1609d..ef538b42c61 100644
--- a/packages/twenty-apps/public/call-recorder/src/front-components/components/CallRecorderSettings.tsx
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/CallRecorderSettings.tsx
@@ -2,15 +2,11 @@ import 'twenty-ui/style.css';
import styled from '@emotion/styled';
import { useState } from 'react';
-import { useColorScheme } from 'twenty-sdk/front-component';
-import { THEME_DARK, THEME_LIGHT } from 'twenty-ui/theme';
-import {
- ThemeContext,
- themeCssVariables,
- type ThemeType,
-} from 'twenty-ui/theme-constants';
+import { themeCssVariables } from 'twenty-ui/theme-constants';
+import { FrontComponentThemeProvider } from 'src/front-components/components/FrontComponentThemeProvider';
import { InCallSection } from 'src/front-components/components/InCallSection';
+import { RecordPagesSection } from 'src/front-components/components/RecordPagesSection';
import { RecorderSection } from 'src/front-components/components/RecorderSection';
import { SchedulingSection } from 'src/front-components/components/SchedulingSection';
import { TranscriptionSection } from 'src/front-components/components/TranscriptionSection';
@@ -32,7 +28,6 @@ const StyledPausedNotice = styled.div`
`;
export const CallRecorderSettings = () => {
- const colorScheme = useColorScheme();
const [isSchedulingEnabled, setIsSchedulingEnabled] = useState(
() =>
getApplicationVariableValue(
@@ -40,18 +35,8 @@ export const CallRecorderSettings = () => {
) !== 'false',
);
- // twenty-ui components read icon sizes off ThemeContext, and the context
- // default resolves them to var() strings an SVG size attribute cannot use β€”
- // menu check marks render at their intrinsic size without a real theme here.
return (
- <ThemeContext.Provider
- value={{
- theme: (colorScheme === 'dark'
- ? THEME_DARK
- : THEME_LIGHT) as unknown as ThemeType,
- colorScheme,
- }}
- >
+ <FrontComponentThemeProvider>
<StyledContainer>
<SchedulingSection
isEnabled={isSchedulingEnabled}
@@ -69,7 +54,8 @@ export const CallRecorderSettings = () => {
how they behave. Your settings are kept.
</StyledPausedNotice>
)}
+ <RecordPagesSection />
</StyledContainer>
- </ThemeContext.Provider>
+ </FrontComponentThemeProvider>
);
};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/FrontComponentThemeProvider.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/FrontComponentThemeProvider.tsx
new file mode 100644
index 00000000000..c25c08c4af1
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/FrontComponentThemeProvider.tsx
@@ -0,0 +1,30 @@
+import { type ReactNode } from 'react';
+import { useColorScheme } from 'twenty-sdk/front-component';
+import { THEME_DARK, THEME_LIGHT } from 'twenty-ui/theme';
+import { ThemeContext, type ThemeType } from 'twenty-ui/theme-constants';
+
+type FrontComponentThemeProviderProps = {
+ children: ReactNode;
+};
+
+export const FrontComponentThemeProvider = ({
+ children,
+}: FrontComponentThemeProviderProps) => {
+ const colorScheme = useColorScheme();
+
+ // twenty-ui components read icon sizes off ThemeContext, and the context
+ // default resolves them to var() strings an SVG size attribute cannot use β€”
+ // icons render at their intrinsic size without a real theme here.
+ return (
+ <ThemeContext.Provider
+ value={{
+ theme: (colorScheme === 'dark'
+ ? THEME_DARK
+ : THEME_LIGHT) as unknown as ThemeType,
+ colorScheme,
+ }}
+ >
+ {children}
+ </ThemeContext.Provider>
+ );
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/RecordPagesSection.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/RecordPagesSection.tsx
new file mode 100644
index 00000000000..08f66801501
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/RecordPagesSection.tsx
@@ -0,0 +1,49 @@
+import { useRef, useState } from 'react';
+import { Section } from 'twenty-ui/layout';
+import { H2Title } from 'twenty-ui/typography';
+
+import { SettingsOptionCardContentToggle } from 'src/front-components/components/SettingsOptionCardContentToggle';
+import { StyledSettingsCard } from 'src/front-components/components/StyledSettingsCard';
+import { CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW } from 'src/front-components/constants/call-recorder-settings-layout.constant';
+import { useAutosaveApplicationVariable } from 'src/front-components/hooks/use-autosave-application-variable';
+import { isShowUnmatchedAttendeesEnabled } from 'src/front-components/utils/is-show-unmatched-attendees-enabled.util';
+
+export const RecordPagesSection = () => {
+ const [isShowUnmatchedAttendees, setIsShowUnmatchedAttendees] = useState(
+ isShowUnmatchedAttendeesEnabled,
+ );
+
+ const savedIsShowUnmatchedAttendeesRef = useRef(isShowUnmatchedAttendees);
+
+ const { saveImmediately } = useAutosaveApplicationVariable({
+ variableKey: CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW.variableKey,
+ onSaveSuccess: (value) => {
+ savedIsShowUnmatchedAttendeesRef.current = value === 'true';
+ },
+ onSaveError: () =>
+ setIsShowUnmatchedAttendees(savedIsShowUnmatchedAttendeesRef.current),
+ });
+
+ const handleShowUnmatchedAttendeesChange = (checked: boolean) => {
+ setIsShowUnmatchedAttendees(checked);
+ saveImmediately(checked ? 'true' : 'false');
+ };
+
+ return (
+ <Section>
+ <H2Title
+ title="Record pages"
+ description="What the call participants widget shows on call recording pages."
+ />
+ <StyledSettingsCard>
+ <SettingsOptionCardContentToggle
+ Icon={CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW.Icon}
+ title={CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW.title}
+ description={CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW.description}
+ checked={isShowUnmatchedAttendees}
+ onChange={handleShowUnmatchedAttendeesChange}
+ />
+ </StyledSettingsCard>
+ </Section>
+ );
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledChipButton.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledChipButton.tsx
new file mode 100644
index 00000000000..902fb45c2e5
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledChipButton.tsx
@@ -0,0 +1,18 @@
+import styled from '@emotion/styled';
+import { themeCssVariables } from 'twenty-ui/theme-constants';
+
+export const StyledChipButton = styled.button`
+ background: none;
+ border: none;
+ border-radius: ${() => themeCssVariables.border.radius.sm};
+ cursor: pointer;
+ display: inline-flex;
+ font: inherit;
+ max-width: 100%;
+ min-width: 0;
+ padding: 0;
+
+ &:focus-visible {
+ outline: 1px solid ${() => themeCssVariables.border.color.blue};
+ }
+`;
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledWidgetContainer.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledWidgetContainer.tsx
new file mode 100644
index 00000000000..7f8c5e91c3f
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/StyledWidgetContainer.tsx
@@ -0,0 +1,12 @@
+import styled from '@emotion/styled';
+import { themeCssVariables } from 'twenty-ui/theme-constants';
+
+export const StyledWidgetContainer = styled.div`
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ font-family: ${() => themeCssVariables.font.family};
+ gap: ${() => themeCssVariables.spacing[1]};
+ padding: ${() => themeCssVariables.spacing[1]};
+ width: 100%;
+`;
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/components/WidgetEmptyState.tsx b/packages/twenty-apps/public/call-recorder/src/front-components/components/WidgetEmptyState.tsx
new file mode 100644
index 00000000000..ef58e0bb0d9
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/components/WidgetEmptyState.tsx
@@ -0,0 +1,46 @@
+import styled from '@emotion/styled';
+import { isUndefined } from '@sniptt/guards';
+import { themeCssVariables } from 'twenty-ui/theme-constants';
+
+const StyledRoot = styled.div`
+ align-items: center;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ font-family: ${() => themeCssVariables.font.family};
+ gap: ${() => themeCssVariables.spacing[2]};
+ justify-content: center;
+ padding: ${() => themeCssVariables.spacing[6]}
+ ${() => themeCssVariables.spacing[4]};
+ text-align: center;
+ width: 100%;
+`;
+
+const StyledTitle = styled.div`
+ color: ${() => themeCssVariables.font.color.primary};
+ font-size: ${() => themeCssVariables.font.size.lg};
+ font-weight: ${() => themeCssVariables.font.weight.semiBold};
+`;
+
+const StyledDescription = styled.div`
+ color: ${() => themeCssVariables.font.color.tertiary};
+ font-size: ${() => themeCssVariables.font.size.sm};
+ line-height: ${() => themeCssVariables.text.lineHeight.lg};
+`;
+
+type WidgetEmptyStateProps = {
+ title: string;
+ description?: string;
+};
+
+export const WidgetEmptyState = ({
+ title,
+ description,
+}: WidgetEmptyStateProps) => (
+ <StyledRoot>
+ <StyledTitle>{title}</StyledTitle>
+ {!isUndefined(description) && (
+ <StyledDescription>{description}</StyledDescription>
+ )}
+ </StyledRoot>
+);
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-participants-widget-max-participants.constant.ts b/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-participants-widget-max-participants.constant.ts
new file mode 100644
index 00000000000..39fbec3967b
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-participants-widget-max-participants.constant.ts
@@ -0,0 +1 @@
+export const CALL_PARTICIPANTS_WIDGET_MAX_PARTICIPANTS = 500;
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-recorder-settings-layout.constant.ts b/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-recorder-settings-layout.constant.ts
index 6f8c69e3cc2..568a099a931 100644
--- a/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-recorder-settings-layout.constant.ts
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/constants/call-recorder-settings-layout.constant.ts
@@ -5,6 +5,7 @@ import {
IconDoorEnter,
IconHourglassHigh,
IconLanguage,
+ IconMail,
IconMessage,
IconPhoto,
IconPlayerStop,
@@ -22,6 +23,7 @@ import { CALL_RECORDER_NOONE_JOINED_TIMEOUT_SECONDS_ENV_VAR_NAME } from 'src/log
import { CALL_RECORDER_RECORDING_NOTICE_ENABLED_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-recording-notice-enabled-env-var-name';
import { CALL_RECORDER_RECORDING_NOTICE_MAX_LENGTH } from 'src/logic-functions/constants/call-recorder-recording-notice-max-length';
import { CALL_RECORDER_RECORDING_NOTICE_MESSAGE_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-recording-notice-message-env-var-name';
+import { CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name';
import { CALL_RECORDER_SUMMARY_ENABLED_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-summary-enabled-env-var-name';
import { CALL_RECORDER_TRANSCRIPT_PROVIDER_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-transcript-provider-env-var-name';
import { CALL_RECORDER_USE_WORKSPACE_LOGO_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-use-workspace-logo-env-var-name';
@@ -111,6 +113,14 @@ export const CALL_RECORDER_TILE_BACKGROUND_ROW = {
Icon: IconColorSwatch,
};
+export const CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW = {
+ variableKey: CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME,
+ title: 'Show unmatched attendees',
+ description:
+ 'List attendees who are not a person in your workspace, by name or email.',
+ Icon: IconMail,
+};
+
export const CALL_RECORDER_NAME_FIELD = {
variableKey: CALL_RECORDER_NAME_ENV_VAR_NAME,
label: 'Recorder name',
@@ -136,4 +146,5 @@ export const CALL_RECORDER_MAPPED_VARIABLE_KEYS: string[] = [
CALL_RECORDER_SUMMARY_PROMPT_FIELD.variableKey,
CALL_RECORDER_USE_WORKSPACE_LOGO_ROW.variableKey,
CALL_RECORDER_TILE_BACKGROUND_ROW.variableKey,
+ CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ROW.variableKey,
];
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/hooks/use-call-participants.ts b/packages/twenty-apps/public/call-recorder/src/front-components/hooks/use-call-participants.ts
new file mode 100644
index 00000000000..1e7c353f869
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/hooks/use-call-participants.ts
@@ -0,0 +1,63 @@
+import { useEffect, useState } from 'react';
+import { CoreApiClient } from 'twenty-client-sdk/core';
+
+import { type CallParticipantNode } from 'src/front-components/types/call-participant-node.type';
+import { fetchCallParticipants } from 'src/front-components/utils/fetch-call-participants.util';
+
+type CallParticipantsState =
+ | { status: 'loading' }
+ | { status: 'error' }
+ | { status: 'notLinkedToMeeting' }
+ | {
+ status: 'loaded';
+ participants: CallParticipantNode[];
+ areRelationsLoaded: boolean;
+ };
+
+export const useCallParticipants = (
+ callRecordingId: string,
+): CallParticipantsState => {
+ const [state, setState] = useState<CallParticipantsState>({
+ status: 'loading',
+ });
+
+ useEffect(() => {
+ let isCancelled = false;
+
+ setState({ status: 'loading' });
+
+ fetchCallParticipants({ client: new CoreApiClient(), callRecordingId })
+ .then((result) => {
+ if (isCancelled) {
+ return;
+ }
+
+ switch (result.kind) {
+ case 'loaded':
+ setState({
+ status: 'loaded',
+ participants: result.participants,
+ areRelationsLoaded: result.areRelationsLoaded,
+ });
+ return;
+ case 'notLinkedToMeeting':
+ setState({ status: 'notLinkedToMeeting' });
+ return;
+ case 'callRecordingNotFound':
+ setState({ status: 'error' });
+ return;
+ }
+ })
+ .catch(() => {
+ if (!isCancelled) {
+ setState({ status: 'error' });
+ }
+ });
+
+ return () => {
+ isCancelled = true;
+ };
+ }, [callRecordingId]);
+
+ return state;
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-display-item.type.ts b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-display-item.type.ts
new file mode 100644
index 00000000000..15fc193b59a
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-display-item.type.ts
@@ -0,0 +1,20 @@
+type CallParticipantDisplayItemBase = {
+ key: string;
+ label: string;
+ isOrganizer: boolean;
+};
+
+export type CallParticipantDisplayItem =
+ | (CallParticipantDisplayItemBase & {
+ kind: 'person';
+ personId: string;
+ avatarUrl?: string;
+ })
+ | (CallParticipantDisplayItemBase & {
+ kind: 'workspaceMember';
+ workspaceMemberId: string;
+ avatarUrl?: string;
+ })
+ | (CallParticipantDisplayItemBase & {
+ kind: 'unmatched';
+ });
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-node.type.ts b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-node.type.ts
new file mode 100644
index 00000000000..119ad293aa6
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participant-node.type.ts
@@ -0,0 +1,21 @@
+import { type FullNameNode } from 'src/front-components/types/full-name-node.type';
+
+export type CallParticipantNode = {
+ id: string;
+ handle?: string | null;
+ displayName?: string | null;
+ isOrganizer?: boolean | null;
+ personId?: string | null;
+ workspaceMemberId?: string | null;
+ person?: {
+ id: string;
+ name?: FullNameNode | null;
+ avatarUrl?: string | null;
+ avatarFile?: Array<{ url?: string | null }> | null;
+ } | null;
+ workspaceMember?: {
+ id: string;
+ name?: FullNameNode | null;
+ avatarUrl?: string | null;
+ } | null;
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participants-result.type.ts b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participants-result.type.ts
new file mode 100644
index 00000000000..29aab37b9c1
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/types/call-participants-result.type.ts
@@ -0,0 +1,10 @@
+import { type CallParticipantNode } from 'src/front-components/types/call-participant-node.type';
+
+export type CallParticipantsResult =
+ | { kind: 'callRecordingNotFound' }
+ | { kind: 'notLinkedToMeeting' }
+ | {
+ kind: 'loaded';
+ participants: CallParticipantNode[];
+ areRelationsLoaded: boolean;
+ };
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/types/full-name-node.type.ts b/packages/twenty-apps/public/call-recorder/src/front-components/types/full-name-node.type.ts
new file mode 100644
index 00000000000..56046f443b4
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/types/full-name-node.type.ts
@@ -0,0 +1,4 @@
+export type FullNameNode = {
+ firstName?: string | null;
+ lastName?: string | null;
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/build-call-participant-display-items.test.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/build-call-participant-display-items.test.ts
new file mode 100644
index 00000000000..6a9d4846ee7
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/build-call-participant-display-items.test.ts
@@ -0,0 +1,348 @@
+import { describe, expect, it } from 'vitest';
+
+import { RESTRICTED_FIELD_PLACEHOLDER } from 'src/logic-functions/constants/restricted-field-placeholder';
+import { type CallParticipantNode } from 'src/front-components/types/call-participant-node.type';
+import { buildCallParticipantDisplayItems } from 'src/front-components/utils/build-call-participant-display-items.util';
+
+const buildParticipant = (
+ participant: Partial<CallParticipantNode> & { id: string },
+): CallParticipantNode => ({
+ handle: null,
+ displayName: null,
+ isOrganizer: false,
+ personId: null,
+ workspaceMemberId: null,
+ person: null,
+ workspaceMember: null,
+ ...participant,
+});
+
+const matchedPerson = buildParticipant({
+ id: 'participant-person',
+ handle: '[email protected]',
+ displayName: 'Ada from the invite',
+ personId: 'person-ada',
+ person: {
+ id: 'person-ada',
+ name: { firstName: 'Ada', lastName: 'Lovelace' },
+ avatarUrl: 'https://example.com/legacy-avatar.png',
+ avatarFile: [{ url: 'https://example.com/avatar.png' }],
+ },
+});
+
+const workspaceMember = buildParticipant({
+ id: 'participant-member',
+ handle: '[email protected]',
+ workspaceMemberId: 'member-grace',
+ workspaceMember: {
+ id: 'member-grace',
+ name: { firstName: 'Grace', lastName: 'Hopper' },
+ avatarUrl: 'https://example.com/grace.png',
+ },
+});
+
+const unmatchedWithName = buildParticipant({
+ id: 'participant-unmatched-named',
+ handle: '[email protected]',
+ displayName: 'Linus',
+});
+
+const unmatchedWithHandleOnly = buildParticipant({
+ id: 'participant-unmatched-handle',
+ handle: '[email protected]',
+});
+
+describe('buildCallParticipantDisplayItems', () => {
+ it('renders a matched participant as a person with its record name and avatar', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [matchedPerson],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toEqual([
+ {
+ kind: 'person',
+ key: 'person:person-ada',
+ personId: 'person-ada',
+ label: 'Ada Lovelace',
+ avatarUrl: 'https://example.com/avatar.png',
+ isOrganizer: false,
+ },
+ ]);
+ });
+
+ it('falls back to the attendee name when the person has no name', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ buildParticipant({
+ id: 'participant',
+ handle: '[email protected]',
+ personId: 'person-nameless',
+ person: { id: 'person-nameless', name: { firstName: ' ' } },
+ }),
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toMatchObject([
+ { kind: 'person', label: '[email protected]', avatarUrl: undefined },
+ ]);
+ });
+
+ it('prefers the matched person over the workspace member', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ {
+ ...matchedPerson,
+ workspaceMemberId: 'member-ada',
+ workspaceMember: {
+ id: 'member-ada',
+ name: { firstName: 'Ada (member)' },
+ },
+ },
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toMatchObject([
+ { kind: 'person', personId: 'person-ada', label: 'Ada Lovelace' },
+ ]);
+ });
+
+ it('shows workspace members by name even when unmatched attendees are hidden', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [workspaceMember],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toEqual([
+ {
+ kind: 'workspaceMember',
+ key: 'workspaceMember:member-grace',
+ workspaceMemberId: 'member-grace',
+ label: 'Grace Hopper',
+ avatarUrl: 'https://example.com/grace.png',
+ isOrganizer: false,
+ },
+ ]);
+ });
+
+ it('hides unmatched attendees by default and counts them', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [matchedPerson, unmatchedWithName, unmatchedWithHandleOnly],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items.map((item) => item.kind)).toEqual(['person']);
+ });
+
+ it('shows unmatched attendees by display name, then handle, when enabled', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [unmatchedWithName, unmatchedWithHandleOnly],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(items).toEqual([
+ {
+ kind: 'unmatched',
+ key: 'handle:[email protected]',
+ label: 'Linus',
+ isOrganizer: false,
+ },
+ {
+ kind: 'unmatched',
+ key: 'handle:[email protected]',
+ label: '[email protected]',
+ isOrganizer: false,
+ },
+ ]);
+ });
+
+ it('skips unmatched attendees with neither a name nor a handle', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [buildParticipant({ id: 'empty', displayName: ' ' })],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(items).toEqual([]);
+ });
+
+ it('keeps one chip per person and per email address', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ matchedPerson,
+ { ...matchedPerson, id: 'participant-person-other-handle' },
+ unmatchedWithHandleOnly,
+ {
+ ...unmatchedWithHandleOnly,
+ id: 'participant-unmatched-handle-uppercase',
+ handle: '[email protected]',
+ },
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(items.map((item) => item.key)).toEqual([
+ 'person:person-ada',
+ 'handle:[email protected]',
+ ]);
+ });
+
+ it('lists the organizer first, then people, workspace members and unmatched attendees', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ unmatchedWithName,
+ workspaceMember,
+ buildParticipant({
+ id: 'participant-zoe',
+ personId: 'person-zoe',
+ person: { id: 'person-zoe', name: { firstName: 'Zoe' } },
+ }),
+ matchedPerson,
+ { ...unmatchedWithHandleOnly, isOrganizer: true },
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(items.map((item) => item.label)).toEqual([
+ 'Ada Lovelace',
+ 'Zoe',
+ 'Grace Hopper',
+ 'Linus',
+ ]);
+ });
+
+ it('does not link a participant whose person is deleted or unreadable', () => {
+ const participantWithMissingPerson = buildParticipant({
+ id: 'participant-missing-person',
+ handle: '[email protected]',
+ displayName: 'Gone Person',
+ personId: 'person-deleted',
+ person: null,
+ });
+
+ const hidden = buildCallParticipantDisplayItems({
+ participants: [participantWithMissingPerson],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(hidden).toEqual({ items: [] });
+
+ const shown = buildCallParticipantDisplayItems({
+ participants: [participantWithMissingPerson],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(shown.items).toEqual([
+ {
+ kind: 'unmatched',
+ key: 'handle:[email protected]',
+ label: 'Gone Person',
+ isOrganizer: false,
+ },
+ ]);
+ });
+
+ it('falls back to the workspace member when the person is missing', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ { ...workspaceMember, personId: 'person-deleted', person: null },
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toMatchObject([
+ { kind: 'workspaceMember', label: 'Grace Hopper' },
+ ]);
+ });
+
+ it('trusts participant ids and attendee names when relations could not be loaded', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ buildParticipant({
+ id: 'participant-person',
+ handle: '[email protected]',
+ displayName: 'Ada',
+ personId: 'person-ada',
+ }),
+ buildParticipant({
+ id: 'participant-member',
+ handle: '[email protected]',
+ workspaceMemberId: 'member-grace',
+ }),
+ ],
+ areRelationsLoaded: false,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items).toEqual([
+ {
+ kind: 'person',
+ key: 'person:person-ada',
+ personId: 'person-ada',
+ label: 'Ada',
+ avatarUrl: undefined,
+ isOrganizer: false,
+ },
+ {
+ kind: 'workspaceMember',
+ key: 'workspaceMember:member-grace',
+ workspaceMemberId: 'member-grace',
+ label: '[email protected]',
+ avatarUrl: undefined,
+ isOrganizer: false,
+ },
+ ]);
+ });
+
+ it('still lists workspace members when every other attendee is hidden', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [workspaceMember, unmatchedWithName],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: false,
+ });
+
+ expect(items.map((item) => item.kind)).toEqual(['workspaceMember']);
+ });
+
+ it('ignores a restricted placeholder in the attendee name or email', () => {
+ const { items } = buildCallParticipantDisplayItems({
+ participants: [
+ buildParticipant({
+ id: 'participant-restricted-name',
+ displayName: RESTRICTED_FIELD_PLACEHOLDER,
+ handle: '[email protected]',
+ }),
+ buildParticipant({
+ id: 'participant-restricted-both',
+ displayName: RESTRICTED_FIELD_PLACEHOLDER,
+ handle: RESTRICTED_FIELD_PLACEHOLDER,
+ }),
+ ],
+ areRelationsLoaded: true,
+ showUnmatchedAttendees: true,
+ });
+
+ expect(items).toEqual([
+ {
+ kind: 'unmatched',
+ key: 'handle:[email protected]',
+ label: '[email protected]',
+ isOrganizer: false,
+ },
+ ]);
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/fetch-call-participants.test.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/fetch-call-participants.test.ts
new file mode 100644
index 00000000000..4526fbab83b
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/fetch-call-participants.test.ts
@@ -0,0 +1,190 @@
+import { describe, expect, it, vi } from 'vitest';
+
+import { fetchCallParticipants } from 'src/front-components/utils/fetch-call-participants.util';
+
+const buildCallRecordingConnection = (
+ callRecording: { id: string; calendarEventId: string | null } | undefined,
+) => ({
+ callRecordings: {
+ edges: callRecording === undefined ? [] : [{ node: callRecording }],
+ },
+});
+
+const buildParticipantConnection = (
+ participantIds: string[],
+ hasNextPage = false,
+) => ({
+ calendarEventParticipants: {
+ pageInfo: {
+ hasNextPage,
+ endCursor: hasNextPage ? 'next-cursor' : null,
+ },
+ edges: participantIds.map((participantId) => ({
+ node: { id: participantId, calendarEventId: 'calendar-event' },
+ })),
+ },
+});
+
+const buildPermissionDeniedError = () =>
+ Object.assign(new Error('Permission denied'), {
+ errors: [
+ {
+ message: 'Permission denied',
+ extensions: { code: 'FORBIDDEN', subCode: 'PERMISSION_DENIED' },
+ },
+ ],
+ });
+
+describe('fetchCallParticipants', () => {
+ it('reports a missing recording', async () => {
+ const query = vi
+ .fn()
+ .mockResolvedValueOnce(buildCallRecordingConnection(undefined));
+
+ await expect(
+ fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ }),
+ ).resolves.toEqual({ kind: 'callRecordingNotFound' });
+ expect(query).toHaveBeenCalledTimes(1);
+ });
+
+ it('reports a recording without a meeting without querying participants', async () => {
+ const query = vi.fn().mockResolvedValueOnce(
+ buildCallRecordingConnection({
+ id: 'call-recording',
+ calendarEventId: null,
+ }),
+ );
+
+ await expect(
+ fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ }),
+ ).resolves.toEqual({ kind: 'notLinkedToMeeting' });
+ expect(query).toHaveBeenCalledTimes(1);
+ });
+
+ it('reads participants flat by calendar event id across pages', async () => {
+ const query = vi
+ .fn()
+ .mockResolvedValueOnce(
+ buildCallRecordingConnection({
+ id: 'call-recording',
+ calendarEventId: 'calendar-event',
+ }),
+ )
+ .mockResolvedValueOnce(
+ buildParticipantConnection(['participant-1'], true),
+ )
+ .mockResolvedValueOnce(buildParticipantConnection(['participant-2']));
+
+ const result = await fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ });
+
+ expect(result).toEqual({
+ kind: 'loaded',
+ areRelationsLoaded: true,
+ participants: [
+ { id: 'participant-1', calendarEventId: 'calendar-event' },
+ { id: 'participant-2', calendarEventId: 'calendar-event' },
+ ],
+ });
+
+ expect(query.mock.calls[0][0].callRecordings.__args.filter).toEqual({
+ id: { eq: 'call-recording' },
+ });
+
+ const firstParticipantQuery = query.mock.calls[1][0];
+
+ expect(firstParticipantQuery.callRecordings).toBeUndefined();
+ expect(
+ firstParticipantQuery.calendarEventParticipants.__args.filter,
+ ).toEqual({ calendarEventId: { eq: 'calendar-event' } });
+ expect(
+ firstParticipantQuery.calendarEventParticipants.edges.node.person,
+ ).toBeDefined();
+ expect(query.mock.calls[2][0].calendarEventParticipants.__args.after).toBe(
+ 'next-cursor',
+ );
+ });
+
+ it('retries with the participants own fields when the relations cannot be read', async () => {
+ const query = vi
+ .fn()
+ .mockResolvedValueOnce(
+ buildCallRecordingConnection({
+ id: 'call-recording',
+ calendarEventId: 'calendar-event',
+ }),
+ )
+ .mockRejectedValueOnce(buildPermissionDeniedError())
+ .mockResolvedValueOnce(buildParticipantConnection(['participant-1']));
+
+ const result = await fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ });
+
+ expect(result).toEqual({
+ kind: 'loaded',
+ areRelationsLoaded: false,
+ participants: [
+ { id: 'participant-1', calendarEventId: 'calendar-event' },
+ ],
+ });
+
+ const fallbackNode =
+ query.mock.calls[2][0].calendarEventParticipants.edges.node;
+
+ expect(fallbackNode.person).toBeUndefined();
+ expect(fallbackNode.workspaceMember).toBeUndefined();
+ expect(fallbackNode.personId).toBe(true);
+ expect(fallbackNode.displayName).toBe(true);
+ });
+
+ it('fails when the fallback query fails too', async () => {
+ const query = vi
+ .fn()
+ .mockResolvedValueOnce(
+ buildCallRecordingConnection({
+ id: 'call-recording',
+ calendarEventId: 'calendar-event',
+ }),
+ )
+ .mockRejectedValueOnce(buildPermissionDeniedError())
+ .mockRejectedValueOnce(buildPermissionDeniedError());
+
+ await expect(
+ fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ }),
+ ).rejects.toThrow('Permission denied');
+ expect(query).toHaveBeenCalledTimes(3);
+ });
+
+ it('rethrows an error that is not a permission error without retrying', async () => {
+ const query = vi
+ .fn()
+ .mockResolvedValueOnce(
+ buildCallRecordingConnection({
+ id: 'call-recording',
+ calendarEventId: 'calendar-event',
+ }),
+ )
+ .mockRejectedValueOnce(new Error('Network failure'));
+
+ await expect(
+ fetchCallParticipants({
+ client: { query },
+ callRecordingId: 'call-recording',
+ }),
+ ).rejects.toThrow('Network failure');
+ expect(query).toHaveBeenCalledTimes(2);
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-permission-denied-error.test.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-permission-denied-error.test.ts
new file mode 100644
index 00000000000..38143c9089d
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-permission-denied-error.test.ts
@@ -0,0 +1,47 @@
+import { describe, expect, it } from 'vitest';
+
+import { isPermissionDeniedError } from 'src/front-components/utils/is-permission-denied-error.util';
+
+// Mirrors the GenqlError thrown by CoreApiClient for a GraphQL error payload.
+const buildGraphqlClientError = (errors: unknown[]) =>
+ Object.assign(new Error('GraphQL error'), { errors, data: null });
+
+describe('isPermissionDeniedError', () => {
+ it('detects a permission denied error from the workspace API', () => {
+ expect(
+ isPermissionDeniedError(
+ buildGraphqlClientError([
+ {
+ message: 'Permission denied',
+ extensions: {
+ code: 'FORBIDDEN',
+ subCode: 'PERMISSION_DENIED',
+ userFriendlyMessage: 'User does not have permission.',
+ },
+ },
+ ]),
+ ),
+ ).toBe(true);
+ });
+
+ it('ignores other GraphQL errors', () => {
+ expect(
+ isPermissionDeniedError(
+ buildGraphqlClientError([
+ { message: 'Bad input', extensions: { code: 'BAD_USER_INPUT' } },
+ { message: 'No extensions' },
+ ]),
+ ),
+ ).toBe(false);
+ });
+
+ it.each([
+ new Error('Network failure'),
+ new Error('Empty GraphQL response'),
+ 'FORBIDDEN',
+ null,
+ undefined,
+ ])('ignores errors without a GraphQL payload (%j)', (error) => {
+ expect(isPermissionDeniedError(error)).toBe(false);
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-show-unmatched-attendees-enabled.test.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-show-unmatched-attendees-enabled.test.ts
new file mode 100644
index 00000000000..944a684b3f8
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/is-show-unmatched-attendees-enabled.test.ts
@@ -0,0 +1,42 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+
+import { isShowUnmatchedAttendeesEnabled } from 'src/front-components/utils/is-show-unmatched-attendees-enabled.util';
+import { CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name';
+
+const stubShowUnmatchedAttendees = (value: string) =>
+ vi.stubEnv(
+ 'applicationVariables',
+ JSON.stringify({
+ [CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME]: value,
+ }),
+ );
+
+describe('isShowUnmatchedAttendeesEnabled', () => {
+ afterEach(() => {
+ vi.unstubAllEnvs();
+ });
+
+ it('is off when the variable is not configured', () => {
+ vi.stubEnv('applicationVariables', '{}');
+
+ expect(isShowUnmatchedAttendeesEnabled()).toBe(false);
+ });
+
+ it('is on when the variable is true', () => {
+ stubShowUnmatchedAttendees('true');
+
+ expect(isShowUnmatchedAttendeesEnabled()).toBe(true);
+ });
+
+ it('is off when the variable is false', () => {
+ stubShowUnmatchedAttendees('false');
+
+ expect(isShowUnmatchedAttendeesEnabled()).toBe(false);
+ });
+
+ it('falls back to off for an unrecognized value', () => {
+ stubShowUnmatchedAttendees('sometimes');
+
+ expect(isShowUnmatchedAttendeesEnabled()).toBe(false);
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/open-record.test.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/open-record.test.ts
new file mode 100644
index 00000000000..fa3a9f5cf0b
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/__tests__/open-record.test.ts
@@ -0,0 +1,36 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+
+const { openSidePanelPage, navigate } = vi.hoisted(() => ({
+ openSidePanelPage: vi.fn(() => Promise.resolve()),
+ navigate: vi.fn(() => Promise.resolve()),
+}));
+
+vi.mock('twenty-sdk/front-component', async (importOriginal) => ({
+ ...(await importOriginal<typeof import('twenty-sdk/front-component')>()),
+ openSidePanelPage,
+ navigate,
+}));
+
+import { SidePanelPages } from 'twenty-sdk/front-component';
+
+import { openRecord } from 'src/front-components/utils/open-record.util';
+
+describe('openRecord', () => {
+ afterEach(() => {
+ vi.clearAllMocks();
+ });
+
+ it('lets the host open the record where Twenty is configured to', async () => {
+ await openRecord({
+ objectNameSingular: 'callRecording',
+ recordId: 'call-recording-id',
+ });
+
+ expect(openSidePanelPage).toHaveBeenCalledWith({
+ page: SidePanelPages.ViewRecord,
+ objectNameSingular: 'callRecording',
+ recordId: 'call-recording-id',
+ });
+ expect(navigate).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/build-call-participant-display-items.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/build-call-participant-display-items.util.ts
new file mode 100644
index 00000000000..4f3f931eebd
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/build-call-participant-display-items.util.ts
@@ -0,0 +1,176 @@
+import { isNonEmptyString, isUndefined } from '@sniptt/guards';
+import { isDefined } from 'twenty-sdk/utils';
+
+import { type CallParticipantDisplayItem } from 'src/front-components/types/call-participant-display-item.type';
+import { type CallParticipantNode } from 'src/front-components/types/call-participant-node.type';
+import { getFirstNonEmptyString } from 'src/front-components/utils/get-first-non-empty-string.util';
+import { getFullName } from 'src/front-components/utils/get-full-name.util';
+import { stripRestrictedFieldValue } from 'src/logic-functions/data/strip-restricted-field-value.util';
+
+const UNNAMED_PARTICIPANT_LABEL = 'Unnamed participant';
+
+const DISPLAY_ITEM_KIND_ORDER: Record<
+ CallParticipantDisplayItem['kind'],
+ number
+> = {
+ person: 0,
+ workspaceMember: 1,
+ unmatched: 2,
+};
+
+type BuildCallParticipantDisplayItemsResult = {
+ items: CallParticipantDisplayItem[];
+};
+
+// A null relation next to its id means the record is deleted or unreadable.
+const getMatchedRecordId = ({
+ recordId,
+ relatedRecord,
+ areRelationsLoaded,
+}: {
+ recordId: string | null | undefined;
+ relatedRecord: { id: string } | null | undefined;
+ areRelationsLoaded: boolean;
+}): string | undefined => {
+ if (areRelationsLoaded) {
+ return isDefined(relatedRecord) ? relatedRecord.id : undefined;
+ }
+
+ return isNonEmptyString(recordId) ? recordId : undefined;
+};
+
+const toDisplayItem = ({
+ participant,
+ areRelationsLoaded,
+}: {
+ participant: CallParticipantNode;
+ areRelationsLoaded: boolean;
+}): CallParticipantDisplayItem | undefined => {
+ const isOrganizer = participant.isOrganizer ?? false;
+ const handle = getFirstNonEmptyString([
+ stripRestrictedFieldValue(participant.handle ?? undefined),
+ ]);
+ const attendeeLabel =
+ getFirstNonEmptyString([
+ stripRestrictedFieldValue(participant.displayName ?? undefined),
+ ]) ?? handle;
+
+ // A matched person wins over a workspace member: it has a record page.
+ const personId = getMatchedRecordId({
+ recordId: participant.personId,
+ relatedRecord: participant.person,
+ areRelationsLoaded,
+ });
+
+ if (!isUndefined(personId)) {
+ return {
+ kind: 'person',
+ key: `person:${personId}`,
+ personId,
+ label:
+ getFullName(participant.person?.name) ??
+ attendeeLabel ??
+ UNNAMED_PARTICIPANT_LABEL,
+ avatarUrl: getFirstNonEmptyString([
+ participant.person?.avatarFile?.[0]?.url,
+ participant.person?.avatarUrl,
+ ]),
+ isOrganizer,
+ };
+ }
+
+ const workspaceMemberId = getMatchedRecordId({
+ recordId: participant.workspaceMemberId,
+ relatedRecord: participant.workspaceMember,
+ areRelationsLoaded,
+ });
+
+ if (!isUndefined(workspaceMemberId)) {
+ return {
+ kind: 'workspaceMember',
+ key: `workspaceMember:${workspaceMemberId}`,
+ workspaceMemberId,
+ label:
+ getFullName(participant.workspaceMember?.name) ??
+ attendeeLabel ??
+ UNNAMED_PARTICIPANT_LABEL,
+ avatarUrl: getFirstNonEmptyString([
+ participant.workspaceMember?.avatarUrl,
+ ]),
+ isOrganizer,
+ };
+ }
+
+ if (!isNonEmptyString(attendeeLabel)) {
+ return undefined;
+ }
+
+ return {
+ kind: 'unmatched',
+ key: isNonEmptyString(handle)
+ ? `handle:${handle.toLowerCase()}`
+ : `participant:${participant.id}`,
+ label: attendeeLabel,
+ isOrganizer,
+ };
+};
+
+const compareDisplayItems = (
+ firstItem: CallParticipantDisplayItem,
+ secondItem: CallParticipantDisplayItem,
+): number => {
+ if (firstItem.isOrganizer !== secondItem.isOrganizer) {
+ return firstItem.isOrganizer ? -1 : 1;
+ }
+
+ const kindOrderDifference =
+ DISPLAY_ITEM_KIND_ORDER[firstItem.kind] -
+ DISPLAY_ITEM_KIND_ORDER[secondItem.kind];
+
+ if (kindOrderDifference !== 0) {
+ return kindOrderDifference;
+ }
+
+ return firstItem.label.localeCompare(secondItem.label);
+};
+
+export const buildCallParticipantDisplayItems = ({
+ participants,
+ areRelationsLoaded,
+ showUnmatchedAttendees,
+}: {
+ participants: CallParticipantNode[];
+ areRelationsLoaded: boolean;
+ showUnmatchedAttendees: boolean;
+}): BuildCallParticipantDisplayItemsResult => {
+ const displayItemsByKey = new Map<string, CallParticipantDisplayItem>();
+
+ for (const participant of participants) {
+ const displayItem = toDisplayItem({ participant, areRelationsLoaded });
+
+ if (isUndefined(displayItem)) {
+ continue;
+ }
+
+ if (displayItem.kind === 'unmatched' && !showUnmatchedAttendees) {
+ continue;
+ }
+
+ const existingDisplayItem = displayItemsByKey.get(displayItem.key);
+
+ displayItemsByKey.set(
+ displayItem.key,
+ isUndefined(existingDisplayItem)
+ ? displayItem
+ : {
+ ...existingDisplayItem,
+ isOrganizer:
+ existingDisplayItem.isOrganizer || displayItem.isOrganizer,
+ },
+ );
+ }
+
+ return {
+ items: [...displayItemsByKey.values()].sort(compareDisplayItems),
+ };
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/fetch-call-participants.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/fetch-call-participants.util.ts
new file mode 100644
index 00000000000..28f35e784e4
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/fetch-call-participants.util.ts
@@ -0,0 +1,169 @@
+import { isNonEmptyString, isUndefined } from '@sniptt/guards';
+import { type CoreApiClient } from 'twenty-client-sdk/core';
+import { isDefined } from 'twenty-sdk/utils';
+
+import { CALL_PARTICIPANTS_WIDGET_MAX_PARTICIPANTS } from 'src/front-components/constants/call-participants-widget-max-participants.constant';
+import { type CallParticipantNode } from 'src/front-components/types/call-participant-node.type';
+import { type CallParticipantsResult } from 'src/front-components/types/call-participants-result.type';
+import { isPermissionDeniedError } from 'src/front-components/utils/is-permission-denied-error.util';
+import { TWENTY_PAGE_SIZE } from 'src/logic-functions/constants/twenty-page-size';
+import {
+ fetchAllNodes,
+ type ConnectionPage,
+} from 'src/logic-functions/data/fetch-all-nodes.util';
+
+type QueryClient = Pick<CoreApiClient, 'query'>;
+
+type CallRecordingCalendarEventNode = {
+ id: string;
+ calendarEventId?: string | null;
+};
+
+const fetchCallRecordingCalendarEventNode = async ({
+ client,
+ callRecordingId,
+}: {
+ client: QueryClient;
+ callRecordingId: string;
+}): Promise<CallRecordingCalendarEventNode | undefined> => {
+ const queryResult = await client.query({
+ callRecordings: {
+ __args: {
+ filter: { id: { eq: callRecordingId } },
+ first: 1,
+ },
+ edges: {
+ node: {
+ id: true,
+ calendarEventId: true,
+ },
+ },
+ },
+ });
+
+ const callRecordingNode = (
+ queryResult.callRecordings as
+ | ConnectionPage<CallRecordingCalendarEventNode>
+ | undefined
+ )?.edges?.[0]?.node;
+
+ return isDefined(callRecordingNode) ? callRecordingNode : undefined;
+};
+
+const PARTICIPANT_SCALAR_FIELDS = {
+ id: true,
+ handle: true,
+ displayName: true,
+ isOrganizer: true,
+ personId: true,
+ workspaceMemberId: true,
+};
+
+const PARTICIPANT_RELATION_FIELDS = {
+ person: {
+ id: true,
+ name: { firstName: true, lastName: true },
+ avatarUrl: true,
+ avatarFile: { url: true },
+ },
+ workspaceMember: {
+ id: true,
+ name: { firstName: true, lastName: true },
+ avatarUrl: true,
+ },
+};
+
+// The API returns one-to-many relations nested under a many-to-one as empty.
+const fetchParticipantsForCalendarEvent = async ({
+ client,
+ calendarEventId,
+ areRelationsLoaded,
+}: {
+ client: QueryClient;
+ calendarEventId: string;
+ areRelationsLoaded: boolean;
+}): Promise<CallParticipantNode[]> => {
+ let fetchedParticipantCount = 0;
+
+ return fetchAllNodes<CallParticipantNode>(
+ async (afterCursor) => {
+ const queryResult = await client.query({
+ calendarEventParticipants: {
+ __args: {
+ filter: { calendarEventId: { eq: calendarEventId } },
+ first: TWENTY_PAGE_SIZE,
+ ...(isUndefined(afterCursor) ? {} : { after: afterCursor }),
+ },
+ pageInfo: {
+ hasNextPage: true,
+ endCursor: true,
+ },
+ edges: {
+ node: {
+ ...PARTICIPANT_SCALAR_FIELDS,
+ ...(areRelationsLoaded ? PARTICIPANT_RELATION_FIELDS : {}),
+ },
+ },
+ },
+ });
+
+ const connection = queryResult.calendarEventParticipants as
+ | ConnectionPage<CallParticipantNode>
+ | undefined;
+
+ fetchedParticipantCount += connection?.edges?.length ?? 0;
+
+ return connection;
+ },
+ () => fetchedParticipantCount < CALL_PARTICIPANTS_WIDGET_MAX_PARTICIPANTS,
+ );
+};
+
+export const fetchCallParticipants = async ({
+ client,
+ callRecordingId,
+}: {
+ client: QueryClient;
+ callRecordingId: string;
+}): Promise<CallParticipantsResult> => {
+ const callRecordingNode = await fetchCallRecordingCalendarEventNode({
+ client,
+ callRecordingId,
+ });
+
+ if (isUndefined(callRecordingNode)) {
+ return { kind: 'callRecordingNotFound' };
+ }
+
+ const calendarEventId = callRecordingNode.calendarEventId;
+
+ if (!isNonEmptyString(calendarEventId)) {
+ return { kind: 'notLinkedToMeeting' };
+ }
+
+ try {
+ return {
+ kind: 'loaded',
+ participants: await fetchParticipantsForCalendarEvent({
+ client,
+ calendarEventId,
+ areRelationsLoaded: true,
+ }),
+ areRelationsLoaded: true,
+ };
+ } catch (error) {
+ if (!isPermissionDeniedError(error)) {
+ throw error;
+ }
+
+ return {
+ kind: 'loaded',
+ participants: await fetchParticipantsForCalendarEvent({
+ client,
+ calendarEventId,
+ areRelationsLoaded: false,
+ }),
+ areRelationsLoaded: false,
+ };
+ }
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-first-non-empty-string.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-first-non-empty-string.util.ts
new file mode 100644
index 00000000000..cc15aa69568
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-first-non-empty-string.util.ts
@@ -0,0 +1,8 @@
+import { isNonEmptyString } from '@sniptt/guards';
+
+export const getFirstNonEmptyString = (
+ values: Array<string | null | undefined>,
+): string | undefined =>
+ values
+ .map((value) => value?.trim())
+ .find((value): value is string => isNonEmptyString(value));
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-full-name.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-full-name.util.ts
new file mode 100644
index 00000000000..c93ade13872
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/get-full-name.util.ts
@@ -0,0 +1,14 @@
+import { isNonEmptyString } from '@sniptt/guards';
+
+import { type FullNameNode } from 'src/front-components/types/full-name-node.type';
+
+export const getFullName = (
+ name: FullNameNode | null | undefined,
+): string | undefined => {
+ const fullName = [name?.firstName, name?.lastName]
+ .map((namePart) => namePart?.trim())
+ .filter((namePart): namePart is string => isNonEmptyString(namePart))
+ .join(' ');
+
+ return isNonEmptyString(fullName) ? fullName : undefined;
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-permission-denied-error.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-permission-denied-error.util.ts
new file mode 100644
index 00000000000..98d2424c8b4
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-permission-denied-error.util.ts
@@ -0,0 +1,18 @@
+import { isArray, isObject } from '@sniptt/guards';
+
+const FORBIDDEN_ERROR_CODE = 'FORBIDDEN';
+
+export const isPermissionDeniedError = (error: unknown): boolean => {
+ if (!isObject(error) || !('errors' in error) || !isArray(error.errors)) {
+ return false;
+ }
+
+ return error.errors.some(
+ (graphqlError) =>
+ isObject(graphqlError) &&
+ 'extensions' in graphqlError &&
+ isObject(graphqlError.extensions) &&
+ 'code' in graphqlError.extensions &&
+ graphqlError.extensions.code === FORBIDDEN_ERROR_CODE,
+ );
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-show-unmatched-attendees-enabled.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-show-unmatched-attendees-enabled.util.ts
new file mode 100644
index 00000000000..b737ee4a6aa
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/is-show-unmatched-attendees-enabled.util.ts
@@ -0,0 +1,12 @@
+import { CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME } from 'src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name';
+import { DEFAULT_CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES } from 'src/logic-functions/constants/default-call-recorder-show-unmatched-attendees';
+import { getApplicationVariableValue } from 'src/front-components/utils/get-application-variable-value.util';
+import { parseBooleanApplicationVariableValue } from 'src/logic-functions/utils/parse-boolean-application-variable-value.util';
+
+export const isShowUnmatchedAttendeesEnabled = (): boolean =>
+ parseBooleanApplicationVariableValue({
+ rawValue: getApplicationVariableValue(
+ CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME,
+ ),
+ defaultValue: DEFAULT_CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES,
+ });
diff --git a/packages/twenty-apps/public/call-recorder/src/front-components/utils/open-record.util.ts b/packages/twenty-apps/public/call-recorder/src/front-components/utils/open-record.util.ts
new file mode 100644
index 00000000000..18fa8a0df3a
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/front-components/utils/open-record.util.ts
@@ -0,0 +1,15 @@
+import { openSidePanelPage, SidePanelPages } from 'twenty-sdk/front-component';
+
+// ViewRecord follows the object's "open record in" setting, like native chips.
+export const openRecord = ({
+ objectNameSingular,
+ recordId,
+}: {
+ objectNameSingular: string;
+ recordId: string;
+}): Promise<void> =>
+ openSidePanelPage({
+ page: SidePanelPages.ViewRecord,
+ objectNameSingular,
+ recordId,
+ });
diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name.ts
new file mode 100644
index 00000000000..b2bf3575c69
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/call-recorder-show-unmatched-attendees-env-var-name.ts
@@ -0,0 +1,2 @@
+export const CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES_ENV_VAR_NAME =
+ 'CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES';
diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/default-call-recorder-show-unmatched-attendees.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/default-call-recorder-show-unmatched-attendees.ts
new file mode 100644
index 00000000000..72999e293e2
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/default-call-recorder-show-unmatched-attendees.ts
@@ -0,0 +1 @@
+export const DEFAULT_CALL_RECORDER_SHOW_UNMATCHED_ATTENDEES = false;
diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/__tests__/parse-boolean-application-variable-value.test.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/__tests__/parse-boolean-application-variable-value.test.ts
new file mode 100644
index 00000000000..fc3694ac0b1
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/__tests__/parse-boolean-application-variable-value.test.ts
@@ -0,0 +1,44 @@
+import { describe, expect, it } from 'vitest';
+
+import { parseBooleanApplicationVariableValue } from 'src/logic-functions/utils/parse-boolean-application-variable-value.util';
+
+describe('parseBooleanApplicationVariableValue', () => {
+ it.each([undefined, '', ' '])(
+ 'returns the default for a missing value (%j)',
+ (rawValue) => {
+ expect(
+ parseBooleanApplicationVariableValue({ rawValue, defaultValue: true }),
+ ).toBe(true);
+ expect(
+ parseBooleanApplicationVariableValue({ rawValue, defaultValue: false }),
+ ).toBe(false);
+ },
+ );
+
+ it.each(['true', ' TRUE ', '1', 'yes', 'on'])(
+ 'returns true for %j',
+ (rawValue) => {
+ expect(
+ parseBooleanApplicationVariableValue({ rawValue, defaultValue: false }),
+ ).toBe(true);
+ },
+ );
+
+ it.each(['false', ' False ', '0', 'no', 'off'])(
+ 'returns false for %j',
+ (rawValue) => {
+ expect(
+ parseBooleanApplicationVariableValue({ rawValue, defaultValue: true }),
+ ).toBe(false);
+ },
+ );
+
+ it('returns the default for an unrecognized value', () => {
+ expect(
+ parseBooleanApplicationVariableValue({
+ rawValue: 'maybe',
+ defaultValue: false,
+ }),
+ ).toBe(false);
+ });
+});
diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/get-boolean-application-variable-value.util.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/get-boolean-application-variable-value.util.ts
index e7480a97d0f..7bf7e49692b 100644
--- a/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/get-boolean-application-variable-value.util.ts
+++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/get-boolean-application-variable-value.util.ts
@@ -1,8 +1,5 @@
import { getApplicationVariableValue } from 'src/logic-functions/utils/get-application-variable-value.util';
-import { isNonEmptyString } from 'src/logic-functions/utils/is-non-empty-string.util';
-
-const TRUTHY_VALUES = new Set(['true', '1', 'yes', 'on']);
-const FALSY_VALUES = new Set(['false', '0', 'no', 'off']);
+import { parseBooleanApplicationVariableValue } from 'src/logic-functions/utils/parse-boolean-application-variable-value.util';
export const getBooleanApplicationVariableValue = ({
applicationVariableName,
@@ -10,22 +7,8 @@ export const getBooleanApplicationVariableValue = ({
}: {
applicationVariableName: string;
defaultValue: boolean;
-}): boolean => {
- const rawValue = getApplicationVariableValue(applicationVariableName);
-
- if (!isNonEmptyString(rawValue)) {
- return defaultValue;
- }
-
- const normalizedValue = rawValue.trim().toLowerCase();
-
- if (TRUTHY_VALUES.has(normalizedValue)) {
- return true;
- }
-
- if (FALSY_VALUES.has(normalizedValue)) {
- return false;
- }
-
- return defaultValue;
-};
+}): boolean =>
+ parseBooleanApplicationVariableValue({
+ rawValue: getApplicationVariableValue(applicationVariableName),
+ defaultValue,
+ });
diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/parse-boolean-application-variable-value.util.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/parse-boolean-application-variable-value.util.ts
new file mode 100644
index 00000000000..2d5e96739d7
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/utils/parse-boolean-application-variable-value.util.ts
@@ -0,0 +1,28 @@
+import { isNonEmptyString } from 'src/logic-functions/utils/is-non-empty-string.util';
+
+const TRUTHY_VALUES = new Set(['true', '1', 'yes', 'on']);
+const FALSY_VALUES = new Set(['false', '0', 'no', 'off']);
+
+export const parseBooleanApplicationVariableValue = ({
+ rawValue,
+ defaultValue,
+}: {
+ rawValue: string | undefined;
+ defaultValue: boolean;
+}): boolean => {
+ if (!isNonEmptyString(rawValue)) {
+ return defaultValue;
+ }
+
+ const normalizedValue = rawValue.trim().toLowerCase();
+
+ if (TRUTHY_VALUES.has(normalizedValue)) {
+ return true;
+ }
+
+ if (FALSY_VALUES.has(normalizedValue)) {
+ return false;
+ }
+
+ return defaultValue;
+};
diff --git a/packages/twenty-apps/public/call-recorder/src/page-layout-widgets/call-participants-on-call-recording.page-layout-widget.ts b/packages/twenty-apps/public/call-recorder/src/page-layout-widgets/call-participants-on-call-recording.page-layout-widget.ts
new file mode 100644
index 00000000000..d95cb92c8f3
--- /dev/null
+++ b/packages/twenty-apps/public/call-recorder/src/page-layout-widgets/call-participants-on-call-recording.page-layout-widget.ts
@@ -0,0 +1,30 @@
+import {
+ definePageLayoutWidget,
+ PageLayoutTabLayoutMode,
+ STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS,
+} from 'twenty-sdk/define';
+
+import {
+ CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,
+ CALL_PARTICIPANTS_ON_CALL_RECORDING_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,
+} from 'src/constants/universal-identifiers';
+import { CALL_RECORDER_HOME_TAB_WIDGET_INDEX } from 'src/constants/call-recorder-home-tab-widget-index';
+
+export default definePageLayoutWidget({
+ universalIdentifier:
+ CALL_PARTICIPANTS_ON_CALL_RECORDING_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,
+ pageLayoutTabUniversalIdentifier:
+ STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS.callRecordingRecordPage.tabs.home
+ .universalIdentifier,
+ title: 'Call participants',
+ type: 'FRONT_COMPONENT',
+ position: {
+ layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,
+ index: CALL_RECORDER_HOME_TAB_WIDGET_INDEX,
+ },
+ configuration: {
+ configurationType: 'FRONT_COMPONENT',
+ frontComponentUniversalIdentifier:
+ CALL_PARTICIPANTS_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,
+ },
+});
diff --git a/packages/twenty-apps/public/call-recorder/yarn.lock b/packages/twenty-apps/public/call-recorder/yarn.lock
index 851e2aa357a..ad13bd67029 100644
--- a/packages/twenty-apps/public/call-recorder/yarn.lock
+++ b/packages/twenty-apps/public/call-recorder/yarn.lock
@@ -1401,8 +1401,8 @@ __metadata:
react: "npm:^19.0.0"
react-dom: "npm:^19.0.0"
sharp: "npm:^0.35.3"
- twenty-client-sdk: "npm:2.42.0"
- twenty-sdk: "npm:2.42.0"
+ twenty-client-sdk: "npm:2.43.0"
+ twenty-sdk: "npm:2.43.0"
twenty-ui: "npm:^1.0.0-alpha.1"
typescript: "npm:^5.9.3"
use-debounce: "npm:^10.0.0"
@@ -3620,22 +3620,22 @@ __metadata:
languageName: node
linkType: hard
-"twenty-client-sdk@npm:2.42.0":
- version: 2.42.0
- resolution: "twenty-client-sdk@npm:2.42.0"
+"twenty-client-sdk@npm:2.43.0":
+ version: 2.43.0
+ resolution: "twenty-client-sdk@npm:2.43.0"
dependencies:
"@genql/runtime": "npm:^2.10.0"
esbuild: "npm:^0.28.1"
graphql: "npm:^16.8.1"
lodash: "npm:^4.17.21"
prettier: "npm:^3.8.3"
- checksum: 10c0/38f77595ffc2bb365cef23a30d7ab7096fcf129d407921bb97497327da27526e9721ba6a1a16d299bd9b3a2e3f0eeac3fb41ec360c0547e7a2c0f0c044cc570b
+ checksum: 10c0/3b304379688b165c53e9b06715f6de024b68ce49aff055d6135ad74c8799f5174ca5e9bcea20156323f856af2c6d728160feaf337e8b68328f7d1b721e3d1f45
languageName: node
linkType: hard
-"twenty-sdk@npm:2.42.0":
- version: 2.42.0
- resolution: "twenty-sdk@npm:2.42.0"
+"twenty-sdk@npm:2.43.0":
+ version: 2.43.0
+ resolution: "twenty-sdk@npm:2.43.0"
dependencies:
"@sniptt/guards": "npm:^0.2.0"
axios: "npm:^1.16.0"
@@ -3654,12 +3654,12 @@ __metadata:
semver: "npm:7.6.3"
sharp: "npm:^0.35.3"
tinyglobby: "npm:^0.2.15"
- twenty-client-sdk: "npm:2.42.0"
+ twenty-client-sdk: "npm:2.43.0"
typescript: "npm:^5.9.3"
uuid: "npm:^13.0.2"
bin:
twenty: dist/cli.cjs
- checksum: 10c0/1e43d0c2af55ab8705506f55fe693688575325e506b6cfb16ba4d486d0bfdc0c0f257fc8963ee86f218c10d09b87bacdc769803b6b59283f9e24c7a88346fb84
+ checksum: 10c0/63723aaf55d750249a348e5495dc126106a18c12c237103bcae38cf92d9dd505c457ad5bb6ea88159aebc8b5295c4a21e4beaa687181080d3e3cec64296d75d3
languageName: node
linkType: hard