Repository navigation
feat(learning): study timer and statistics - #55
Merged
Merged
Conversation
StudyTimer is a Pomodoro state machine driven by explicit dates (focus, short and long breaks, pause, skip, reset); StudyStatistics computes the last seven days, the current week, minutes per module and the streak of study days. Completed focus phases become StudySessions via RecordStudySessionUseCase. The notification plan sync keeps the timer's own notification. Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
StudySessionRecord and its repository keep completed focus phases; timer lengths are stored as JSON that tolerates missing keys. Sessions are part of backups (older backups without them still restore). Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
One app-wide StudyTimerViewModel drives the timer every second while it runs, records finished focus phases for the chosen module, schedules a notification for the end of the phase (cancelled on pause, skip and reset) and provides the statistics. Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
StudyTimerPanel shows the phase, a progress ring with the remaining time, the module, start/pause, skip, reset and the phase lengths; StudyTimerToolbarButton shows the remaining time in the toolbar and preselects the open module. Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
A new destination „Statistik“ (sidebar, navigation menu, quick navigator) shows today, this week and the streak, a chart of the last seven days, minutes per module and the progress of the study plans. The timer sits in the main window's toolbar and reloads after a restore. Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
Refs #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
This was referenced Oct 28, 2026
# Conflicts: # App/AppContainer.swift # App/StudyAppApp.swift # Data/SwiftData/Persistence.swift # Presentation/RootView.swift
Owner
Author
|
CI: „Build & Tests (macOS)“ hängt mit „The test runner hung before establishing connection“. Das ist derselbe Hänger wie seit ca. 13 Uhr auf Generated by Claude Code |
3 of 7 tasks
5 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45
What changes and why?
A Pomodoro study timer and a statistics page. One commit per layer:
StudyTimer– a value-type state machine driven by explicit dates (focus, short/long break, pause, skip, reset),StudyStatistics(last 7 days, this week, per module, streak),StudySession,StudyTimerSettings(tolerant decoding),RecordStudySessionUseCase. The notification plan sync now keeps the timer's own notification.StudySessionRecord+ repository (new SwiftData model), timer settings inUserDefaults; sessions are part of backups (older backups still restore).StudyTimerViewModel: ticks every second while running, records finished focus phases for the chosen module, schedules/cancels the end-of-phase notification.Tests
StudyTimerTests(phases, pause keeps time and start, long break rhythm, skip, old settings JSON)StudyStatisticsTests(days, week, modules, streak), recording, plan sync keeps the timer notificationStudyTimerViewModelTests(recording, notification on start/pause, settings), backup snapshot includes sessionsChecklist
Generated by Claude Code