Commit Graph

2274 Commits

Author SHA1 Message Date
Arnaud Robin 0805cbdb2d (backend) add connection-test API
Currently users have no way to reliably test their connection before
joining a room. To address this, we plan to build a connection-test
page.

The testing requires a dedicated LiveKit token, issued without going
through the room API, which is tied to registered meetings, lobby
rules, and longer-lived access tokens.

Introduce a new viewset for all diagnostics-related features. The
first route issues a token for diagnostics, even for anonymous
users. Each request creates a new dedicated room so users never
share the same LiveKit room during tests. Tokens are short-lived
(default 10 minutes) to limit reuse, and the endpoint is throttled
to prevent abuse.

A Celery worker also schedules a callback that deletes the room
after a certain delay, in every case.
2026-08-04 20:35:33 +02:00
lebaudantoine 6c69c3d6e3 🎨(frontend) apply lint fixes
Run the frontend linter/formatter and commit the resulting fixes to
keep the codebase clean and consistent.
2026-08-04 20:28:44 +02:00
leo 7fd4d20ea7 ⬆️(dependencies) update python dependencies
Update python dependencies. Fix linting due to ruff bump.

Co-Authored-By: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-04 20:27:26 +02:00
lebaudantoine 15c9ee225a ️(frontend) revert GridLayout re-render optimization too
Out of precaution, also revert the previous GridLayout re-render
optimization to avoid any layout regression alongside the
CarouselLayout revert.

The useSize-based re-render optimization will be reintroduced in a
dedicated small PR and release. That will also be a good occasion to
polish the layout code along the way.
2026-08-04 20:01:41 +02:00
lebaudantoine d86768bb59 ️(frontend) revert CarouselLayout re-render optimization
The previous optimization of the CarouselLayout was broken: the
approach did not hold in practice, and strict-mode rendering was
hiding the issue during development.

Revert the change for now and revisit the optimization later with a
sounder approach.
2026-08-04 20:01:41 +02:00
lebaudantoine 7bd5ab7a13 (frontend) expose media state to external gateways
Add a hidden div in the DOM that reflects the current state of the
microphone and camera, so that external SIP media gateways (e.g. the
Renater one) can observe it and keep an accurate view of the media
state.

Also emit a custom event from the page whenever the microphone or
camera state changes, so external consumers can subscribe to updates
instead of polling the DOM.
2026-08-04 19:04:16 +02:00
lebaudantoine ac8eae7295 (backend) apply user preferences on unconfigured room creation
Update the API so that, when a user creates a new meeting without
passing an explicit configuration, the user's persisted preferences
are applied as defaults.

This allows a user to, for example, enable the waiting room by
default on every meeting they create.
2026-08-04 19:04:16 +02:00
lebaudantoine 15b1ab7e0a (frontend) let users set default configuration for generated links
Extend the existing out-of-room settings so users can configure a
default room configuration that is applied to every link they
generate from the app.
2026-08-04 19:04:16 +02:00
lebaudantoine 2e509eff28 (backend) persist user preferences for room defaults on the User model
Add attributes on the User model to persist per-user preferences for
the default link access level and the default room configuration.

The frontend will let users update these preferences and then reuse
them when generating a link through the webapp.

Persisting them on the backend (rather than in application memory
only) ensures the preferences survive across sessions and devices.
2026-08-04 19:04:16 +02:00
lebaudantoine ca56ae87c2 (backend) expose the default room access level in settings
Expose the default access level for rooms in the backend settings
response, so the frontend can initialize the global room preferences
UI with the current default value.
2026-08-04 19:04:15 +02:00
lebaudantoine 2c5a766d02 🔥(ci) remove unused Anthropic security step
Drop the Anthropic security step from the project CI, as it is no
longer used and only added noise to the pipeline.
2026-08-04 19:04:15 +02:00
davd-gzl a67467b193 🩹(all) clear the SonarCloud reliability finding and the lint debt
The SonarCloud gate fails on main, so every commit lands red, and
gh run list hides it: it lists only Actions workflows, and the
failure is an app check run.

Reliability rests on one bug, in test_file_service.py, which wrapped
an assertion in an except Exception re-raised through pytest.fail.
Removing it takes the rating from D to A.

