fix: restore build and stabilize E2E cross-signal behavior

Revert the automated member-ordering pass that broke Angular field init
(TS2729) and disable that rule until a safe reorder strategy exists.
Fix modal/confirm dialog i18n defaults via template fallbacks, search all
active endpoints (including offline), register foreign rooms with actor
owner IDs, sync profile display names from avatar summaries, and guard
dm-chat when a private call converts to a group conversation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-11 12:16:40 +02:00
co-authored by Cursor
parent 79c6f91cd6
commit 31962aeb1a
131 changed files with 2483 additions and 3896 deletions
+53 -42
View File
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/member-ordering */
import { Injectable, inject } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import {
@@ -68,6 +70,23 @@ const VIEW_SERVER_LOAD_DELAY_MS = 0;
@Injectable()
export class RoomsEffects {
private actions$ = inject(Actions);
private store = inject(Store);
private router = inject(Router);
private db = inject(DatabaseService);
private webrtc = inject(RealtimeSessionFacade);
private serverDirectory = inject(ServerDirectoryFacade);
private readonly i18n = inject(AppI18nService);
private readonly signalServerAuthorize = inject(SignalServerAuthorizeService);
private readonly signalServerAuth = inject(SignalServerAuthService);
private readonly signalingConnection = new RoomSignalingConnection(
this.webrtc,
this.serverDirectory,
this.store,
this.signalServerAuthorize,
this.signalServerAuth
);
/** Loads all saved rooms from the local database. */
loadRooms$ = createEffect(() =>
@@ -228,26 +247,45 @@ export class RoomsEffects {
sourceName: endpoint?.name,
sourceUrl: endpoint?.url
};
const ownerActorId = endpoint?.url
? this.signalServerAuth.resolveActorUserIdForServer(endpoint.url, currentUser.oderId || currentUser.id)
: currentUser.oderId || currentUser.id;
const registrationPayload = buildServerRegistrationPayload(
room,
currentUser,
normalizedPassword,
ownerActorId
);
const registrationSelector = endpoint
? { sourceId: endpoint.id, sourceUrl: endpoint.url }
: undefined;
return from(this.db.saveRoom(room)).pipe(
map(() => {
// Register with central server (using the same room ID for discoverability)
this.serverDirectory
.registerServer(
buildServerRegistrationPayload(room, currentUser, normalizedPassword),
endpoint ? {
sourceId: endpoint.id,
sourceUrl: endpoint.url
} : undefined
)
.subscribe({
error: (error) => {
// Registration is best-effort, but never swallow the failure
// silently: otherwise the creator lands in a room view for a
// server that was never persisted (invites/search 404).
console.error('Failed to register created server with directory:', error);
const registerCreatedServer = () => {
this.serverDirectory
.registerServer(registrationPayload, registrationSelector)
.subscribe({
error: (error) => {
// Registration is best-effort, but never swallow the failure
// silently: otherwise the creator lands in a room view for a
// server that was never persisted (invites/search 404).
console.error('Failed to register created server with directory:', error);
}
});
};
if (endpoint?.url) {
void this.signalServerAuthorize.ensureCredentialForServerUrl(endpoint.url).then((hasCredential) => {
if (hasCredential) {
registerCreatedServer();
} else {
console.error('Failed to provision credentials before registering created server:', endpoint.url);
}
});
} else {
registerCreatedServer();
}
return RoomsActions.createRoomSuccess({ room });
})
@@ -863,32 +901,6 @@ export class RoomsEffects {
{ dispatch: false }
);
private actions$ = inject(Actions);
private store = inject(Store);
private router = inject(Router);
private db = inject(DatabaseService);
private webrtc = inject(RealtimeSessionFacade);
private serverDirectory = inject(ServerDirectoryFacade);
private readonly i18n = inject(AppI18nService);
private readonly signalServerAuthorize = inject(SignalServerAuthorizeService);
private readonly signalServerAuth = inject(SignalServerAuthService);
private readonly signalingConnection = new RoomSignalingConnection(
this.webrtc,
this.serverDirectory,
this.store,
this.signalServerAuthorize,
this.signalServerAuth
);
// ── Private helpers ────────────────────────────────────────────
private async getBlockedRoomAccessActions(
@@ -914,5 +926,4 @@ export class RoomsEffects {
private getPersistedCurrentUserId(): string | null {
return localStorage.getItem('metoyou_currentUserId');
}
}