From 452967cf5b4ca85d765abcdd38f621e6761645e0 Mon Sep 17 00:00:00 2001 From: Chelsea Lee Date: Mon, 16 Feb 2026 06:53:06 -0600 Subject: [PATCH] feat(timer): add subtle pomodoro timer to header - Added PomodoroTimer component with work/break modes - Timer appears as icon in header, expands to full widget on click - Supports 25m work, 5m short break, 15m long break cycles - Shows progress bar, cycle dots, and mode switcher - Plays sound when timer completes - Can be minimized while running (shows pulsing indicator) --- synculous-client/src/app/dashboard/layout.tsx | 10 +- .../src/components/timer/PomodoroTimer.tsx | 255 ++++++++++++++++++ 2 files changed, 264 insertions(+), 1 deletion(-) create mode 100644 synculous-client/src/components/timer/PomodoroTimer.tsx diff --git a/synculous-client/src/app/dashboard/layout.tsx b/synculous-client/src/app/dashboard/layout.tsx index fddd0de..7eec223 100644 --- a/synculous-client/src/app/dashboard/layout.tsx +++ b/synculous-client/src/app/dashboard/layout.tsx @@ -1,10 +1,11 @@ 'use client'; -import { useEffect, useRef } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useRouter, usePathname } from 'next/navigation'; import { useAuth } from '@/components/auth/AuthProvider'; import { useTheme } from '@/components/theme/ThemeProvider'; import api from '@/lib/api'; +import PomodoroTimer from '@/components/timer/PomodoroTimer'; import { HomeIcon, ListIcon, @@ -38,6 +39,7 @@ export default function DashboardLayout({ const { isDark, toggleDark } = useTheme(); const router = useRouter(); const pathname = usePathname(); + const [isTimerOpen, setIsTimerOpen] = useState(false); const tzSynced = useRef(false); @@ -89,6 +91,12 @@ export default function DashboardLayout({ Synculous
+
+ setIsTimerOpen(!isTimerOpen)} + /> +
+ ); + } + + return ( +
+ {/* Header */} +
+
+ + {getModeLabel()} +
+ +
+ + {/* Timer Display */} +
+
+ {formatTime(timeLeft)} +
+ + {/* Progress Bar */} +
+
+
+
+ + {/* Cycles indicator */} +
+ {[...Array(4)].map((_, i) => ( +
+ ))} +
+ + {/* Controls */} +
+ + + + + +
+ + {/* Mode switcher */} +
+
+ + + +
+
+
+ ); +}