• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / ralphex / 21848286276

10 Feb 2026 01:43AM UTC coverage: 80.772% (+0.006%) from 80.766%
21848286276

Pull #76

github

melonamin
fix(web): use local timezone for timestamp parsing and improve session liveness logic

Progress log timestamps are written in local time without zone offsets,
so ParseInLocation with time.Local matches the actual semantics instead
of silently interpreting them as UTC.

Frontend session liveness now prefers server-provided session state over
the recency heuristic, centralizes end-time calculation in
getElapsedEndTime(), and guards the elapsed timer against running for
non-live sessions. Also fixes temporal consistency in tail.go by
capturing time.Now() once per event batch, and uses sessionIDFromPath
in watcher test for correctness.
Pull Request #76: Web dashboard fixes: diff stats, session replay, watcher improvements

154 of 171 new or added lines in 9 files covered. (90.06%)

241 existing lines in 6 files now uncovered.

5314 of 6579 relevant lines covered (80.77%)

198.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/pkg/web/diff_stats.go
1
package web
2

3
import (
4
        "regexp"
5
        "strconv"
6
)
7

8
// DiffStats holds git diff statistics for a session.
9
type DiffStats struct {
10
        Files     int `json:"files"`
11
        Additions int `json:"additions"`
12
        Deletions int `json:"deletions"`
13
}
14

15
var diffStatsPattern = regexp.MustCompile(`^DIFFSTATS:\s*files=(\d+)\s+additions=(\d+)\s+deletions=(\d+)\s*$`)
16

17
func parseDiffStats(text string) (DiffStats, bool) {
28✔
18
        matches := diffStatsPattern.FindStringSubmatch(text)
28✔
19
        if matches == nil {
53✔
20
                return DiffStats{}, false
25✔
21
        }
25✔
22

23
        files, err := strconv.Atoi(matches[1])
3✔
24
        if err != nil {
3✔
NEW
25
                return DiffStats{}, false
×
NEW
26
        }
×
27
        additions, err := strconv.Atoi(matches[2])
3✔
28
        if err != nil {
3✔
NEW
29
                return DiffStats{}, false
×
NEW
30
        }
×
31
        deletions, err := strconv.Atoi(matches[3])
3✔
32
        if err != nil {
3✔
NEW
33
                return DiffStats{}, false
×
NEW
34
        }
×
35

36
        return DiffStats{
3✔
37
                Files:     files,
3✔
38
                Additions: additions,
3✔
39
                Deletions: deletions,
3✔
40
        }, true
3✔
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc