From 6f838b1e0219791ad3e4762dabee20bc68ae8eae Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 15:12:04 +0000 Subject: [PATCH] fix: resolve type mismatch for SessionStats firstRequestAt/lastRequestAt Fixed: - Updated SessionStats interface to accept Date | string | null for firstRequestAt and lastRequestAt - Updated TimeRow function to handle both Date and string types - Applied lint auto-fix for import ordering The type error occurred because aggregateSessionStats returns Date | null for these fields, but SessionStats expected string | null. CI Run: https://github.com/ding113/claude-code-hub/actions/runs/20785862610 Generated with Claude Code --- .../messages/_components/session-stats.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/[locale]/dashboard/sessions/[sessionId]/messages/_components/session-stats.tsx b/src/app/[locale]/dashboard/sessions/[sessionId]/messages/_components/session-stats.tsx index 7244f7d0d..39879743b 100644 --- a/src/app/[locale]/dashboard/sessions/[sessionId]/messages/_components/session-stats.tsx +++ b/src/app/[locale]/dashboard/sessions/[sessionId]/messages/_components/session-stats.tsx @@ -1,6 +1,5 @@ "use client"; -import { useTranslations } from "next-intl"; import { Calendar, Clock, @@ -12,18 +11,19 @@ import { Server, Zap, } from "lucide-react"; +import { useTranslations } from "next-intl"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { type CurrencyCode, formatCurrency } from "@/lib/utils/currency"; -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; interface SessionStatsProps { stats: { userAgent: string | null; requestCount: number; - firstRequestAt: string | null; - lastRequestAt: string | null; + firstRequestAt: Date | string | null; + lastRequestAt: Date | string | null; totalDurationMs: number; providers: { id: number; name: string }[]; models: string[]; @@ -218,9 +218,9 @@ function TokenRow({ ); } -function TimeRow({ label, date }: { label: string; date: string | null }) { +function TimeRow({ label, date }: { label: string; date: Date | string | null }) { if (!date) return null; - const d = new Date(date); + const d = date instanceof Date ? date : new Date(date); return (