Two pieces of debt ride along. The SDK callback id now comes from
crypto.getRandomValues, since it guards an endpoint with no auth. And
core/tasks gets the __init__.py that lets pylint see it, with the
debt that exposes, which is why #1533 fails lint-back.
2026-08-04 19:04:15 +02:00
Florent Chehab 24d5a5a035 🧑‍💻(backend) use solo pool celery worker in dev
Change to reduce memory usage in dev.
2026-08-04 19:04:15 +02:00
lebaudantoine 9e500a59ea 🧑‍💻(backend) add commented the roomkit env variables
Useful for an easier devex when working on the feature.
2026-08-04 19:04:15 +02:00
lebaudantoine 8a0d4b1ad6 ♻️(backend) refactor tests to rely on decorators
Slightly refactor the existing tests to use decorators for common
setup and configuration.
2026-08-04 19:04:15 +02:00
lebaudantoine d0726ba631 🐛(backend) ensure SIP dispatch rule instead of creating it
The roomkit can now create a SIP dispatch rule before the LiveKit
webhook that used to trigger this creation is fired. In practice,
when the roomkit connects to the room, it also triggers the
webhook, leading to a duplicated dispatch rule.

Switch from "create dispatch rule" to "ensure dispatch rule exists"
semantics, so subsequent calls are idempotent and no duplicate rule
is created.
2026-08-04 19:04:14 +02:00
lebaudantoine e65036fe90 🚚(backend) rename TelephonyService to SIPManagement
Rename the telephony service to a more descriptive name,
SIPManagementService, which clearly states what the service is used
for.

It is no longer used only by the telephony feature; the roomkit
feature also relies on it now.
2026-08-04 19:04:14 +02:00
lebaudantoine 8b198726e9 (backend) add roomkit viewset to start a room without WebRTC join
Introduce a new viewset that lets the roomkit start a room even when
no WebRTC participant has joined yet.

This is a first entry point that will be extended over time with
more actions a roomkit needs to be able to trigger.

Known limitations:

* The responsibility around SIP rules is currently split between
  the telephony feature and the roomkit one. This may need a
  refactor later on to consolidate ownership in a single place.
* The default throttle might be too low for production usage and
  will likely need to be revisited.
2026-08-04 19:04:14 +02:00
lebaudantoine fc4774199b 🔧(devx) stop declaring LiveKit as an app-dev dependency
LiveKit was declared as an app-dev dependency, which caused it
(along with its egress) to be started whenever we ran unrelated
commands such as tests, migrate or makemigrations.

Drop that dependency and start LiveKit explicitly only when it is
actually needed, i.e. when calling run-backend.
2026-08-04 19:04:14 +02:00
lebaudantoine 9a3e54e6ec 🐛(backend) disable recording events in the default env file
The tests were failing when the Django settings did not disable
recording events, which was the case by default.

We do not rely on these events anymore by default, so set the
corresponding environment variable to false in the env file to make
the tests pass out of the box.
2026-08-04 19:04:14 +02:00
snyk-bot a0d4d82e18 fix: upgrade i18next from 26.3.4 to 26.3.6
Snyk has created this PR to upgrade i18next from 26.3.4 to 26.3.6.

See this package in npm:
i18next

See this project in Snyk:
https://app.eu.snyk.io/org/lasuite-dinum-default/project/af693e79-8c43-4c09-ab65-60580515c9e8?utm_source=github&utm_medium=referral&page=upgrade-pr
2026-08-04 19:04:14 +02:00
renovate[bot] 8ed49c880b ⬆️(dependencies) update django to v5.2.16 2026-08-04 19:04:13 +02:00
leo be369bc04b ♻️(devex) optimize Makefile linting workflow
The linting workflow was unnecessarily building Docker dependencies and
creating containers multiple times. Optimize the Makefile to fix both
issues, for faster and lighter linting.
2026-08-04 19:04:13 +02:00
lebaudantoine be98c5210e 💄(frontend) adjust centering of Avatar initials
Fine-tune the vertical alignment of the initials in the Avatar so
they sit properly centered inside the circle.
2026-08-04 19:04:13 +02:00
lebaudantoine e400d05a7c 🚸(frontend) show two initials in the Avatar when possible
Display two initials in the Avatar whenever the participant's name
allows it, instead of a single letter.

A single initial makes it too hard to distinguish participants when
their cameras are off, especially in larger
2026-08-04 19:04:13 +02:00
lebaudantoine 9af42568bf 💄(frontend) improve participant name rendering in the list
Rework how the participant name is displayed in the participant
list to show as much of the name as possible before truncating.

When the name has to be truncated, add a tooltip so users can hover
to see the full name.

