diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f5c8d3..b3c59a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to hp (hittyping) will be documented in this file. +## [0.8.5] - 2026-03-04 + +### Changed + +- Timeline includes date (e.g., `Feb 27 10:02:18`) when session spans multiple calendar days + ## [0.8.4] - 2026-02-24 ### Added diff --git a/ROADMAP.md b/ROADMAP.md index 8474fcb..02b5213 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -74,6 +74,10 @@ If hp evolves toward interactive features, consider migrating to [Bubble Tea](ht ## Completed +### v0.8.5 - Timeline Date Display + +- [x] Include date in timeline when session spans multiple calendar days + ### v0.8.4 - Connection Timeline - [x] Track alternating UP/DOWN periods during monitoring diff --git a/main.go b/main.go index 1a28331..b24b58e 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ import ( // cleanly pause rendering before the process is actually stopped. var displayMu sync.Mutex -const version = "0.8.4" +const version = "0.8.5" const ( // ANSI colors @@ -758,8 +758,17 @@ func printFinal(url string, s *stats) { periods = append(head, tail...) } now := time.Now() + // include date if session spans multiple calendar days + tsFmt := "15:04:05" + if len(s.periods) > 0 { + first := s.periods[0].start + last := now + if first.Format("2006-01-02") != last.Format("2006-01-02") { + tsFmt = "Jan 02 15:04:05" + } + } for i, p := range periods { - ts := p.start.Format("15:04:05") + ts := p.start.Format(tsFmt) var label, color, detail string if p.up { label = "UP "