From d525d8adca44226e595b34c3ffb56ab563f417e4 Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Sun, 8 Mar 2026 15:37:23 +0900 Subject: [PATCH 1/2] Fix getUnreadCounts() using wrong API call pattern client.counts() was unreachable via WebClient dynamic method resolution. Use apiCall('client.counts') to match the pattern used by all other undocumented Slack API calls. --- src/platforms/slack/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/slack/client.ts b/src/platforms/slack/client.ts index 1a296c9..8c10a4c 100644 --- a/src/platforms/slack/client.ts +++ b/src/platforms/slack/client.ts @@ -537,10 +537,10 @@ export class SlackClient { async getUnreadCounts(): Promise { return this.withRetry(async () => { - const response = await (this.client as any).client.counts() + const response = await this.client.apiCall('client.counts') this.checkResponse(response) - const channels = (response.channels || []).map((ch: any) => ({ + const channels = ((response as any).channels || []).map((ch: any) => ({ id: ch.id || '', name: ch.name || '', unread_count: ch.unread_count || 0, From 5db04457f67f54ff5bc890d374d7dd689d107e4c Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Sun, 8 Mar 2026 15:37:30 +0900 Subject: [PATCH 2/2] Fix e2e test timeout cascade in Slack tests Increase e2e test timeout to 30s for Slack API call latency, and parallelize cleanupMessages() so afterEach hooks complete within the timeout instead of cascading failures to all subsequent tests. --- bunfig.e2e.toml | 1 + e2e/helpers.ts | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bunfig.e2e.toml b/bunfig.e2e.toml index 116512e..802c640 100644 --- a/bunfig.e2e.toml +++ b/bunfig.e2e.toml @@ -1,3 +1,4 @@ [test] root = "./e2e" preload = ["./e2e/setup.ts"] +timeout = 30000 diff --git a/e2e/helpers.ts b/e2e/helpers.ts index ff45af0..7a3d9ba 100644 --- a/e2e/helpers.ts +++ b/e2e/helpers.ts @@ -102,12 +102,13 @@ export async function cleanupMessages( channel: string, messageIds: string[] ): Promise { - for (const id of messageIds) { - try { - await deleteTestMessage(platform, channel, id) - await waitForRateLimit(500) - } catch (error) { - console.warn(`Failed to cleanup message ${id}:`, error) - } - } + await Promise.all( + messageIds.map(async (id) => { + try { + await deleteTestMessage(platform, channel, id) + } catch (error) { + console.warn(`Failed to cleanup message ${id}:`, error) + } + }) + ) }