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

umputun / revdiff / 24440661846
90%

Build:
DEFAULT BRANCH: master
Ran 15 Apr 2026 06:52AM UTC
Jobs 1
Files 53
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

15 Apr 2026 06:51AM UTC coverage: 89.0% (+0.2%) from 88.775%
24440661846

push

github

web-flow
Structural refactor: split main.go, theme boundary cleanup, UI state consolidation (#107)

* chore: add .pi/ to gitignore

* add plan: structural-refactor

* feat: split app/main.go into focused startup concern files

Decompose the 783-line app/main.go monolith into 5 focused files:
- config.go: options struct, parseArgs, config path helpers
- stdin.go: stdin validation, TTY reopen, stdin renderer prep
- renderer_setup.go: VCS detection, git/hg/no-VCS renderer wiring
- themes.go: theme commands, color mapping, apply/collect helpers
- history_save.go: review session auto-save logic

main.go is now a thin entrypoint (229 LOC) with main() and run().
Tests split to match: config_test.go, stdin_test.go,
renderer_setup_test.go, themes_test.go.

* feat: introduce UI-side ThemeCatalog dependency interface

Add ThemeCatalog interface, ThemeEntry, and ThemeSpec types to app/ui/model.go
as the consumer-side contract for theme discovery and persistence. Add concrete
Catalog type to app/theme backed by existing ListOrdered/Load functions. Wire
through package main via thin themeCatalog adapter that composes theme catalog
with config-file persistence. Existing direct theme loading in app/ui stays
until Tasks 4-5 migrate callers to the new interface.

* feat: introduce loadedFileState struct and migrate all callers

Replace 13 scattered top-level Model fields (currFile, diffLines,
highlightedLines, intraRanges, fileAdds, fileRemoves, blameData,
blameAuthorLen, lineNumWidth, singleColLineNum, loadSeq, mdTOC,
singleFile) with a single loadedFileState struct accessed as m.file.

This makes the parallel-array synchronization invariant explicit and
groups all per-file state into one coherent object. All callers across
app/ui/*.go are updated to use the new m.file.xxx access pattern.

* feat: group modelConfigState and layoutState sub-structs in ui.Model

* feat: restructure app/theme package — zero standalone functions, Catalog-centric API

All standalone functions in ap... (continued)

1224 of 1463 new or added lines in 24 files covered. (83.66%)

9 existing lines in 5 files now uncovered.

6594 of 7409 relevant lines covered (89.0%)

351.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
67
81.18
app/theme/catalog.go
32
83.59
app/themes.go
31
51.56
app/renderer_setup.go
23
0.0
app/history_save.go
21
66.13
app/stdin.go
15
0.0
-48.59% app/main.go
12
84.1
0.0% app/ui/loaders.go
10
88.51
app/config.go
8
92.26
0.0% app/ui/diffnav.go
8
89.61
6.33% app/ui/model.go
6
94.33
0.0% app/ui/collapsed.go
4
81.61
-3.35% app/ui/themeselect.go
2
93.61
0.0% app/ui/annotate.go

Coverage Regressions

Lines Coverage ∆ File
4
0.0
-48.59% app/main.go
2
81.61
-3.35% app/ui/themeselect.go
1
94.33
0.0% app/ui/collapsed.go
1
92.26
0.0% app/ui/diffnav.go
1
84.1
0.0% app/ui/loaders.go
Jobs
ID Job ID Ran Files Coverage
1 24440661846.1 15 Apr 2026 06:52AM UTC 53
89.0
GitHub Action Run
Source Files on build 24440661846
  • Tree
  • List 53
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ce592900 on github
  • Prev Build on master (#24424227243)
  • Next Build on master (#24468545745)
  • 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