Skip to content

Commit 14a31dd

Browse files
committed
Fix web lint errors
1 parent f6e3606 commit 14a31dd

3 files changed

Lines changed: 18 additions & 14 deletions

File tree

apps/web/src/app/api/telegram/webhook/route.test.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
22
import type { InboxPlanningOutput } from "@atlas/core";
33
import {
44
getDefaultGoogleCalendarConnectionStore,
5+
getDefaultFollowUpRuntimeStore,
56
getDefaultInboxProcessingStore,
67
listPlannerRunsForTests,
78
listScheduleBlocksForTests,
@@ -108,6 +109,7 @@ function buildRequest(body: unknown, secret = "test-webhook-secret") {
108109

109110
async function seedOutstandingFollowUpBundle(titles: string[]) {
110111
const store = getDefaultInboxProcessingStore();
112+
const followUpStore = getDefaultFollowUpRuntimeStore();
111113

112114
seedInboxItemForProcessingTests({
113115
id: "inbox-seed",
@@ -170,7 +172,7 @@ async function seedOutstandingFollowUpBundle(titles: string[]) {
170172
});
171173

172174
const taskIds = listTasksForTests().map((task) => task.id);
173-
await (store as any).markFollowUpSent(taskIds, "2026-03-20T17:00:00.000Z");
175+
await followUpStore.markFollowUpSent(taskIds, "2026-03-20T17:00:00.000Z");
174176

175177
await recordOutgoingTelegramMessageIfNew({
176178
userId: "123",
@@ -198,6 +200,7 @@ async function seedOutstandingFollowUpBundle(titles: string[]) {
198200

199201
return {
200202
store,
203+
followUpStore,
201204
taskIds
202205
};
203206
}
@@ -336,7 +339,7 @@ describe("telegram webhook route", () => {
336339
});
337340

338341
it("binds numbered followup replies and marks the selected task done", async () => {
339-
const { store } = await seedOutstandingFollowUpBundle(["Review launch checklist"]);
342+
const { store, followUpStore } = await seedOutstandingFollowUpBundle(["Review launch checklist"]);
340343

341344
const response = await handleTelegramWebhook(
342345
buildRequest({
@@ -351,7 +354,7 @@ describe("telegram webhook route", () => {
351354
}),
352355
{
353356
store,
354-
followUpStore: store as any,
357+
followUpStore,
355358
primeProcessingStore: seedInboxItemForProcessingTests
356359
}
357360
);
@@ -364,7 +367,7 @@ describe("telegram webhook route", () => {
364367
});
365368

366369
it("accepts short natural-language followup replies that reference bundle numbers", async () => {
367-
const { store, taskIds } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
370+
const { store, followUpStore, taskIds } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
368371

369372
const response = await handleTelegramWebhook(
370373
buildRequest({
@@ -379,7 +382,7 @@ describe("telegram webhook route", () => {
379382
}),
380383
{
381384
store,
382-
followUpStore: store as any,
385+
followUpStore,
383386
primeProcessingStore: seedInboxItemForProcessingTests
384387
}
385388
);
@@ -395,7 +398,7 @@ describe("telegram webhook route", () => {
395398
});
396399

397400
it("accepts ordinal followup archive replies", async () => {
398-
const { store, taskIds } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
401+
const { store, followUpStore, taskIds } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
399402

400403
const response = await handleTelegramWebhook(
401404
buildRequest({
@@ -410,7 +413,7 @@ describe("telegram webhook route", () => {
410413
}),
411414
{
412415
store,
413-
followUpStore: store as any,
416+
followUpStore,
414417
primeProcessingStore: seedInboxItemForProcessingTests
415418
}
416419
);
@@ -426,7 +429,7 @@ describe("telegram webhook route", () => {
426429
});
427430

428431
it("asks for clarification on ambiguous followup replies with multiple unresolved items", async () => {
429-
const { store } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
432+
const { store, followUpStore } = await seedOutstandingFollowUpBundle(["Task 1", "Task 2"]);
430433

431434
const response = await handleTelegramWebhook(
432435
buildRequest({
@@ -441,7 +444,7 @@ describe("telegram webhook route", () => {
441444
}),
442445
{
443446
store,
444-
followUpStore: store as any,
447+
followUpStore,
445448
primeProcessingStore: seedInboxItemForProcessingTests
446449
}
447450
);
@@ -454,7 +457,7 @@ describe("telegram webhook route", () => {
454457
});
455458

456459
it("lets mixed-intent messages fall through to the normal router even with outstanding followups", async () => {
457-
const { store } = await seedOutstandingFollowUpBundle(["Review launch checklist", "Send investor update"]);
460+
const { store, followUpStore } = await seedOutstandingFollowUpBundle(["Review launch checklist", "Send investor update"]);
458461

459462
const response = await handleTelegramWebhook(
460463
buildRequest({
@@ -469,7 +472,7 @@ describe("telegram webhook route", () => {
469472
}),
470473
{
471474
store,
472-
followUpStore: store as any,
475+
followUpStore,
473476
calendar: getDefaultCalendarAdapter(),
474477
primeProcessingStore: seedInboxItemForProcessingTests
475478
}

apps/web/src/lib/server/google-calendar.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,17 @@ export async function handleGoogleCalendarConnect(
9999
connectionStore?: GoogleCalendarConnectionStore;
100100
} = {}
101101
) {
102-
return handleGoogleCalendarConnectPreview(request);
102+
return handleGoogleCalendarConnectPreview(request, dependencies);
103103
}
104104

105105
export async function handleGoogleCalendarConnectPreview(
106106
request: Request,
107-
_dependencies: {
107+
dependencies: {
108108
connectionStore?: GoogleCalendarConnectionStore;
109109
} = {}
110110
) {
111+
void dependencies;
112+
111113
const url = new URL(request.url);
112114
const token = url.searchParams.get("token");
113115
const config = getConfig();

apps/web/src/lib/server/telegram-webhook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
getDefaultFollowUpRuntimeStore,
2020
getLatestFollowUpBundleContext,
2121
recordIncomingTelegramMessageIfNew,
22-
recordOutgoingTelegramMessageIfNew,
2322
updateOutgoingTelegramMessage,
2423
type ConversationHistoryStore,
2524
type FollowUpRuntimeStore,

0 commit comments

Comments
 (0)