feat(tree): replace react-arborist with custom tree implementation

This commit is contained in:
Philipinho
2026-05-13 16:51:28 +01:00
parent a689cca7a0
commit 9e365787bb
30 changed files with 3441 additions and 1391 deletions
+7 -4
View File
@@ -54,7 +54,7 @@ export class WsService {
return;
}
await this.broadcastToAuthorizedUsers(room, client.data.userId, pageId, data);
await this.broadcastToAuthorizedUsers(room, client.id, pageId, data);
}
async invalidateSpaceRestrictionCache(spaceId: string): Promise<void> {
@@ -115,14 +115,17 @@ export class WsService {
private async broadcastToAuthorizedUsers(
room: string,
excludeUserId: string | null,
excludeSocketId: string | null,
pageId: string,
data: any,
): Promise<void> {
const sockets = await this.server.in(room).fetchSockets();
const otherSockets = excludeUserId
? sockets.filter((s) => s.data.userId !== excludeUserId)
// Exclude only the originating socket, not every socket of the originating
// user. Excluding by userId silently dropped the originator's other tabs
// from receiving restricted-space tree events.
const otherSockets = excludeSocketId
? sockets.filter((s) => s.id !== excludeSocketId)
: sockets;
if (otherSockets.length === 0) return;