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

umputun / ralphex / 21803280876

08 Feb 2026 06:36PM UTC coverage: 80.925% (+0.2%) from 80.726%
21803280876

Pull #76

github

melonamin
feat(web): add git diff stats display and improve session replay

- Add diff stats (files/additions/deletions) to dashboard header,
  parsed from DIFFSTATS metadata in progress files
- Fix deferred section emission so section timestamps align with
  log timestamps during session replay from start
- Add priority-based event dropping when tailer channel is full,
  preserving section/signal events over regular output
- Fix active task highlighting and execution timer seeding
- Add LogDiffStats to progress logger (file-only, no stdout)
- Add tests for parseLineDeferred, emitPendingSection, sendEvent
Pull Request #76: Web dashboard fixes: diff stats, session replay, watcher improvements

141 of 165 new or added lines in 8 files covered. (85.45%)

2 existing lines in 1 file now uncovered.

5006 of 6186 relevant lines covered (80.92%)

155.83 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) {
25✔
18
        matches := diffStatsPattern.FindStringSubmatch(text)
25✔
19
        if matches == nil {
48✔
20
                return DiffStats{}, false
23✔
21
        }
23✔
22

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

36
        return DiffStats{
2✔
37
                Files:     files,
2✔
38
                Additions: additions,
2✔
39
                Deletions: deletions,
2✔
40
        }, true
2✔
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