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

umputun / revdiff / 24120367860

08 Apr 2026 05:58AM UTC coverage: 89.578% (-0.5%) from 90.057%
24120367860

push

github

web-flow
feat: show untracked and staged-only files in file tree (u toggle) (#62)

* feat: add u toggle to show/hide untracked files in file tree

Read-only implementation — no git mutations, no interface pollution.
- UntrackedFiles() added only to *Git, exposed via ModelConfig.LoadUntracked callback
- u key toggles untracked file visibility in tree
- ? icon shown in status bar when active

* fix: show untracked file contents as all-added lines, clear diff on empty tree

* feat: always show staged-only files (new files added to index)

* fix: preserve file selection when toggling untracked files

* feat: show ? status icon for untracked files in file tree

* fix: use m.diffLines for highlighting after untracked fallback, wrap errors

* fix: preserve reviewed marks when toggling untracked files

* fix: save reviewed marks BEFORE rebuilding tree, not after

* address review feedback: tests, error handling, dedup, gated fallback

1. Add tests for UntrackedFiles, ReadFileAsAdded, toggle cycle,
   staged-only merge, dedup, and gated untracked fallback
2. Align ReadFileAsAdded with readFileAsContext: broken symlink
   handling, non-regular file placeholder, error wrapping
3. Log staged/untracked fetch failures as warnings instead of
   silently ignoring them
4. Gate handleFileLoaded disk fallback to FileUntracked status only
5. Dedup untracked files against existing entries (staged + unstaged)

* restrict staged-only merge to FileAdded, O(1) restoreReviewed

* log untracked fallback read errors, add broken symlink test for ReadFileAsAdded

93 of 137 new or added lines in 7 files covered. (67.88%)

1 existing line in 1 file now uncovered.

4538 of 5066 relevant lines covered (89.58%)

425.93 hits per line

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

84.65
/app/diff/diff.go


Source Not Available

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