chore(electron): add telemetry events for enabling meetings (#11327)

fix AF-2436
This commit is contained in:
pengx17
2025-04-01 09:01:31 +00:00
parent 275098abe2
commit 9cb80205f8
12 changed files with 143 additions and 7 deletions
+76 -1
View File
@@ -165,6 +165,18 @@ type IntegrationEvents =
| 'completeIntegrationImport';
// END SECTION
// SECTION: journal
type MeetingEvents =
| 'toggleRecordingBar'
| 'startRecording'
| 'dismissRecording'
| 'finishRecording'
| 'transcribeRecording'
| 'openTranscribeNotes'
| 'toggleMeetingFeatureFlag'
| 'activeMenubarAppItem';
// END SECTION
type UserEvents =
| GeneralEvents
| AppEvents
@@ -185,7 +197,8 @@ type UserEvents =
| AttachmentEvents
| TemplateEvents
| NotificationEvents
| IntegrationEvents;
| IntegrationEvents
| MeetingEvents;
interface PageDivision {
[page: string]: {
[segment: string]: {
@@ -262,6 +275,7 @@ const PageEvents = {
'abortIntegrationImport',
'completeIntegrationImport',
],
meetings: ['toggleMeetingFeatureFlag'],
},
cmdk: {
recent: ['recentDocs'],
@@ -403,6 +417,7 @@ const PageEvents = {
],
aiActions: ['requestSignIn'],
starterBar: ['quickStart', 'openTemplateListMenu'],
audioBlock: ['transcribeRecording', 'openTranscribeNotes'],
},
inlineDocInfo: {
$: ['toggle'],
@@ -459,6 +474,21 @@ const PageEvents = {
$: ['checkout'],
},
},
menubarApp: {
menubarActionsMenu: {
menubarActionsList: ['activeMenubarAppItem', 'startRecording'],
},
},
popup: {
$: {
recordingBar: [
'toggleRecordingBar',
'startRecording',
'dismissRecording',
'finishRecording',
],
},
},
} as const satisfies PageDivision;
type OrganizeItemType = 'doc' | 'folder' | 'collection' | 'tag' | 'favorite';
@@ -520,6 +550,12 @@ type IntegrationArgs<T extends Record<string, any>> = {
control: 'Readwise Card' | 'Readwise settings' | 'Readwise import list';
} & T;
type RecordingEventArgs = {
type: 'Meeting record';
method?: string;
option?: 'Auto transcribing' | 'handle transcribing' | 'on' | 'off';
};
export type EventArgs = {
createWorkspace: { flavour: string };
signIn: AuthArgs;
@@ -622,6 +658,45 @@ export type EventArgs = {
done: number;
total: number;
}>;
toggleRecordingBar: RecordingEventArgs & {
method: string;
appName: string;
};
startRecording: RecordingEventArgs & {
method: string;
appName: string;
};
dismissRecording: RecordingEventArgs & {
method: string;
appName: string;
};
finishRecording: RecordingEventArgs & {
method: 'fail' | 'success';
appName: string;
};
transcribeRecording: RecordingEventArgs & {
method: 'fail' | 'success';
option: 'Auto transcribing' | 'handle transcribing';
};
openTranscribeNotes: RecordingEventArgs & {
method: 'success' | 'reach limit' | 'not signed in' | 'not owner';
option: 'on' | 'off';
};
toggleMeetingFeatureFlag: RecordingEventArgs & {
option: 'on' | 'off';
};
activeMenubarAppItem: RecordingEventArgs & {
control:
| 'Open Journal'
| 'New Page'
| 'New Edgeless'
| 'Start recording meeting'
| 'Stop recording'
| 'Open AFFiNE'
| 'About AFFiNE'
| 'Meeting Settings'
| 'Quit AFFiNE Completely';
};
};
// for type checking