Skip to content

Frontend enhancement - #1964

Open
lebaudantoine wants to merge 2 commits into
mainfrom
frontend-enhancement
Open

lebaudantoine wants to merge 2 commits into
mainfrom
frontend-enhancement

Conversation

@lebaudantoine

Copy link
Copy Markdown
Collaborator

Minor improvements to ship small and frequently

A floating reaction updated two states in requestAnimationFrame: the
component was rendered again on every frame, about 180 times during
the three seconds of its course, and moving it through its bottom
offset laid it out each time. A burst of reactions multiplies this by
the number of reactions on screen, during the call.

Describe the same course with the Web Animations API instead: a rise
at constant speed, with a fade out over the last 30 % of the course.
The browser runs it, the component is rendered once, and only the
transform and the opacity change.
useRoomData read the room with getQueryData during render, without
subscribing. Consumers only updated because Conference observes the
same query and re-renders its subtree, so a consumer behind a memoized
component kept a stale value after a room settings or LiveKit metadata
update.

Subscribe to the query cache with useSyncExternalStore, filtered on
the room entry. The hook stays a passive reader: it adds no observer,
so it never fetches nor hands its own options to the query.
@sonarqubecloud

Copy link
Copy Markdown

@lebaudantoine

Copy link
Copy Markdown
Collaborator Author

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Reviews (1) · Last reviewed commit: "🐛(frontend) subscribe useRoomData to th..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant