Skip to content

Commit bd30112

Browse files
committed
Fix time display bug and add type-ahead category selection, 1.7.2
- Fix 'until' time display showing current time instead of estimated end time - Clear task description field automatically for new flow sessions - Add type-ahead functionality to category dropdown for better UX - Update version to 1.7.2
1 parent 12f9a33 commit bd30112

5 files changed

Lines changed: 22 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
## Unreleased
22

3+
## 1.7.2 (2025-09-11)
4+
5+
### Fixed
6+
- Fix "until" time display bug showing current time instead of estimated end time in flow mode
7+
- Clear task description field automatically for new flow sessions
8+
9+
### Added
10+
- Add type-ahead functionality to category dropdown - users can now type letters to filter categories
11+
12+
### Changed
13+
- Add release process documentation to README
14+
315
## 1.7.1 (2025-09-11)
416

517
### Changed

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.1-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.2-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.1",
3+
"version": "1.7.2",
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,11 @@ func (t *Timer) promptFlowModeInfo() tea.Cmd {
352352
CharLimit(200)) // Allow longer task names
353353

354354
// Add task description (optional)
355+
// Reset description to empty for each new flow session
356+
t.taskDescription = ""
355357
fields = append(fields, huh.NewInput().
356358
Key("taskDescription").
357-
Title("Description (optional)").
359+
Title("Description (optional - press Enter to skip)").
358360
Value(&t.taskDescription).
359361
Placeholder("Add details about the task...").
360362
CharLimit(500))
@@ -373,6 +375,8 @@ func (t *Timer) promptFlowModeInfo() tea.Cmd {
373375
Title("Category").
374376
Options(options...).
375377
Height(maxDropdownHeight). // Dynamically limit dropdown height
378+
Filterable(true).
379+
Filtering(true).
376380
Value(&t.selectedTag))
377381
}
378382

timer/views.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ func (t *Timer) timerView() string {
127127
} else {
128128
timeFormat = "03:04:05 PM"
129129
}
130-
untilTime := " until " + t.Current.EndTime.Format(timeFormat)
130+
// Calculate the estimated end time dynamically from start time + estimated duration
131+
estimatedEndTime := t.StartTime.Add(t.estimatedTime)
132+
untilTime := " until " + estimatedEndTime.Format(timeFormat)
131133

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

0 commit comments

Comments
 (0)