diff --git a/apps/web/src/components/practice/SessionPausedModal.tsx b/apps/web/src/components/practice/SessionPausedModal.tsx index 659622b6..ece252a5 100644 --- a/apps/web/src/components/practice/SessionPausedModal.tsx +++ b/apps/web/src/components/practice/SessionPausedModal.tsx @@ -1,6 +1,6 @@ 'use client' -import { useEffect, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import { useTheme } from '@/contexts/ThemeContext' import type { SessionPart, SessionPlan } from '@/db/schema/session-plans' import { css } from '../../../styled-system/css' @@ -55,6 +55,18 @@ function getPartTypeEmoji(type: SessionPart['type']): string { } } +// Fun phrases for auto-pause +const AUTO_PAUSE_PHRASES = [ + "This one's a thinker!", + 'Taking your time? Smart!', + 'Deep thoughts happening...', + 'Brain at work!', + 'No rush!', + 'Thinking cap on!', + 'Processing...', + 'Working it out!', +] + // Intl formatters for duration display const secondsFormatter = new Intl.NumberFormat('en', { style: 'unit', @@ -258,6 +270,13 @@ export function SessionPausedModal({ // Toggle for showing stats details const [showStats, setShowStats] = useState(false) + // Pick a random phrase once per pause (stable while modal is open) + const autoPausePhrase = useMemo( + () => AUTO_PAUSE_PHRASES[Math.floor(Math.random() * AUTO_PAUSE_PHRASES.length)], + // eslint-disable-next-line react-hooks/exhaustive-deps + [pauseInfo?.pausedAt?.getTime()] + ) + useEffect(() => { if (!isOpen || !pauseInfo?.pausedAt) { setPauseDuration(0) @@ -324,74 +343,60 @@ export function SessionPausedModal({ })} onClick={(e) => e.stopPropagation()} > - {/* Hero section with avatar */} + {/* Hero section with avatar and title */}
⏱️{' '} {formatDurationFriendly(pauseDuration)}