From 9dbe53a36a57b6b019495fead550e41f94f630e8 Mon Sep 17 00:00:00 2001 From: hazre Date: Wed, 11 Feb 2026 15:18:16 +0100 Subject: [PATCH] fix: clean up call nav/call view console warnings --- src/app/features/call/CallView.tsx | 10 +- src/app/features/room-nav/RoomNavItem.tsx | 165 ++++++++++----------- src/app/features/room-nav/RoomNavUser.tsx | 6 +- src/app/pages/client/call/CallProvider.tsx | 4 +- 4 files changed, 94 insertions(+), 91 deletions(-) diff --git a/src/app/features/call/CallView.tsx b/src/app/features/call/CallView.tsx index 72867001..060a9cf7 100644 --- a/src/app/features/call/CallView.tsx +++ b/src/app/features/call/CallView.tsx @@ -209,9 +209,13 @@ export function CallView({ room }: { room: Room }) { }} > - {callMembers - .map((callMember) => ) - .slice(0, 6)} + {callMembers.slice(0, 6).map((callMember) => ( + + ))} = (evt) => { - const target = evt.target as HTMLElement; - const chatButton = (evt.currentTarget as HTMLElement).querySelector( - '[data-testid="chat-button"]' - ); - if (chatButton && chatButton.contains(target)) { - return; - } if (room.isCallRoom()) { if (!isMobile) { if (!isActiveCall) { @@ -308,6 +302,7 @@ export function RoomNavItem({ evt.stopPropagation(); if (!isChatOpen) toggleChat(); setViewedCallRoomId(room.roomId); + navigate(linkPath); }; const optionsVisible = hover || !!menuAnchor; @@ -398,86 +393,88 @@ export function RoomNavItem({ )} - {optionsVisible && ( - - setMenuAnchor(undefined), - clickOutsideDeactivates: true, - isKeyForward: (evt: KeyboardEvent) => evt.key === 'ArrowDown', - isKeyBackward: (evt: KeyboardEvent) => evt.key === 'ArrowUp', - escapeDeactivates: stopPropagation, - }} - > - setMenuAnchor(undefined)} - notificationMode={notificationMode} - /> - - } - > - {room.isCallRoom() && ( - - Open Chat - - } - > - {(triggerRef) => ( - - - - - - )} - - )} - - - - - - )} + {optionsVisible && ( + + setMenuAnchor(undefined), + clickOutsideDeactivates: true, + isKeyForward: (evt: KeyboardEvent) => evt.key === 'ArrowDown', + isKeyBackward: (evt: KeyboardEvent) => evt.key === 'ArrowUp', + escapeDeactivates: stopPropagation, + }} + > + setMenuAnchor(undefined)} + notificationMode={notificationMode} + /> + + } + > + {room.isCallRoom() && ( + + Open Chat + + } + > + {(triggerRef) => ( + + + + )} + + )} + + + + + + )} {room.isCallRoom() && ( {callMemberships.map((callMembership) => ( - + ))} )} diff --git a/src/app/features/room-nav/RoomNavUser.tsx b/src/app/features/room-nav/RoomNavUser.tsx index 68e3eef2..96795647 100644 --- a/src/app/features/room-nav/RoomNavUser.tsx +++ b/src/app/features/room-nav/RoomNavUser.tsx @@ -40,9 +40,9 @@ export function RoomNavUser({ room, callMembership }: RoomNavUserProps) { return ( - + - + } /> - + {getName} diff --git a/src/app/pages/client/call/CallProvider.tsx b/src/app/pages/client/call/CallProvider.tsx index fa550a6c..ffa15e94 100644 --- a/src/app/pages/client/call/CallProvider.tsx +++ b/src/app/pages/client/call/CallProvider.tsx @@ -257,9 +257,11 @@ export function CallProvider({ children }: CallProviderProps) { setIsActiveCallReady(true); }; - sendWidgetAction(WIDGET_MEDIA_STATE_UPDATE_ACTION, { + void sendWidgetAction(WIDGET_MEDIA_STATE_UPDATE_ACTION, { audio_enabled: isAudioEnabled, video_enabled: isVideoEnabled, + }).catch(() => { + // Widget transport may reject while call/session setup is still in progress. }); activeClientWidgetApi.on(`action:${WIDGET_HANGUP_ACTION}`, handleHangup);