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

umputun / revdiff / 24269731421 / 1
90%
master: 90%

Build:
DEFAULT BRANCH: master
Ran 11 Apr 2026 12:05AM UTC
Files 32
Run time 1s
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

11 Apr 2026 12:04AM UTC coverage: 88.214% (+0.05%) from 88.166%
24269731421.1

push

github

web-flow
fix(ui): center entire hunk in viewport during hunk navigation (#83)

* fix(ui): center entire hunk in viewport during hunk navigation

Instead of centering on the first changed line (wasting the top half on
already-read context), hunk navigation now centers the entire hunk.
Small hunks are centered by their midpoint; large hunks that exceed the
viewport are placed near the top with a small context margin.

Closes #82

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(ui): add tests for centerHunkInViewport

Tests cover: small hunk centering, large hunk top-alignment, hunk at
file start (offset clamped to 0), prevHunk centering, and single-line
hunk centering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ui): add guard and tests for centerHunkInViewport

Address PR review feedback:
- Add early-return guard when cursor is not on a changed line (no-op
  instead of computing a wrong offset)
- Add test for wrap mode: wrapped lines increase hunk visual height
- Add test for inline annotations: annotation rows included in centering
- Add test for guard: no-op when cursor is on a context line

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ui): address owner review — collapsed mode test and annotation note

- Add collapsed mode test: mixed add/remove hunk with hidden removes,
  verifying only visible lines count toward hunk visual height
- Add comment noting buildAnnotationSet() double-call (acceptable for now)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(ui): extract hunkLineHeight and cursorViewportYUsing helpers

Extract shared per-line visual height logic into hunkLineHeight(), and
split cursorViewportY into a thin wrapper + cursorViewportYUsing() that
accepts pre-built hunks/annotationSet. centerHunkInViewport now builds
context once and passes it to both helpers, eliminating the duplicate
buildAnnotationSet/findHunks calls.

Co-A... (continued)

5733 of 6499 relevant lines covered (88.21%)

450.39 hits per line

Source Files on job 24269731421.1
  • Tree
  • List 32
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24269731421
  • 135942fc on github
  • Prev Job for on master (#24265854525.1)
  • Next Job for on master (#24269886359.1)
  • 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