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

umputun / revdiff / 24200475888
87%

Build:
DEFAULT BRANCH: master
Ran 09 Apr 2026 04:09PM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Apr 2026 04:07PM UTC coverage: 87.464% (+0.02%) from 87.447%
24200475888

push

github

web-flow
fix: load staged diff content for staged-only files in default mode (#80)

* fix: load staged diff content for staged-only files in default mode

Staged-only files (new files added to index via git add) were discovered
correctly by the staged-only merge in loadFiles(), but when loading their
diff content, FileDiff was called with staged=false (default mode).
Since these files are identical in the working tree and index, git diff
returns empty — leaving the diff pane blank.

Fix: in handleFileLoaded, when a FileAdded file has empty diff and we're
not in staged mode, retry with staged=true (git diff --cached) to get the
actual added content.

Fixes #79

* refactor: extract resolveEmptyDiff to fix gocyclo

handleFileLoaded cyclomatic complexity was 26 (threshold 20) after the
staged-only fallback addition. Extract the empty-diff resolution logic
(staged --cached retry + untracked disk read) into resolveEmptyDiff,
reducing complexity to 15.

* test: add staged-only fallback tests for resolveEmptyDiff

Three cases:
- FileAdded with empty unstaged diff retries with --cached and shows content
- --staged mode does not retry (already uses --cached)
- FileModified with empty diff does not trigger staged retry

16 of 18 new or added lines in 1 file covered. (88.89%)

5156 of 5895 relevant lines covered (87.46%)

401.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
80.93
0.67% app/ui/loaders.go
Jobs
ID Job ID Ran Files Coverage
1 24200475888.1 09 Apr 2026 04:09PM UTC 30
87.46
GitHub Action Run
Source Files on build 24200475888
  • Tree
  • List 30
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a6f2f45c on github
  • Prev Build on master (#24200025642)
  • Next Build on master (#24201410277)
  • Delete
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