feat(timers): Add timer sessions (#69)#71
Merged
CrawlerCode merged 4 commits intobetafrom Apr 11, 2026
Merged
Conversation
4fcafda to
1ecf73a
Compare
1ecf73a to
1d6edaa
Compare
There was a problem hiding this comment.
Pull request overview
Adds per-timer session tracking so the UI can display individual start/stop segments (and support removing a session) instead of only storing a single accumulated total.
Changes:
- Refactors timer storage model to include
activeSession+sessions[], and introducesuseTimerApifor timer mutations. - Updates timer/issue grouping and all timer UI components to use the new timer model + API.
- Adds a new
TimerSessionscomponent and corresponding i18n strings.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/groupTimers.ts | Updates grouping types to use the new Timer model. |
| src/utils/groupIssues.ts | Updates timer lookup logic for issue grouping using sessions/active session state. |
| src/lang/ru.json | Adds new timer session/remove-session UI strings. |
| src/lang/fr.json | Adds new timer session/remove-session UI strings. |
| src/lang/en.json | Adds new timer session/remove-session UI strings. |
| src/lang/de.json | Adds new timer session/remove-session UI strings. |
| src/hooks/useTimers.ts | Refactors timers to session-based data model; adds useTimerApi + migration updates. |
| src/components/timer/timer/TimerWrapper.tsx | Switches toggle behavior to call timerApi. |
| src/components/timer/timer/TimerToggleButton.tsx | Switches start/pause behavior to call timerApi and uses activeSession. |
| src/components/timer/timer/TimerSessions.tsx | New UI to list sessions and remove a session via dialog. |
| src/components/timer/timer/TimerRoot.tsx | Extends timer context to include timerApi and total elapsed time calculation. |
| src/components/timer/timer/TimerNameField.tsx | Uses timerApi.setName instead of controller methods. |
| src/components/timer/timer/TimerDoneButton.tsx | Uses total elapsed time from context and deletes via timerApi. |
| src/components/timer/timer/TimerCounter.tsx | Uses total elapsed time from context and overrides time via timerApi. |
| src/components/timer/timer/TimerContextMenu.tsx | Updates context menu actions to use timerApi and new active state. |
| src/components/timer/timer/index.ts | Renames exported UI namespace to TimerComponents (no default export). |
| src/components/timer/ProjectTimersGroup.tsx | Updates timer list rendering to TimerComponents and adds sessions display. |
| src/components/timer/CurrentIssueTimer.tsx | Updates to TimerComponents and new elapsed-time calculation helper. |
| src/components/time-entry/CreateTimeEntryModal.tsx | Adjusts timer prop type to the new Timer model. |
| src/components/issue/ProjectIssuesGroup.tsx | Removes onAddTimer prop wiring; relies on new timer API flow. |
| src/components/issue/IssueContextMenu.tsx | Uses timerApi and new timer model for start/pause/reset/add actions. |
| src/components/issue/Issue.tsx | Updates timer rendering to TimerComponents and uses timerApi for toggling/context menu. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Instead of just storing the total timer time, all individual sessions are now stored and displayed on the “Timer” tab.