Requested by users.
2026-08-04 19:04:13 +02:00
lebaudantoine 7eba983c15 (frontend) introduce an "unauthenticated" participant badge
Add a visual badge on participants who are not authenticated, so it
is immediately clear who could be an anonymous participant. This is
a small but explicit security signal in the participant list.

Beyond that, the badge also plays a functional role: since only
authenticated participants can be promoted or demoted, the badge
helps users see at a glance who is eligible for a role change.
2026-08-04 19:04:12 +02:00
lebaudantoine b7210e62bb (frontend) notify user when their meeting role changes
Show a notification to the user whenever their role in the meeting
changes, so they immediately see when they have been promoted or
demoted.
2026-08-04 19:04:12 +02:00
lebaudantoine 653326347b 🐛(frontend) fall back to user.full_name on request-entry
Since the username refactoring, the username in the store could be
undefined when the join input was pre-filled from user.full_name,
because no keystroke was needed to populate the store.

This led to a 400 error on the request-entry endpoint whenever the
user joined without editing the pre-filled name.

Fall back to user.full_name when the store username is missing, so
the endpoint always receives a value.

Acknowledged as a somewhat wobbly fix, but ships as-is until the
underlying flow is reworked.
2026-08-04 19:04:12 +02:00
lebaudantoine 187e289548 (frontend) close admin side panel when the user is demoted
Listen to role changes in the admin panel and close the side panel
if the current user is demoted while it is open. Without this,
unprivileged users could still see the admin side panel until they
closed it manually.

I checked the other features that could be affected by hot role
changes; this was the only one still exposing admin-only UI after a
demotion. Everything else already handles live permission updates
correctly.
2026-08-04 19:04:12 +02:00
lebaudantoine 496a192ced (frontend) allow promoting authenticated participants
Introduce a new feature that lets a user promote one of the
authenticated participants of the meeting to a role with additional
privileges.

Known limitations:

* Only authenticated participants can be promoted, but there is no
  visual indicator yet distinguishing authenticated from anonymous
  participants. This will be added in a follow-up commit.
* The resource_access data fetched in the initial API call becomes
  stale after a promotion. It is not currently used in the product,
  so this is not visible, but it should either be refreshed later
  or removed from the initial fetch.
* Demoting a promoted user turns them into a member, which is still
  a privileged role. This is a deliberate choice until we introduce
  finer-grained tuning of participant roles.
2026-08-04 19:04:12 +02:00
lebaudantoine 715c18d276 ♻️(frontend) extract closeSidePanel action at the store level
Extract the logic that closes the side panel into a utility function
declared at the store module level, as recommended by Valtio.

This avoids re-creating the function on every render and prevents
extra re-renders in components that use it.
2026-08-04 19:04:12 +02:00
lebaudantoine dd3f23b1bf 🐛(backend) allow any string as sub in the API serializer
The API serializer was too restrictive on the `sub` field, expecting
a UUID. This worked in our development and production setups because
our Keycloak is configured to emit UUID subs, but it broke for other
providers.

Per the OIDC spec and the DB model, `sub` can be any string. Align
the serializer with this and accept arbitrary string values.

Fixes #1525.
2026-08-04 19:04:11 +02:00
lebaudantoine 066cd5f704 💄(frontend) render Avatar initials in uppercase
Uppercase the initials rendered in the Avatar so their vertical
centering stays consistent.

With lowercase letters, the initials were slightly shifted toward
the bottom of the Avatar, which broke the alignment.
2026-08-04 19:04:11 +02:00
lebaudantoine 19dfa26ee4 🔥(frontend) remove leftover console.count call
Drop a stray console.count call that was accidentally committed in a
previous PR and had been left in the codebase.
2026-08-04 19:04:11 +02:00
lebaudantoine 82aafa2030 ♻️(frontend) derive is_administrable from participant metadata
The is_administrable flag was previously read from the room API
response through the room serializer, giving the frontend static
information about the user's rights.

Refactor the frontend so it derives this flag from the participant
role carried in the participant metadata instead.

Two benefits:

* The flag now updates live along with the participant
  attributes/metadata, so role changes are reflected immediately.
* It removes the duplication between the API response and the
  metadata, which both used to determine the user's capabilities.
2026-08-04 19:04:11 +02:00
lebaudantoine bfb02b2242 (frontend) add client for the update participant role endpoint
Add the frontend client that calls the update participant role
endpoint. Straightforward API call, no special handling.
2026-08-04 19:04:11 +02:00
lebaudantoine ec9cd84cf8 (backend) expose is_authenticated in the LiveKit token
Include the is_authenticated flag on the user in the LiveKit token
and participant metadata.

