diff --git a/js/src/hooks/use-presence-positions.ts b/js/src/hooks/use-presence-positions.ts index 02cf716..c54a47f 100644 --- a/js/src/hooks/use-presence-positions.ts +++ b/js/src/hooks/use-presence-positions.ts @@ -45,6 +45,11 @@ export function usePresencePositions( } } + // Sort each segment's presence list by humanId for stable render order + for (const presenceList of result.values()) { + presenceList.sort((a, b) => a.humanId.localeCompare(b.humanId)); + } + return result; }, [playbackMarkers, children, networkHumans, currentUserId]); }