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

umputun / ralphex / 21848717929

10 Feb 2026 02:02AM UTC coverage: 80.727% (+0.3%) from 80.449%
21848717929

push

github

web-flow
Web dashboard fixes: diff stats, session replay, watcher improvements (#76)

* refactor(web): replace blanket hidden dir skip with known skip list

Instead of skipping all directories starting with ".", use an explicit
set of known directories to skip (.git, .idea, .vscode, .cache, .npm,
.yarn, node_modules, vendor, __pycache__, target, build, dist). This
allows unknown hidden directories like .ralphex to be watched.

* 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

* Align discovery skip logic and expand diff stats tests

* fix(progress): add missing PhaseHolder arg to LogDiffStats tests

NewLogger signature gained a *status.PhaseHolder parameter in #75,
but the two new LogDiffStats tests were written against the pre-merge
signature causing build failure after merge.

* fix(defaults): remove Go-specific references from embedded prompts and agents

Make default prompts and agents language-agnostic:
- finalize.txt: replace `go test ./...` with generic "project's test command"
- make_plan.txt: remove .go extensions from path examples, replace hardcoded
  Go test/lint commands with generic "project-specific command" references
- quality.txt: replace "goroutine leaks" with "coroutine leaks"

* 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 semant... (continued)

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

1 existing line in 1 file now uncovered.

5311 of 6579 relevant lines covered (80.73%)

197.74 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