The frontend needs this information (used in the next commit) to
know whether it can offer to promote a user with access to the room
admin.
2026-08-04 19:04:10 +02:00
lebaudantoine 65172447ca ♻️(backend) pass the participant role in the LiveKit token
The backend previously passed an abstract is_admin_or_owner boolean
flag in the LiveKit token. That kept the frontend minimalistic and
saved it from having to handle role comparisons.

As we introduce more features that need to distinguish between the
room owner and admins, refactor the token to carry the role
directly. The frontend can then derive the relevant flags from a
richer piece of information.
2026-08-04 19:04:10 +02:00
lebaudantoine 71d76abc0f (backend) add endpoint to update a participant role during a meeting
Add an endpoint that allows updating a user's role while in a
meeting. The goal is to let users promote other connected
participants to admin or moderator, so the burden of administrating
a meeting can be shared.
2026-08-04 19:04:10 +02:00
lebaudantoine 47f3da4153 ️(backend) add permission class checking the user is in the call
Introduce a new permission class that verifies the caller making a
request is both authenticated and actually present in the call.

It will be used to gate actions that require the user to be live in
the room, for example:

* allowing someone in from the waiting room
* promoting another participant to a different role

More generally, this covers every action where, for security
reasons, we need to make sure the user is truly present in the call
and that someone is not reusing their cookie as an API key.
2026-08-04 19:04:10 +02:00
Arnaud Robin ab0b2d67c3 📝(legal) update terms of service
Update terms of service content after legal review
2026-08-04 19:04:10 +02:00
leo a911226d07 🐛(backend) preserve recording metadata when updating room access
Updating room access rewrote the entire metadata payload, removing information
about active recordings. This caused the frontend to lose track of ongoing
recordings and could trigger 409 errors when attempting to start a new
recording.

Consolidate the duplicated metadata update logic into
`RoomManagement.update_metadata()` and preserve merge behavior instead of
overwriting the full metadata object.
2026-08-04 19:04:10 +02:00
snyk-bot adaffb0343 ⬆️(frontend) upgrade i18next from 26.3.2 to 26.3.4
Snyk has created this PR to upgrade i18next from 26.3.2 to 26.3.4.

See this package in npm:
i18next

See this project in Snyk:
https://app.eu.snyk.io/org/lasuite-dinum-default/project/af693e79-8c43-4c09-ab65-60580515c9e8?utm_source=github&utm_medium=referral&page=upgrade-pr
2026-08-04 19:04:09 +02:00
Camille Moulin ee5710e61c 📝(metadata): Add publiccode.yml file
Recommended for Public Administration Open Source software projects.
See https://yml.publiccode.tools/

Signed-off-by: Camille Moulin <camille.moulin@numerique.gouv.fr>
2026-08-04 19:04:09 +02:00
lebaudantoine 6dd914fe66 📝(frontend) add changelog entry for PR #1510
Document in the CHANGELOG the set of changes shipped in PR #1510,
which groups the recent chat, layout and participant tile render
optimizations.
2026-08-04 19:04:09 +02:00
lebaudantoine a52ea119ac 🐛(frontend) reset chat state when the ChatProvider mounts
Reset the chat state on the first render of the ChatProvider, to
make sure no chat messages from a previous room leak into the new
one.

This covers SPA navigations where the user switches from one room
to another without a full page reload.
2026-08-04 19:04:09 +02:00
lebaudantoine fc4ee70265 🐛(frontend) fix pinnedTrackRef always evaluating to true
pinnedTrackRef was always truthy when evaluated in this
code path.
2026-08-04 19:04:09 +02:00
lebaudantoine 81f23aeb88 ️(frontend) tripwire promotion of off-screen active speakers
Introduce a tripwire component that listens to
RoomEvent.ActiveSpeakersChanged imperatively and forces a single
re-render of its host only when an active speaker has none of their
tiles within the visible span (maxVisibleTiles). That re-render
re-runs useVisualStableUpdate, which reads live isSpeaking state
and performs the actual tile swap.

Speakers already visible are ignored, so this costs zero React work
in the common case.

This lets us drop the ActiveSpeakersChanged subscription from
useTracks in the StageLayout upstream (updateOnlyOn: []), which was
re-rendering the whole stage on every speaker change.
2026-08-04 19:04:09 +02:00
lebaudantoine a5651249c5 ️(frontend) memoize the EffectsButton
Memoize the EffectsButton so it does not re-render on unrelated
parent updates when its props have not changed.
2026-08-04 19:04:08 +02:00