From 613eb5ad89ba6270603a18be4449985d2dfe57eb Mon Sep 17 00:00:00 2001 From: tomsmith8 Date: Wed, 1 Apr 2026 12:17:41 +0000 Subject: [PATCH 1/5] Generated with Hive: Increase Playwright dashboard navigation timeout to fix CI test failure --- src/__tests__/e2e/support/page-objects/DashboardPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/e2e/support/page-objects/DashboardPage.ts b/src/__tests__/e2e/support/page-objects/DashboardPage.ts index 6aaa3a0bac..69618d9aa0 100644 --- a/src/__tests__/e2e/support/page-objects/DashboardPage.ts +++ b/src/__tests__/e2e/support/page-objects/DashboardPage.ts @@ -40,7 +40,7 @@ export class DashboardPage { } await tasksLink.click(); - await this.page.waitForURL(/\/w\/.*\/tasks/, { timeout: 10000 }); + await this.page.waitForURL(/\/w\/.*\/tasks/, { timeout: 30000 }); } /** From 872158fb83a8b0f15d457ffc5e1cdf93f2ad77a6 Mon Sep 17 00:00:00 2001 From: tomsmith8 Date: Wed, 1 Apr 2026 13:48:49 +0000 Subject: [PATCH 2/5] Generated with Hive: Increase playwright navigation timeouts to improve CI stability --- src/__tests__/e2e/support/page-objects/DashboardPage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/__tests__/e2e/support/page-objects/DashboardPage.ts b/src/__tests__/e2e/support/page-objects/DashboardPage.ts index 69618d9aa0..5818495efb 100644 --- a/src/__tests__/e2e/support/page-objects/DashboardPage.ts +++ b/src/__tests__/e2e/support/page-objects/DashboardPage.ts @@ -59,7 +59,7 @@ export class DashboardPage { } await planLink.click(); - await this.page.waitForURL(/\/w\/.*\/plan/, { timeout: 10000 }); + await this.page.waitForURL(/\/w\/.*\/plan/, { timeout: 30000 }); } /** @@ -78,7 +78,7 @@ export class DashboardPage { } await recommendationsLink.click(); - await this.page.waitForURL(/\/w\/.*\/recommendations/, { timeout: 10000 }); + await this.page.waitForURL(/\/w\/.*\/recommendations/, { timeout: 30000 }); } /** @@ -97,7 +97,7 @@ export class DashboardPage { } await janitorsLink.click(); - await this.page.waitForURL(/\/w\/.*\/janitors/, { timeout: 10000 }); + await this.page.waitForURL(/\/w\/.*\/janitors/, { timeout: 30000 }); } /** @@ -122,7 +122,7 @@ export class DashboardPage { */ async goToCapacity(): Promise { await this.page.locator(selectors.navigation.capacityLink).click(); - await this.page.waitForURL(/\/w\/.*\/capacity/, { timeout: 10000 }); + await this.page.waitForURL(/\/w\/.*\/capacity/, { timeout: 30000 }); } /** From db58ad7c42a8c9103ffddd13a18b52a2b95e8c49 Mon Sep 17 00:00:00 2001 From: tomsmith8 Date: Wed, 1 Apr 2026 16:33:06 +0000 Subject: [PATCH 3/5] Generated with Hive: Increase DashboardPage element visibility timeouts to fix Playwright test failures --- src/__tests__/e2e/support/page-objects/DashboardPage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/e2e/support/page-objects/DashboardPage.ts b/src/__tests__/e2e/support/page-objects/DashboardPage.ts index 5818495efb..40cc08fb9b 100644 --- a/src/__tests__/e2e/support/page-objects/DashboardPage.ts +++ b/src/__tests__/e2e/support/page-objects/DashboardPage.ts @@ -36,7 +36,7 @@ export class DashboardPage { const isTasksVisible = await tasksLink.isVisible().catch(() => false); if (!isTasksVisible) { await buildButton.click(); - await tasksLink.waitFor({ state: 'visible', timeout: 5000 }); + await tasksLink.waitFor({ state: 'visible', timeout: 10000 }); } await tasksLink.click(); @@ -55,7 +55,7 @@ export class DashboardPage { const isPlanVisible = await planLink.isVisible().catch(() => false); if (!isPlanVisible) { await buildButton.click(); - await planLink.waitFor({ state: 'visible', timeout: 5000 }); + await planLink.waitFor({ state: 'visible', timeout: 10000 }); } await planLink.click(); From d66fc055daea173293c679513f36f192e6ac661e Mon Sep 17 00:00:00 2001 From: pitoi Date: Mon, 20 Apr 2026 14:19:52 +0000 Subject: [PATCH 4/5] Generated with Hive: Fix task assignment notification to respect sphinxEnabled flag and update workspace test setup --- .../services/task-assignment-notification.test.ts | 12 +++++++----- src/services/notifications.ts | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/__tests__/integration/services/task-assignment-notification.test.ts b/src/__tests__/integration/services/task-assignment-notification.test.ts index 13c7db48a7..81e875f6f1 100644 --- a/src/__tests__/integration/services/task-assignment-notification.test.ts +++ b/src/__tests__/integration/services/task-assignment-notification.test.ts @@ -45,11 +45,13 @@ describe("TASK_ASSIGNED notification", () => { data: { email: "assignee@test.com", name: "Assignee", lightningPubkey: "test-pubkey-assignee" }, }); - const { createTestWorkspace } = await import("@/__tests__/support/factories/workspace.factory"); - workspace = await createTestWorkspace({ - ownerId: owner.id, - name: "Test Workspace", - slug: "test-ws-task-assign", + workspace = await db.workspace.create({ + data: { + name: "Test Workspace", + slug: "test-ws-task-assign", + ownerId: owner.id, + sphinxEnabled: true, + }, }); await db.workspaceMember.create({ diff --git a/src/services/notifications.ts b/src/services/notifications.ts index eeb3c6bb4e..e02c55b740 100644 --- a/src/services/notifications.ts +++ b/src/services/notifications.ts @@ -42,7 +42,7 @@ export async function createAndSendNotification(input: { }), db.workspace.findUnique({ where: { id: input.workspaceId }, - select: { slug: true }, + select: { slug: true, sphinxEnabled: true }, }), ]); @@ -73,7 +73,7 @@ export async function createAndSendNotification(input: { const decryptedPubkey = targetUser?.lightningPubkey ? encryptionService.decryptField("lightningPubkey", targetUser.lightningPubkey) : null; - const dmReady = isDirectMessageConfigured() && !!decryptedPubkey; + const dmReady = isDirectMessageConfigured() && !!decryptedPubkey && (workspace?.sphinxEnabled ?? false); // 4. Always insert a row — use SKIPPED when DM is not ready const record = await db.notificationTrigger.create({ From 62123db7c61909a90be4f25d80790a63fbe63c3a Mon Sep 17 00:00:00 2001 From: pitoi Date: Mon, 20 Apr 2026 14:49:16 +0000 Subject: [PATCH 5/5] Generated with Hive: Enable Sphinx for workspaces in notification and webhook tests --- .../integration/api/chat-response-notifications.test.ts | 1 + .../api/stakwork/webhook-halted-notification.test.ts | 1 + .../services/feature-assignment-notification.test.ts | 1 + .../integration/services/feature-completed-notification.test.ts | 1 + src/__tests__/support/factories/github-webhook.factory.ts | 1 + src/__tests__/support/factories/workspace.factory.ts | 2 ++ src/__tests__/unit/services/notifications.test.ts | 2 +- 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/__tests__/integration/api/chat-response-notifications.test.ts b/src/__tests__/integration/api/chat-response-notifications.test.ts index 683f6c5bb9..4f09e91687 100644 --- a/src/__tests__/integration/api/chat-response-notifications.test.ts +++ b/src/__tests__/integration/api/chat-response-notifications.test.ts @@ -73,6 +73,7 @@ describe("POST /api/chat/response — plan artifact notifications", () => { ownerId: owner.id, name: "Test Workspace", slug: "test-ws-chat-notif", + sphinxEnabled: true, }); feature = await db.feature.create({ data: { diff --git a/src/__tests__/integration/api/stakwork/webhook-halted-notification.test.ts b/src/__tests__/integration/api/stakwork/webhook-halted-notification.test.ts index 44cb228173..57dd639111 100644 --- a/src/__tests__/integration/api/stakwork/webhook-halted-notification.test.ts +++ b/src/__tests__/integration/api/stakwork/webhook-halted-notification.test.ts @@ -74,6 +74,7 @@ describe("POST /api/stakwork/webhook — WORKFLOW_HALTED notification", () => { workspace = await createTestWorkspace({ ownerId: user.id, slug: generateUniqueSlug("ws-halted"), + sphinxEnabled: true, }); await db.workspaceMember.create({ diff --git a/src/__tests__/integration/services/feature-assignment-notification.test.ts b/src/__tests__/integration/services/feature-assignment-notification.test.ts index 5c422b2186..a9812bb917 100644 --- a/src/__tests__/integration/services/feature-assignment-notification.test.ts +++ b/src/__tests__/integration/services/feature-assignment-notification.test.ts @@ -51,6 +51,7 @@ describe("FEATURE_ASSIGNED notification", () => { ownerId: owner.id, name: "Test Workspace", slug: "test-ws-feat-assign", + sphinxEnabled: true, }); await db.workspaceMember.create({ diff --git a/src/__tests__/integration/services/feature-completed-notification.test.ts b/src/__tests__/integration/services/feature-completed-notification.test.ts index 2fcf4dde79..fca8cf1d78 100644 --- a/src/__tests__/integration/services/feature-completed-notification.test.ts +++ b/src/__tests__/integration/services/feature-completed-notification.test.ts @@ -49,6 +49,7 @@ describe("FEATURE_COMPLETED notification", () => { ownerId: owner.id, name: "Test Workspace", slug: "test-ws-feat-complete", + sphinxEnabled: true, }); await db.workspaceMember.create({ diff --git a/src/__tests__/support/factories/github-webhook.factory.ts b/src/__tests__/support/factories/github-webhook.factory.ts index 1cc95590cb..22b805f1d6 100644 --- a/src/__tests__/support/factories/github-webhook.factory.ts +++ b/src/__tests__/support/factories/github-webhook.factory.ts @@ -52,6 +52,7 @@ export async function createWebhookTestScenario(options?: CreateWebhookTestScena name: `Test Workspace ${workspaceId}`, slug: `test-workspace-${workspaceId.toLowerCase()}`, ownerId: user.id, + sphinxEnabled: true, }, }); diff --git a/src/__tests__/support/factories/workspace.factory.ts b/src/__tests__/support/factories/workspace.factory.ts index 90e6d0f90a..a606f3a4f3 100644 --- a/src/__tests__/support/factories/workspace.factory.ts +++ b/src/__tests__/support/factories/workspace.factory.ts @@ -31,6 +31,7 @@ export interface CreateTestWorkspaceOptions { stakworkApiKey?: string | null; sourceControlOrgId?: string | null; repositoryDraft?: string | null; + sphinxEnabled?: boolean; /** If true, return existing workspace if slug matches */ idempotent?: boolean; } @@ -73,6 +74,7 @@ export async function createTestWorkspace( stakworkApiKey: options.stakworkApiKey ?? null, sourceControlOrgId: options.sourceControlOrgId ?? null, repositoryDraft: options.repositoryDraft ?? null, + sphinxEnabled: options.sphinxEnabled ?? false, }, }); } diff --git a/src/__tests__/unit/services/notifications.test.ts b/src/__tests__/unit/services/notifications.test.ts index 548f245a01..9b93c3b96c 100644 --- a/src/__tests__/unit/services/notifications.test.ts +++ b/src/__tests__/unit/services/notifications.test.ts @@ -43,7 +43,7 @@ const baseInput = { const userWithPubkey = { lightningPubkey: "alice-pubkey", sphinxRouteHint: null, iosDeviceToken: null }; const userWithPubkeyAndToken = { lightningPubkey: "alice-pubkey", sphinxRouteHint: null, iosDeviceToken: "device-token-abc" }; const userWithoutPubkey = { lightningPubkey: null, sphinxRouteHint: null, iosDeviceToken: null }; -const mockWorkspace = { slug: "test-workspace" }; +const mockWorkspace = { slug: "test-workspace", sphinxEnabled: true }; const mockRecord = { id: "notif-1",