debug: add console.log to SidebarStatsBar for timer investigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-15 16:35:57 -04:00
parent 6885461557
commit fe7520d75a

View File

@@ -27,6 +27,10 @@ function calcActiveSeconds(startTimes: string[]): number {
}
export function SidebarStatsBar({ resolved, active, completedMinutes, activeSessionStartTimes }: SidebarStatsBarProps) {
// Debug: remove after fixing
if (activeSessionStartTimes.length > 0) {
console.log('[SidebarStats] startTimes:', activeSessionStartTimes, 'calcSeconds:', calcActiveSeconds(activeSessionStartTimes), 'now:', Date.now(), 'parsed:', activeSessionStartTimes.map(st => new Date(st).getTime()))
}
const [liveSeconds, setLiveSeconds] = useState(() => calcActiveSeconds(activeSessionStartTimes))
// Tick every second to keep the timer in sync with the session timer