From efeca7ff7aacd3d1e2a3082ac1e058183b2c5946 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Jul 2026 21:59:18 -0500 Subject: [PATCH] make close ignore rather than decline --- src/app/components/IncomingCallModal.tsx | 35 ++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/app/components/IncomingCallModal.tsx b/src/app/components/IncomingCallModal.tsx index d696cd56b..3612ab44d 100644 --- a/src/app/components/IncomingCallModal.tsx +++ b/src/app/components/IncomingCallModal.tsx @@ -109,7 +109,7 @@ export function IncomingCallInternal({ room, incomingCall, onClose }: IncomingCa : 'Incoming voice call' : 'Incoming room call notification'; const dismissLabel = isDirectRing ? 'Decline' : 'Ignore'; - const closeLabel = isDirectRing ? 'Close and decline call' : 'Close and ignore notification'; + const closeLabel = 'Close'; const showCallerAvatar = incomingCall.isDirect; const title = showCallerAvatar ? callerDisplayName : roomName; const subtitle = showCallerAvatar ? roomName : callerDisplayName; @@ -187,11 +187,40 @@ export function IncomingCallInternal({ room, incomingCall, onClose }: IncomingCa } }; + const handleClose = () => { + setCallSoundBlocked(false); + const action = 'ignore'; + debugLog.info('call', 'Incoming call dismissed', { + roomId: room.roomId, + action, + notificationEventId: incomingCall.notificationEventId, + notificationType: incomingCall.notificationType, + }); + Sentry.addBreadcrumb({ + category: 'call.signal', + message: `Incoming call ${action}`, + data: { + roomId: room.roomId, + notificationEventId: incomingCall.notificationEventId, + }, + }); + Sentry.metrics.count(`sable.call.${action}d`, 1, { + attributes: { + type: incomingCall.notificationType, + dm: String(incomingCall.isDirect), + }, + }); + + setMutedRoomId(room.roomId); + void dismissSystemCallNotifications(room.roomId); + onClose(); + }; + const handleModalKeyDown = (evt: ReactKeyboardEvent) => { if (evt.key === 'Escape') { evt.preventDefault(); evt.stopPropagation(); - handleDeclineOrIgnore(); + handleClose(); return; } if (evt.key === 'Enter' && canAnswer) { @@ -221,7 +250,7 @@ export function IncomingCallInternal({ room, incomingCall, onClose }: IncomingCa