From d7f1b7b94c22579430dd6b549faa8507baed563e Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Sat, 10 Jan 2026 14:39:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8(frontend)=20explain=20to=20a=20use?= =?UTF-8?q?r=20her=20was=20ejected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a clear feedback message explaining to users when they are ejected from a meeting, explicitly stating that the action was taken by an admin. --- CHANGELOG.md | 1 + .../features/rooms/components/Conference.tsx | 3 ++- .../src/features/rooms/routes/Feedback.tsx | 18 ++++++++++++++---- src/frontend/src/locales/de/rooms.json | 3 ++- src/frontend/src/locales/en/rooms.json | 3 ++- src/frontend/src/locales/fr/rooms.json | 3 ++- src/frontend/src/locales/nl/rooms.json | 3 ++- 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3829d1bb..200a8d06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to - ✨(summary) add dutch and german languages - 🔧(agents) make Silero VAD optional +- 🚸(frontend) explain to a user they were ejected ### Changed diff --git a/src/frontend/src/features/rooms/components/Conference.tsx b/src/frontend/src/features/rooms/components/Conference.tsx index 56a1a447..496cce6d 100644 --- a/src/frontend/src/features/rooms/components/Conference.tsx +++ b/src/frontend/src/features/rooms/components/Conference.tsx @@ -233,11 +233,12 @@ export const Conference = ({ navigateTo('feedback') return case DisconnectReason.DUPLICATE_IDENTITY: + case DisconnectReason.PARTICIPANT_REMOVED: navigateTo( 'feedback', {}, { - state: { reason: 'duplicateIdentity' }, + state: { reason: e }, } ) return diff --git a/src/frontend/src/features/rooms/routes/Feedback.tsx b/src/frontend/src/features/rooms/routes/Feedback.tsx index 7f760260..b96bfe5c 100644 --- a/src/frontend/src/features/rooms/routes/Feedback.tsx +++ b/src/frontend/src/features/rooms/routes/Feedback.tsx @@ -4,6 +4,8 @@ import { Screen } from '@/layout/Screen' import { Center, HStack, styled, VStack } from '@/styled-system/jsx' import { Rating } from '@/features/rooms/components/Rating.tsx' import { useLocation } from 'wouter' +import { useMemo } from 'react' +import { DisconnectReason } from 'livekit-client' // fixme - duplicated with home, refactor in a proper style const Heading = styled('h1', { @@ -24,15 +26,23 @@ export const FeedbackRoute = () => { const { t } = useTranslation('rooms') const [, setLocation] = useLocation() - const state = window.history.state + const reasonKey = useMemo(() => { + const state = window.history.state + + if (!state?.reason) return + switch (state.reason) { + case DisconnectReason.DUPLICATE_IDENTITY: + return 'duplicateIdentity' + case DisconnectReason.PARTICIPANT_REMOVED: + return 'participantRemoved' + } + }, []) return (
- - {t(`feedback.heading.${state?.reason || 'normal'}`)} - + {t(`feedback.heading.${reasonKey || 'normal'}`)}