diff --git a/src/components/insights/coach-panel/__tests__/message-thread.test.tsx b/src/components/insights/coach-panel/__tests__/message-thread.test.tsx index 9e7f0b1b2..3ddcfb18c 100644 --- a/src/components/insights/coach-panel/__tests__/message-thread.test.tsx +++ b/src/components/insights/coach-panel/__tests__/message-thread.test.tsx @@ -699,7 +699,7 @@ describe("", () => { />, ); expect(html).toContain( - "Daily limit reached. The budget refreshes at midnight UTC.", + "Daily limit reached. The budget refreshes at midnight in your time zone.", ); // v1.4.33 IW7 — fallback copy rewritten ("AI provider" -> "Insights // provider"). Both old and new strings should be absent here when diff --git a/src/lib/db-session.ts b/src/lib/db-session.ts index e9b0e8323..38415033a 100644 --- a/src/lib/db-session.ts +++ b/src/lib/db-session.ts @@ -6,6 +6,8 @@ */ import type { Pool, PoolClient } from "pg"; +import { trackBackgroundTask } from "@/lib/logging/background-tasks"; + /** * Whether the app may send the libpq `options` startup parameter at all. * @@ -62,8 +64,12 @@ export function timeZoneSessionOptions(): string | undefined { export function pinTimeZoneOnConnect(pool: Pool): void { if (!sessionOptionsDisabled()) return; pool.on("connect", (client: PoolClient) => { - client.query(SET_SESSION_TIME_ZONE).catch((err: unknown) => { - console.error("[db] Could not pin the session time zone:", err); - }); + trackBackgroundTask( + client.query(SET_SESSION_TIME_ZONE).catch((err: unknown) => { + // The boot check reports a session that is not in UTC; this names + // the cause when the statement itself failed. + console.error("[db] Could not pin the session time zone:", err); + }), + ); }); }