Skip to content

feat: fast and bounded review of large diffs, a roomier layout, and a settled library API - #18

Merged
rednafi merged 3 commits into
masterfrom
rel/2-core
Oct 29, 2026
Merged

rednafi merged 3 commits into
masterfrom
rel/2-core

Conversation

@rednafi

@rednafi rednafi commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Diff

  • Use znkr.io/diff in place of go-udiff. Diffs match git, also for
    large rewrites. A file over 10,000 lines uses the fast diff.
  • A file version over 2,000,000 bytes or 50,000 lines shows
    "file too large to show". A diff holds at most 128 MiB of text, and a
    change of more than 20,000 files shows only the count.

Speed

  • Render lines only when they come into view, and highlight in the
    background with time limits. Slow lexers and very long lines show plain.
  • Read blobs in parallel with a cache. List files, watch, and load the
    commit picker off the UI goroutine. Reloads wait less after an edit.
  • Cap Markdown size, depth and work, PR text, find, and grep, so no
    input freezes the UI.

Layout

  • A narrower file list, the full path above the diff, a thinner
    separator and gutter, and no rule above the footer.
  • The left arrow closes an expanded fold. The hover tooltip is gone.

Fixes

  • Scroll through a wrapped line taller than the pane. Keep the cursor
    visible in a one-row body and in a tall rendered block.
  • Show invisible characters in names and code, and cut wide names to
    the list width.
  • ] and [ step over removed blocks in rendered Markdown.
  • The PR tab counts every check, and names the failed ones.
  • Send a review over 64 KB in parts.
  • -log files are private, hold no typed text, and a FIFO with no
    reader fails at once.
  • -check validates -scope and -layout. A branch with no commits, a
    binary file, and tiny panes show clear notes.
  • A file created and deleted around a reload leaves the list.

API

  • diff: real Row, Fold, Kind and Side types; RenderFile takes
    FileOptions; SplitLines; always lazy.
  • vcs: PR with Tally, File.Err, TooManyFilesError.Count, Watcher.Reset.
  • rex: New and update.NewInstaller return (value, ok); Paste sends in
    parts; update.Restart takes env first.
  • Code names follow the herdr-reviewr settings (navigator, hunk,
    scope, allFiles). Settings, keys, flags and resume state are unchanged.

Stacked on rel/1-internal. Merge in order.

@rednafi
rednafi force-pushed the rel/2-core branch 3 times, most recently from 3aa44ae to 323a45f Compare October 29, 2026 17:04
- Black-box tests for Markdown depth and size, tall lines, too many
  files, large files, PR checks past 100, the setting names, and a
  private log with no typed text.
- Library tests for long lines and the highlighter time limits.
… settled library API

Diff
- Use znkr.io/diff in place of go-udiff. Diffs match git, also for
  large rewrites. A file over 10,000 lines uses the fast diff.
- A file version over 2,000,000 bytes or 50,000 lines shows
  "file too large to show". A diff holds at most 128 MiB of text, and a
  change of more than 20,000 files shows only the count.

Speed
- Render lines only when they come into view, and highlight in the
  background with time limits. Slow lexers and very long lines show plain.
- Read blobs in parallel with a cache. List files, watch, and load the
  commit picker off the UI goroutine. Reloads wait less after an edit.
- Cap Markdown size, depth and work, PR text, find, and grep, so no
  input freezes the UI.

Layout
- A narrower file list, the full path above the diff, a thinner
  separator and gutter, and no rule above the footer.
- The left arrow closes an expanded fold. The hover tooltip is gone.

Fixes
- Scroll through a wrapped line taller than the pane. Keep the cursor
  visible in a one-row body and in a tall rendered block.
- Show invisible characters in names and code, and cut wide names to
  the list width.
- ] and [ step over removed blocks in rendered Markdown.
- The PR tab counts every check, and names the failed ones.
- Send a review over 64 KB in parts.
- -log files are private, hold no typed text, and a FIFO with no
  reader fails at once.
- -check validates -scope and -layout. A branch with no commits, a
  binary file, and tiny panes show clear notes.
- A file created and deleted around a reload leaves the list.

API
- diff: real Row, Fold, Kind and Side types; RenderFile takes
  FileOptions; SplitLines; always lazy.
- vcs: PR with Tally, File.Err, TooManyFilesError.Count, Watcher.Reset.
- rex: New and update.NewInstaller return (value, ok); Paste sends in
  parts; update.Restart takes env first.
- Code names follow the herdr-reviewr settings (navigator, hunk,
  scope, allFiles). Settings, keys, flags and resume state are unchanged.
@rednafi
rednafi deleted the branch rel/1-internal October 29, 2026 17:27
@rednafi rednafi closed this Oct 29, 2026
test: check the limits, the PR checks, the config names and the log
@rednafi rednafi reopened this Oct 29, 2026
@rednafi
rednafi changed the base branch from rel/1-internal to master October 29, 2026 17:39
@rednafi
rednafi merged commit 3175ba4 into master Oct 29, 2026
4 checks passed
@rednafi
rednafi deleted the rel/2-core branch October 29, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant