Skip to content

Commit 85485ee

Browse files
committed
Fix until time display and UI improvements, 1.7.7
- Fix 'until' time showing incorrect time when paused (now shows '(paused)') - Fix 'until' time to update continuously after pause/resume - Remove seconds from 'until' time display (HH:MM format only) - Fix duplicate percentage display in progress bar - Left align 'Finished:' text in completion view - Update version to 1.7.7
1 parent 4da4d91 commit 85485ee

5 files changed

Lines changed: 29 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 1.7.7 (2025-09-16)
2+
3+
### Fixed
4+
- Fix "until" time showing incorrect time when paused (now shows "(paused)")
5+
- Fix "until" time not updating continuously after pause/resume
6+
- Remove seconds from "until" time display (now shows HH:MM only)
7+
- Fix duplicate percentage display in progress bar
8+
9+
### Changed
10+
- Left align "Finished:" text in completion view for better readability
11+
112
## 1.7.6 (2025-09-11)
213

314
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<a href="https://goreportcard.com/report/github.com/ronilaukkarinen/focus"><img src="https://goreportcard.com/badge/github.com/ronilaukkarinen/focus" alt="GoReportCard"></a>
99
<a href="https://github.com/ronilaukkarinen/focus"><img src="https://img.shields.io/badge/go-1.24-blue.svg" alt="Go version"></a>
1010
<a href="https://github.com/ronilaukkarinen/focus/blob/master/LICENCE"><img src="https://img.shields.io/github/license/ronilaukkarinen/focus.svg" alt="LICENCE"></a>
11-
<a href="https://github.com/ronilaukkarinen/focus/releases/"><img src="https://img.shields.io/badge/version-1.7.6-blue.svg" alt="Latest release"></a>
11+
<a href="https://github.com/ronilaukkarinen/focus/releases/"><img src="https://img.shields.io/badge/version-1.7.7-blue.svg" alt="Latest release"></a>
1212
</p>
1313

1414
<h1 align="center">Focus on your task - with flow timer!</h1>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ronilaukkarinen/focus",
3-
"version": "1.7.6",
3+
"version": "1.7.7",
44
"description": "Focus is a flexible command-line productivity timer with flow mode for uninterrupted work sessions",
55
"main": "",
66
"repository": "https://github.com/ronilaukkarinen/focus",

timer/timer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ func New(dbClient store.DB, cfg *config.Config) (*Timer, error) {
164164
db: dbClient,
165165
Opts: cfg,
166166
help: help.New(),
167-
progress: progress.New(progress.WithDefaultGradient()),
167+
progress: progress.New(
168+
progress.WithDefaultGradient(),
169+
progress.WithoutPercentage(),
170+
),
168171
flowMode: cfg.CLI.FlowMode,
169172
taskName: cfg.CLI.TaskName,
170173
estimatedTime: cfg.CLI.EstimatedTime,

timer/views.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,19 @@ func (t *Timer) timerView() string {
129129
timeFormat = "03:04 PM"
130130
}
131131
// Calculate the estimated end time dynamically based on remaining time
132-
// This accounts for pauses by using current time + remaining time
133-
remainingTime := t.estimatedTime - t.elapsedTime
134-
if remainingTime < 0 {
135-
remainingTime = 0
132+
var untilTime string
133+
if !t.clock.Running() && !t.clock.Timedout() {
134+
// When paused, don't show "until" time as it's not accurate
135+
untilTime = " (paused)"
136+
} else {
137+
// Only show "until" time when timer is running
138+
remainingTime := t.estimatedTime - t.elapsedTime
139+
if remainingTime < 0 {
140+
remainingTime = 0
141+
}
142+
estimatedEndTime := time.Now().Add(remainingTime)
143+
untilTime = " until " + estimatedEndTime.Format(timeFormat)
136144
}
137-
estimatedEndTime := time.Now().Add(remainingTime)
138-
untilTime := " until " + estimatedEndTime.Format(timeFormat)
139145

140146
// Calculate available space for task name
141147
availableWidth := maxWidth - len(sessionMsg) - len(untilTime)

0 commit comments

Comments
 (0)