Compare commits

..

3 Commits

Author SHA1 Message Date
lebaudantoine c149c8ce9c 💄(frontend) add minor layout adjustments
Propose minor layout adjustments to ensure the DINUM version with French
copywriting does not look visually awkward due to line breaks.
2026-01-05 17:43:40 +01:00
lebaudantoine 198442b137 🐛(backend) fix certificates volume mount path for Python 3.13
After upgrading Python to 3.13, not all development environments were
updated accordingly. This fixes the incorrect volume mount path
introduced by that upgrade.
2026-01-05 17:43:37 +01:00
lebaudantoine 0fe8d9b681 🐛(backend) fix ignore recording webhook events
Fix an unexpected behavior where filtering LiveKit webhook events sometimes
failed because the room name was not reliably extracted from the webhook data,
causing notifications to be ignored.

Configure the same filtering logic locally to avoid missing this kind of issue
in the future.
2026-01-05 13:34:55 +01:00
10 changed files with 34 additions and 39 deletions
@@ -24,8 +24,6 @@ class RecordingEventsService:
room_name = str(recording.room.id) room_name = str(recording.room.id)
print('$$ handle_update')
status_mapping = { status_mapping = {
api.EgressStatus.EGRESS_ACTIVE: "started", api.EgressStatus.EGRESS_ACTIVE: "started",
api.EgressStatus.EGRESS_ENDING: "saving", api.EgressStatus.EGRESS_ENDING: "saving",
@@ -33,18 +31,12 @@ class RecordingEventsService:
} }
recording_status = status_mapping.get(egress_status) recording_status = status_mapping.get(egress_status)
print('$$ recording_status')
print(recording_status)
if recording_status: if recording_status:
try: try:
print('$$ update')
utils.update_room_metadata( utils.update_room_metadata(
room_name, {"recording_status": recording_status} room_name, {"recording_status": recording_status}
) )
except utils.MetadataUpdateException as e: except utils.MetadataUpdateException as e:
print('$$ exception')
logger.exception("Failed to update room's metadata: %s", e) logger.exception("Failed to update room's metadata: %s", e)
@staticmethod @staticmethod
+4 -15
View File
@@ -118,13 +118,11 @@ class LiveKitEventsService:
except Exception as e: except Exception as e:
raise InvalidPayloadError("Invalid webhook payload") from e raise InvalidPayloadError("Invalid webhook payload") from e
if self._filter_regex and not self._filter_regex.search(data.room.name): room_name = data.room.name or data.egress_info.room_name
logger.info("Filtered webhook event for room '%s'", data.room.name)
return
print('$$ data.event') if self._filter_regex and not self._filter_regex.search(room_name):
print(data.event) logger.info("Filtered webhook event for room '%s'", room_name)
print(data) return
try: try:
webhook_type = LiveKitWebhookEventType(data.event) webhook_type = LiveKitWebhookEventType(data.event)
@@ -133,9 +131,6 @@ class LiveKitEventsService:
f"Unknown webhook type: {data.event}" f"Unknown webhook type: {data.event}"
) from e ) from e
print("$$ webhook_type")
print(webhook_type)
handler_name = f"_handle_{webhook_type.value}" handler_name = f"_handle_{webhook_type.value}"
handler = getattr(self, handler_name, None) handler = getattr(self, handler_name, None)
@@ -148,8 +143,6 @@ class LiveKitEventsService:
def _handle_egress_updated(self, data): def _handle_egress_updated(self, data):
"""Handle 'egress_updated' event.""" """Handle 'egress_updated' event."""
print("$$ _handle_egress_updated")
egress_id = data.egress_info.egress_id egress_id = data.egress_info.egress_id
try: try:
recording = models.Recording.objects.get(worker_id=egress_id) recording = models.Recording.objects.get(worker_id=egress_id)
@@ -158,11 +151,7 @@ class LiveKitEventsService:
f"Recording with worker ID {egress_id} does not exist" f"Recording with worker ID {egress_id} does not exist"
) from err ) from err
print("$$ egress found")
egress_status = data.egress_info.status egress_status = data.egress_info.status
print('$$ egress_status')
print(egress_status)
self.recording_events.handle_update(recording, egress_status) self.recording_events.handle_update(recording, egress_status)
def _handle_egress_ended(self, data): def _handle_egress_ended(self, data):
-5
View File
@@ -276,8 +276,6 @@ async def update_room_metadata(
room = response.rooms[0] room = response.rooms[0]
existing_metadata = json.loads(room.metadata) if room.metadata else {} existing_metadata = json.loads(room.metadata) if room.metadata else {}
print('$$ existing_metadata')
print(existing_metadata)
if remove_keys: if remove_keys:
for key in remove_keys: for key in remove_keys:
@@ -285,9 +283,6 @@ async def update_room_metadata(
updated_metadata = {**existing_metadata, **metadata} updated_metadata = {**existing_metadata, **metadata}
print('$$ updated_metadata')
print(updated_metadata)
await lkapi.room.update_room_metadata( await lkapi.room.update_room_metadata(
UpdateRoomMetadataRequest( UpdateRoomMetadataRequest(
room=room_name, metadata=json.dumps(updated_metadata).encode("utf-8") room=room_name, metadata=json.dumps(updated_metadata).encode("utf-8")
@@ -66,16 +66,22 @@ export function ToastRecordingRequest({
name: participant?.name, name: participant?.name,
})} })}
{!options.isMenuOpen && ( {!options.isMenuOpen && (
<Button <div
size="sm"
variant="text"
className={css({ className={css({
color: 'primary.300', marginLeft: '0.5rem',
})} })}
onPress={options.openMenu}
> >
{t('openMenu')} <Button
</Button> size="sm"
variant="text"
className={css({
color: 'primary.300',
})}
onPress={options.openMenu}
>
{t('openMenu')}
</Button>
</div>
)} )}
</HStack> </HStack>
</StyledToastContainer> </StyledToastContainer>
@@ -161,6 +161,7 @@ export const ControlsButton = ({
fullWidth fullWidth
onPress={handle} onPress={handle}
isDisabled={isDisabled} isDisabled={isDisabled}
size="compact"
> >
{t('button.start')} {t('button.start')}
</Button> </Button>
@@ -29,9 +29,10 @@ export const RowWrapper = ({
className={css({ className={css({
width: '100%', width: '100%',
background: 'gray.100', background: 'gray.100',
padding: '8px', paddingBlock: '0.5rem',
paddingInline: '0',
display: 'flex', display: 'flex',
marginTop: '4px', marginTop: '0.25rem',
})} })}
> >
<div <div
@@ -40,6 +41,7 @@ export const RowWrapper = ({
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
paddingInline: '0.25rem',
})} })}
> >
{/* fixme - doesn't handle properly material-symbols */} {/* fixme - doesn't handle properly material-symbols */}
@@ -47,10 +49,11 @@ export const RowWrapper = ({
</div> </div>
<div <div
className={css({ className={css({
flex: 5, flex: 6,
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
gap: '0.25rem', gap: '0.25rem',
paddingInlineEnd: '8px',
})} })}
> >
{children} {children}
@@ -31,6 +31,12 @@ export const buttonRecipe = cva({
borderRadius: 4, borderRadius: 4,
'--square-padding': '0', '--square-padding': '0',
}, },
compact: {
borderRadius: 4,
paddingX: '0.5',
paddingY: '0.625',
'--square-padding': '{spacing.0.625}',
},
}, },
square: { square: {
true: { true: {
@@ -49,6 +49,7 @@ backend:
{{- end }} {{- end }}
{{- end }} {{- end }}
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/ LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}" FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}"
@@ -98,7 +99,7 @@ backend:
# Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false # Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false
extraVolumeMounts: extraVolumeMounts:
- name: certs - name: certs
mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem mountPath: /usr/local/lib/python3.13/site-packages/certifi/cacert.pem
subPath: cacert.pem subPath: cacert.pem
# Extra volumes to manage our local custom CA and avoid to set ssl_verify: false # Extra volumes to manage our local custom CA and avoid to set ssl_verify: false
@@ -51,6 +51,7 @@ backend:
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/ LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_FORCE_WSS_PROTOCOL: True LIVEKIT_FORCE_WSS_PROTOCOL: True
LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND: True LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND: True
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}" FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}"
@@ -71,6 +71,7 @@ backend:
{{- end }} {{- end }}
{{- end }} {{- end }}
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/ LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041'}" FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041'}"