Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix[callkit]: guard with feature flag (#3135)
Peter Chinman1976a565678e
diff --git a/js/app/packages/channel/Call/use-callkit.ts b/js/app/packages/channel/Call/use-callkit.tsindex 6aee6f426a..1330dd9428 100644--- a/js/app/packages/channel/Call/use-callkit.ts+++ b/js/app/packages/channel/Call/use-callkit.ts@@ -1,3 +1,4 @@+import { ENABLE_CALLKIT } from '@core/constant/featureFlags';import { isPlatform, isTauri } from '@core/util/platform';import { notificationServiceClient } from '@service-notification/client';import type { DeviceType } from '@service-notification/generated/schemas/deviceType';@@ -28,6 +29,7 @@ const callEndedHandlers: CallEndedHandler[] = [];export function registerCallKitCallEndedHandler(handler: CallEndedHandler): () => void {+ if (!ENABLE_CALLKIT) return () => {};callEndedHandlers.push(handler);return () => {const index = callEndedHandlers.lastIndexOf(handler);@@ -50,7 +52,7 @@ function getActiveCallEndedHandler(): CallEndedHandler | undefined {*/export function useCallKitSetup() {onMount(() => {- if (!isTauri() || !isPlatform('ios')) return;+ if (!ENABLE_CALLKIT || !isTauri() || !isPlatform('ios')) return;let cleaned = false;const unlistens: Array<() => void> = [];@@ -123,7 +125,7 @@ export function useCallKitSetup() {* the user leaves from within the app rather than from the CallKit sheet.*/export async function endCallKitCall(): Promise<void> {- if (!isTauri() || !isPlatform('ios')) return;+ if (!ENABLE_CALLKIT || !isTauri() || !isPlatform('ios')) return;await invoke('plugin:call-kit|end_active_call').catch((err) =>console.error('callkit: failed to end active call', err));diff --git a/js/app/packages/core/constant/featureFlags.ts b/js/app/packages/core/constant/featureFlags.tsindex f05a2e0c1c..d20477a793 100644--- a/js/app/packages/core/constant/featureFlags.ts+++ b/js/app/packages/core/constant/featureFlags.ts@@ -342,3 +342,5 @@ export const ENABLE_AUTO_UPDATE_UI = resolveFeatureFlag('ENABLE_AUTO_UPDATE_UI',false);++export const ENABLE_CALLKIT = resolveFeatureFlag('ENABLE_CALLKIT', false);