chore(focus-mode): remove debug logging for bug #5995

Remove temporary console.log statements now that the fix
has been verified to work correctly.
This commit is contained in:
Johannes Millan 2026-01-19 18:36:51 +01:00
parent b573801fd2
commit 587ba76bdb
2 changed files with 1 additions and 29 deletions

View file

@ -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),

View file

@ -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',
};
}),