From 587ba76bdb2cd3f79e925a0f12f15fa0aed6cc2b Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Mon, 19 Jan 2026 18:36:51 +0100 Subject: [PATCH] chore(focus-mode): remove debug logging for bug #5995 Remove temporary console.log statements now that the fix has been verified to work correctly. --- .../focus-mode/store/focus-mode.effects.ts | 21 ------------------- .../focus-mode/store/focus-mode.reducer.ts | 9 +------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/app/features/focus-mode/store/focus-mode.effects.ts b/src/app/features/focus-mode/store/focus-mode.effects.ts index 8fb3b3186..ecb9a8e15 100644 --- a/src/app/features/focus-mode/store/focus-mode.effects.ts +++ b/src/app/features/focus-mode/store/focus-mode.effects.ts @@ -110,34 +110,19 @@ export class FocusModeEffects { pausedTaskId, isResumingBreak, ]) => { - console.log('[Bug #5995] syncTrackingStartToSession$ fired:', { - timerPurpose: timer.purpose, - timerIsRunning: timer.isRunning, - isResumingBreak, - pausedTaskId, - }); - // If session is paused (purpose is 'work' but not running), resume it if (timer.purpose === 'work' && !timer.isRunning) { - console.log('[Bug #5995] Resuming paused work session'); return of(actions.unPauseFocusSession()); } // If break is active, handle based on state and cause // Bug #5995 Fix: Don't skip breaks that were just resumed if (timer.purpose === 'break') { - console.log('[Bug #5995] Break is active, checking flag...'); // Check store flag to distinguish between break resume and manual tracking start if (isResumingBreak) { - console.log( - '[Bug #5995] Flag is TRUE - NOT skipping break (correct behavior)', - ); // Clear flag after processing to prevent false positives this.store.dispatch(actions.clearResumingBreakFlag()); return EMPTY; // Don't skip - break is resuming } - console.log( - '[Bug #5995] Flag is FALSE - SKIPPING break (user manually started tracking)', - ); // User manually started tracking during break // Skip the break to sync with tracking (bug #5875 fix) return of(actions.skipBreak({ pausedTaskId })); @@ -224,12 +209,6 @@ export class FocusModeEffects { !currentTaskId && !!pausedTaskId, ), - tap(([_action, _cfg, timer, pausedTaskId]) => { - console.log('[Bug #5995] syncSessionResumeToTracking$ resuming tracking:', { - timerPurpose: timer.purpose, - pausedTaskId, - }); - }), switchMap(([_action, _cfg, _timer, pausedTaskId]) => this.store.select(selectTaskById, { id: pausedTaskId! }).pipe( take(1), diff --git a/src/app/features/focus-mode/store/focus-mode.reducer.ts b/src/app/features/focus-mode/store/focus-mode.reducer.ts index a2c967af4..682f5c316 100644 --- a/src/app/features/focus-mode/store/focus-mode.reducer.ts +++ b/src/app/features/focus-mode/store/focus-mode.reducer.ts @@ -138,13 +138,6 @@ export const focusModeReducer = createReducer( // Allow resuming both work sessions and breaks if (state.timer.purpose === null) return state; - const isBreak = state.timer.purpose === 'break'; - console.log('[Bug #5995] unPauseFocusSession reducer:', { - purpose: state.timer.purpose, - isBreak, - willSetFlag: isBreak, - }); - return { ...state, timer: { @@ -153,7 +146,7 @@ export const focusModeReducer = createReducer( startedAt: Date.now() - state.timer.elapsed, }, // Set flag ONLY when resuming a break (not work sessions) - _isResumingBreak: isBreak, + _isResumingBreak: state.timer.purpose === 'break', }; }),