From 51bfebdfb626905fe2a510de1edb305761e2864a Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 22 Oct 2026 22:03:35 +0000 Subject: [PATCH] fix(ci): narrow the page edit result for the non-strict compile, the invite signature within its line, one journey key used --- client/scripts/i18n-unused-baseline.json | 2 +- server/src/nest/assistant/assistant-vision.ts | 9 ++++++--- server/src/nest/vacay/vacay.service.ts | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/client/scripts/i18n-unused-baseline.json b/client/scripts/i18n-unused-baseline.json index a5accb3a5..58cf390d4 100644 --- a/client/scripts/i18n-unused-baseline.json +++ b/client/scripts/i18n-unused-baseline.json @@ -14,7 +14,7 @@ "files.ts": 4, "help.ts": 3, "inspector.ts": 4, - "journey.ts": 66, + "journey.ts": 65, "login.ts": 1, "map.ts": 5, "memories.ts": 8, diff --git a/server/src/nest/assistant/assistant-vision.ts b/server/src/nest/assistant/assistant-vision.ts index 824f30dd8..ef1a38384 100644 --- a/server/src/nest/assistant/assistant-vision.ts +++ b/server/src/nest/assistant/assistant-vision.ts @@ -116,9 +116,12 @@ function pageAfter( ): BookDocument | string { if (!ops) return doc; const made = applyBookOps(doc, { spreadId, ops }, base.ctx); - if (made.ok) return made.doc; - const at = made.error.opIndex === null ? '' : ` (operation ${made.error.opIndex})`; - return `Not a change the book takes${at}: ${made.error.code}: ${made.error.message}`; + // Compared with false, not read as a truth value: the non-strict compile narrows the union only that way. + if (made.ok === false) { + const at = made.error.opIndex === null ? '' : ` (operation ${made.error.opIndex})`; + return `Not a change the book takes${at}: ${made.error.code}: ${made.error.message}`; + } + return made.doc; } /** What the message keeps of a look: the page, the version, the image's size when one came, the description. */ diff --git a/server/src/nest/vacay/vacay.service.ts b/server/src/nest/vacay/vacay.service.ts index a38627578..f6bdcb8fa 100644 --- a/server/src/nest/vacay/vacay.service.ts +++ b/server/src/nest/vacay/vacay.service.ts @@ -687,7 +687,7 @@ export class VacayService { // Invitations // ------------------------------------------------------------------------- - async sendInvite(planId: number, inviterId: number, inviterUsername: string, targetUserId: number, socketId?: string): Promise { + async sendInvite(planId: number, inviterId: number, inviterName: string, targetUserId: number, socketId?: string) { if (targetUserId === inviterId) throw new DomainError(400, 'Cannot invite yourself'); // The picker no longer offers guests, but the id arrives from the client, so the @@ -706,7 +706,7 @@ export class VacayService { await this.members.insertPending(planId, targetUserId); - const from = { id: inviterId, username: inviterUsername }; + const from = { id: inviterId, username: inviterName }; this.realtime.broadcastToUser(targetUserId, { type: 'vacay:invite', from, planId }); // The plan's own tabs list the pending invite too: vacay:settings reads the plan again. const planUserIds = (await this.getPlanUsers(planId)).map(u => u.id); @@ -717,7 +717,7 @@ export class VacayService { // nothing the module graph does not already give — NotificationsModule // reaches nothing in this direction — and it hid the edge while handing the // send a second NotificationsService built outside the container. - this.notifications.send({ event: 'vacay_invite', actorId: inviterId, scope: 'user', targetId: targetUserId, params: { actor: inviterUsername, planId: String(planId) } }).catch(() => {}); + this.notifications.send({ event: 'vacay_invite', actorId: inviterId, scope: 'user', targetId: targetUserId, params: { actor: inviterName, planId: String(planId) } }).catch(() => {}); } async acceptInvite(userId: number, planId: number, socketId: string | undefined): Promise {