Skip to content

Commit 2db1ae7

Browse files
fix: implement streak calculation logic
1 parent 927a21c commit 2db1ae7

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.6.4] (2026-05-12)
9+
10+
### Fixed
11+
12+
* **Dynamic Stats Streaks**: Replaced hard-coded stats streak values with streaks computed directly from completed task history.
13+
14+
* Multiple task completions on the same calendar day are now deduplicated correctly.
15+
* Longest streaks are now accurately calculated from consecutive completion days.
16+
* Current streaks remain active if the last completion occurred today or yesterday, preventing premature resets.
17+
* Stale streaks now correctly reset instead of displaying outdated values.
18+
* **Current Streak Accuracy**: Prevented the stats dashboard from incorrectly displaying `0` before the user completes a task for the current day.
19+
20+
### Added
21+
22+
* **Focused Streak Tests**:
23+
24+
* Added coverage for empty task lists.
25+
* Added tests for duplicate completions on a single day.
26+
* Added validation for yesterday-ending active streaks.
27+
* Added stale streak reset verification.
28+
* Added tests distinguishing longest streak behavior from current streak behavior.
29+
830
## [1.6.3] (2026-05-10)
931

1032
### Fixed

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.3
1+
1.6.4

internal/lua/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (e *Engine) SetupKairoAPI(L *lua.LState) {
6161
L.SetField(kairo, "notify", L.NewFunction(e.luaNotify))
6262

6363
// Meta
64-
L.SetField(kairo, "version", lua.LString("1.6.3"))
64+
L.SetField(kairo, "version", lua.LString("1.6.4"))
6565

6666
// Set as global
6767
L.SetGlobal("kairo", kairo)

0 commit comments

Comments
 (0)