diff --git a/src/server/sessions/piSessionService.archiveCleanup.test.ts b/src/server/sessions/piSessionService.archiveCleanup.test.ts index 6a2b8c2..0c21de3 100644 --- a/src/server/sessions/piSessionService.archiveCleanup.test.ts +++ b/src/server/sessions/piSessionService.archiveCleanup.test.ts @@ -1,3 +1,4 @@ +import { resolve } from "node:path"; import { describe, expect, it, vi } from "vitest"; import { PiSessionService } from "./piSessionService.js"; import { SessionNotificationStore } from "./sessionNotificationStore.js"; @@ -29,7 +30,7 @@ describe("PiSessionService archive and cleanup", () => { }); await service.status(sessionRef("archive-notification-session")); - const generation = store.currentGeneration("archive-notification-session", "/workspace"); + const generation = store.currentGeneration("archive-notification-session", resolve("/workspace")); if (generation === undefined) throw new Error("expected active notification generation"); store.addNotification(generation, "archive me", "warning"); diff --git a/src/server/sessions/piSessionService.lifecycle.test.ts b/src/server/sessions/piSessionService.lifecycle.test.ts index 8de38b0..006e568 100644 --- a/src/server/sessions/piSessionService.lifecycle.test.ts +++ b/src/server/sessions/piSessionService.lifecycle.test.ts @@ -944,7 +944,7 @@ describe("PiSessionService lifecycle, listing, and reload", () => { "shutdown before close failure", "prior", ]); - expect(store.currentGeneration("failed-close-reload", "/workspace")).toBeDefined(); + expect(store.currentGeneration("failed-close-reload", resolve("/workspace"))).toBeDefined(); await service.stop(sessionRef("failed-close-reload")); await service.dispose(); }); diff --git a/src/server/sessions/piSessionService.ts b/src/server/sessions/piSessionService.ts index 7322a83..3a76c77 100644 --- a/src/server/sessions/piSessionService.ts +++ b/src/server/sessions/piSessionService.ts @@ -689,7 +689,7 @@ export class PiSessionService implements SessionRouteService { } notificationInbox(ref: PiSessionRef): SessionNotificationInboxSnapshot { - return this.notificationStore.inboxSnapshot(ref.id, ref.cwd); + return this.notificationStore.inboxSnapshot(ref.id, canonicalizeStoredCwd(ref.cwd)); } dismissNotification( @@ -698,7 +698,7 @@ export class PiSessionService implements SessionRouteService { ): SessionNotificationInboxSnapshot { const result = this.notificationStore.dismissNotification( ref.id, - ref.cwd, + canonicalizeStoredCwd(ref.cwd), request.daemonInstanceId, request.notificationId, ); @@ -712,7 +712,7 @@ export class PiSessionService implements SessionRouteService { ): SessionNotificationInboxSnapshot { const result = this.notificationStore.dismissAll( ref.id, - ref.cwd, + canonicalizeStoredCwd(ref.cwd), request.daemonInstanceId, request.throughOrder, request.throughOverflowWatermark, @@ -1692,7 +1692,7 @@ export class PiSessionService implements SessionRouteService { return; } if (isPiSessionRef(ref)) { - this.publishNotificationMutations(this.notificationStore.clearSessionIdentity(ref.id, ref.cwd, "runtime-close")); + this.publishNotificationMutations(this.notificationStore.clearSessionIdentity(ref.id, canonicalizeStoredCwd(ref.cwd), "runtime-close")); return; } await this.closeActive(ref);